# Makefile for the Fortran 77 compiler # running on a nonseparate I/D PDP11 using text overlays, # generating code for the PDP11, # using the Ritchie pass 2 # AS= as -V C2= /lib/c2 CC= cc -V CFL= -DTARGET=PDP11 -DFAMILY=DMR -DHERE=PDP11 -DOUTPUT=BINARY \ -DPOLISH=POSTFIX -DOVERLAID FP= # -f for machines without floating point CFLAGS= -s ${FP} ${CFL} # Don't use -O here. STARTUP= /lib/crt0.o # /lib/fcrt0.o for machines without floating point LD= ld LDFLAGS= -X -n LIBR= -lovc STRINGS= f77_strings PASS1OBJECTS= data.o equiv.o error.o exec.o expr.o gram.o init.o \ intr.o io.o lex.o main.o misc.o pdp11.o pdp11x.o proc.o \ put.o putdmr.o all: f77 f77pass1 cp: all cp f77 ${DESTDIR}/bin cp f77pass1 ${DESTDIR}/lib/f77pass1 -strip ${DESTDIR}/bin/f77 ${DESTDIR}/lib/f77pass1 cp ${STRINGS} ${DESTDIR}/lib cmp: all cmp f77 ${DESTDIR}/bin/f77 cmp f77pass1 ${DESTDIR}/lib/f77pass1 cmp ${STRINGS} ${DESTDIR}/lib/${STRINGS} clean: -rm -f f77 f77pass1 *.o x.c xs.c f77_strings strings driver.o: cc -c ${CFLAGS} $*.c # Take certain data tables out of data space and put them in # text space (warning-- this doesn't work except with special cases) gram.o: gram.c mkstr - f77_strings xx gram.c ${CC} -S ${CFLAGS} xxgram.c mv xxgram.s gram.s # Eliminate yacc data structures ed - gram.s < :gram.fix rm xxgram.c ${AS} -u -o gram.o gram.s rm gram.s .c.o: $*.s # Remove error strings mkstr - f77_strings xx $*.c ${CC} -S ${CFLAGS} xx$*.c mv xx$*.s $*.s # Move switch code to text space ed - $*.s < :rofix rm xx$*.c ${C2} $*.s x.s mv x.s $*.s ${AS} -u -o $*.o $*.s rm $*.s .c.s: # Remove error strings mkstr - f77_strings xx $*.c ${CC} -S ${CFLAGS} xx$*.c mv xx$*.s $*.s ed - $*.s < :rofix rm xx$*.c .s.o: ${C2} $*.s x.s mv x.s $*.s ${AS} -u -o $*.o $*.s rm $*.s f77: driver.c pdp11x.c cc -n ${CFLAGS} driver.c pdp11x.c -o f77 @size f77 f77pass1: ${PASS1OBJECTS} ${LD} ${STARTUP} ${LDFLAGS} -o f77pass1 \ -Z main.o init.o equiv.o data.o io.o \ -Z gram.o \ -Z lex.o proc.o \ -Z expr.o \ -Z exec.o intr.o \ -Z putdmr.o pdp11.o pdp11x.o \ -L misc.o error.o put.o ${LIBR} @size f77pass1 gram.c: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs ( sed gram.in ${YACC} ${YFLAGS} gram.in mv y.tab.c gram.c rm gram.in data.o: defs data.o: string_defs driver.o: /usr/include/stdio.h driver.o: /usr/include/ctype.h driver.o: defines driver.o: locdefs driver.o: drivedefs driver.o: ftypes driver.o: /usr/include/signal.h driver.o: /usr/include/errno.h driver.o: ftypes equiv.o: defs equiv.o: string_defs error.o: defs error.o: string_defs exec.o: defs exec.o: string_defs expr.o: defs expr.o: string_defs gram.o: defs gram.o: string_defs init.o: defs init.o: string_defs intr.o: defs intr.o: string_defs io.o: defs io.o: string_defs lex.o: defs lex.o: string_defs lex.o: tokdefs main.o: defs main.o: string_defs misc.o: defs misc.o: string_defs pdp11.o: defs pdp11.o: string_defs pdp11x.o: /usr/include/stdio.h pdp11x.o: defines pdp11x.o: locdefs proc.o: defs proc.o: string_defs put.o: defs put.o: string_defs putdmr.o: defs putdmr.o: string_defs putdmr.o: dmrdefs defs: /usr/include/stdio.h /usr/include/ctype.h ftypes defines locdefs touch defs tokdefs: tokens grep -n . tokdefs locdefs: pdp11defs cp pdp11defs locdefs