|
|
1.1 ! root 1: # ! 2: # Makefile 1.17 87/12/11 ! 3: # ! 4: # Makefile for PCC ! 5: # ! 6: # Some symbols are specific to certain compilers: ! 7: # ONEPASS compile pass 1 and pass 2 together ! 8: # SPRECC do single precision in single not double ! 9: # FORT get f77-style pass 2 ! 10: # ! 11: O = -O ! 12: CFLAGS = $(O) -I. -I$(M) ! 13: ! 14: COPTS = -DONEPASS $(CFLAGS) ! 15: SCOPTS = -DONEPASS -DSPRECC $(CFLAGS) ! 16: FOPTS = -DFORT $(CFLAGS) ! 17: LDFLAGS = ! 18: ! 19: RM= /bin/rm -f ! 20: LN= /bin/ln -s ! 21: ! 22: SFILES= strees.c slocal.c slocal2.c sallo.c sorder.c stable.c ! 23: SOBJS= strees.o slocal.o slocal2.o sallo.o sorder.o stable.o ! 24: FFILES= freader.c fallo.c fmatch.c ftable.c forder.c flocal2.c fcomm2.c ! 25: FOBJS= freader.o fallo.o fmatch.o ftable.o forder.o flocal2.o fcomm2.o ! 26: ! 27: P1INCS= $M/pass1.h macdefs.h $M/manifest.h pcclocal.h $M/config.h $M/ndu.h \ ! 28: /usr/include/stdio.h ! 29: P1ONEP= $(P1INCS) $M/onepass.h ! 30: P2INCS= $M/pass2.h macdefs.h mac2defs.h $M/manifest.h pcclocal.h $M/config.h \ ! 31: $M/ndu.h /usr/include/stdio.h ! 32: P2ONEP= $(P2INCS) $M/onepass.h ! 33: OBJS= code.o rel.o stab.o comm1.o match.o optim.o pftn.o \ ! 34: reader.o scan.o xdefs.o cgram.o rodata.o ! 35: DOBJS= allo.o local.o local2.o order.o trees.o table.o ! 36: M=../../mip ! 37: TESTDIR = . ! 38: ! 39: all: ccom sccom f1 ! 40: ! 41: # ! 42: # 'ccom' is a one-pass C compiler. ! 43: # ! 44: ccom: ${OBJS} ${DOBJS} rel.o ! 45: $(CC) $(LDFLAGS) ${OBJS} ${DOBJS} rel.o -o $(TESTDIR)/ccom ! 46: trees.o: $(P1ONEP) $M/trees.c ! 47: $(CC) -c $(COPTS) $M/trees.c ! 48: optim.o: $(P1ONEP) $M/optim.c ! 49: $(CC) -c $(COPTS) $M/optim.c ! 50: pftn.o: $(P1ONEP) $M/pftn.c ! 51: $(CC) -c $(COPTS) $M/pftn.c ! 52: code.o: $(P1ONEP) code.c ! 53: $(CC) -c $(COPTS) code.c ! 54: local.o: $(P1ONEP) local.c ! 55: $(CC) -c $(COPTS) local.c ! 56: scan.o: $(P1ONEP) $M/scan.c ! 57: $(CC) -c $(COPTS) $M/scan.c ! 58: xdefs.o: $(P1ONEP) $M/xdefs.c ! 59: $(CC) -c $(COPTS) $M/xdefs.c ! 60: cgram.o: $(P1ONEP) cgram.c ! 61: $(CC) -c $(COPTS) cgram.c ! 62: rodata.o: rodata.c ! 63: $(CC) -c $(COPTS) -R rodata.c ! 64: rodata.c cgram.c: $M/cgram.y pcctokens ! 65: cat pcctokens $M/cgram.y > gram.in ! 66: $(YACC) gram.in ! 67: $(RM) rodata.c ! 68: sh ./:yyfix yyexca yyact yypact yypgo yyr1 yyr2 yychk yydef ! 69: mv y.tab.c cgram.c ! 70: comm1.o: $(P1ONEP) $M/common.c ! 71: $(LN) $M/common.c comm1.c ! 72: $(CC) -c $(COPTS) -DPASS1COMMON comm1.c ! 73: $(RM) comm1.c ! 74: stab.o: $(P1ONEP) stab.c \ ! 75: /usr/include/stab.h /usr/include/a.out.h /usr/include/sys/types.h ! 76: $(CC) -c $(COPTS) stab.c ! 77: table.o: $(P2ONEP) table.c ! 78: $(CC) -c $(COPTS) -R table.c ! 79: reader.o: $(P2ONEP) $M/reader.c ! 80: $(CC) -c $(COPTS) $M/reader.c ! 81: local2.o: $(P2ONEP) local2.c ! 82: $(CC) -c $(COPTS) local2.c ! 83: order.o: $(P2ONEP) order.c ! 84: $(CC) -c $(COPTS) order.c ! 85: match.o: $(P2ONEP) $M/match.c ! 86: $(CC) -c $(COPTS) $M/match.c ! 87: allo.o: $(P2ONEP) $M/allo.c ! 88: $(CC) -c $(COPTS) $M/allo.c ! 89: ! 90: # ! 91: # 'sccom' is a C compiler that does single precision computations in ! 92: # single precision rather than double precision. ! 93: # ! 94: sccom: ${OBJS} ${SOBJS} rel.o ! 95: $(CC) $(LDFLAGS) ${OBJS} ${SOBJS} rel.o -o $(TESTDIR)/sccom ! 96: strees.o: $(P1ONEP) $M/trees.c ! 97: $(LN) $M/trees.c strees.c ! 98: $(CC) -c $(SCOPTS) strees.c ! 99: $(RM) strees.c ! 100: slocal.o: $(P1ONEP) local.c ! 101: $(LN) local.c slocal.c ! 102: $(CC) -c $(SCOPTS) slocal.c ! 103: $(RM) slocal.c ! 104: slocal2.o: $(P2ONEP) local2.c ! 105: $(LN) local2.c slocal2.c ! 106: $(CC) -c $(SCOPTS) slocal2.c ! 107: $(RM) slocal2.c ! 108: sallo.o: $(P2ONEP) $M/allo.c ! 109: $(LN) $M/allo.c sallo.c ! 110: $(CC) -c $(SCOPTS) sallo.c ! 111: $(RM) sallo.c ! 112: sorder.o: $(P2ONEP) order.c ! 113: $(LN) order.c sorder.c ! 114: $(CC) -c $(SCOPTS) sorder.c ! 115: $(RM) sorder.c ! 116: stable.o: $(P2ONEP) table.c ! 117: $(LN) table.c stable.c ! 118: $(CC) -c $(SCOPTS) -R stable.c ! 119: $(RM) stable.c ! 120: ! 121: # ! 122: # 'f1' is the f77 and pc code generator. ! 123: # ! 124: f1: fort.o freader.o fallo.o fmatch.o ftable.o forder.o flocal2.o \ ! 125: fcomm2.o ! 126: $(CC) $(LDFLAGS) fort.o freader.o fallo.o fmatch.o ftable.o \ ! 127: forder.o flocal2.o fcomm2.o -o $(TESTDIR)/f1 ! 128: fort.o: $(P2INCS) fort.h $M/fort.c ! 129: $(CC) -c $(FOPTS) $M/fort.c ! 130: freader.o: $(P2INCS) $M/reader.c ! 131: $(LN) $M/reader.c freader.c ! 132: $(CC) -c $(FOPTS) freader.c ! 133: $(RM) freader.c ! 134: fallo.o: $(P2INCS) $M/allo.c ! 135: $(LN) $M/allo.c fallo.c ! 136: $(CC) -c $(FOPTS) fallo.c ! 137: $(RM) fallo.c ! 138: fmatch.o: $(P2INCS) $M/match.c ! 139: $(LN) $M/match.c fmatch.c ! 140: $(CC) -c $(FOPTS) fmatch.c ! 141: $(RM) fmatch.c ! 142: ftable.o: $(P2INCS) table.c ! 143: $(LN) table.c ftable.c ! 144: $(CC) -c -R $(FOPTS) ftable.c ! 145: $(RM) ftable.c ! 146: forder.o: $(P2INCS) order.c ! 147: $(LN) order.c forder.c ! 148: $(CC) -c $(FOPTS) forder.c ! 149: $(RM) forder.c ! 150: flocal2.o: $(P2INCS) local2.c ! 151: $(LN) local2.c flocal2.c ! 152: $(CC) -c $(FOPTS) flocal2.c ! 153: $(RM) flocal2.c ! 154: fcomm2.o: $(P2INCS) $M/common.c ! 155: $(LN) $M/common.c fcomm2.c ! 156: $(CC) -c $(FOPTS) -DPASS2COMMON fcomm2.c ! 157: $(RM) fcomm2.c ! 158: ! 159: install: all ! 160: install -s -o bin -g bin -m 755 ${TESTDIR}/ccom ${DESTDIR}/lib/ccom ! 161: install -s -o bin -g bin -m 755 ${TESTDIR}/sccom ${DESTDIR}/lib/sccom ! 162: install -s -o bin -g bin -m 755 ${TESTDIR}/f1 ${DESTDIR}/lib/f1 ! 163: ! 164: GREP= egrep ! 165: ! 166: pcclocal.h: ../localdefs.h /usr/include/pcc.h ! 167: $(RM) pcclocal.h ! 168: cat /usr/include/pcc.h ../localdefs.h | $(GREP) '^#[ ]*(define[ ][ ]*PCC(F|T|TM|OM)?_|ifdef|ifndef|endif)' | sed -e 's/PCC[A-Z]*_//' > pcclocal.h ! 169: ! 170: pcctokens: ../localdefs.h /usr/include/pcc.h ! 171: $(RM) pcctokens ! 172: cat /usr/include/pcc.h ../localdefs.h | $(GREP) '^#[ ]*define[ ][ ]*PCC_' | sed -e 's/^#[ ]*define[ ][ ]*PCC_/%term /' > pcctokens ! 173: ! 174: DUMMIES= $(SFILES) $(FFILES) ! 175: ! 176: shrink: ! 177: $(RM) *.o ccom sccom f1 $(DUMMIES) ! 178: clean: ! 179: $(RM) *.o ccom sccom f1 cgram.c rodata.c pcctokens pcclocal.h gram.in $(DUMMIES) ! 180: sfix: ! 181: $(RM) $(SFILES) ! 182: sclean: ! 183: $(RM) $(SOBJS) $(SFILES) ! 184: ffix: ! 185: $(RM) $(FFILES) ! 186: fclean: ! 187: $(RM) $(FOBJS) $(FFILES) ! 188: ! 189: # Should use -a, but the situation is too confusing to fix at the moment... ! 190: lintall: ! 191: lint -hx $(COPTS) -DPASS1COMMON cgram.c $M/xdefs.c $M/scan.c \ ! 192: $M/pftn.c $M/trees.c $M/optim.c code.c local.c stab.c \ ! 193: $M/reader.c local2.c order.c $M/match.c $M/allo.c \ ! 194: $M/common.c table.c rodata.c rel.c ! 195: ! 196: depend: ! 197: tags:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.