# This file is in the public domain. CC = wgcc -g VFLAG = -V CFLAGS = $(VFLAG) $(OPT) USERDRIVER = clk # rk11 STDDRIVER = reg cons ltc BINS = as11 disas11 pdp11 OBJ_as11 = as11.o asm-parse.o htable.o copyof.o heapsort.o OBJ_disas11 = deftbl.o disas.o disas11.o heapsort.o OBJ_pdp11 = $(STDDRIVER:C/$/.o/) $(USERDRIVER:C/$/.o/) deftbl.o disas.o\ drivers.o finstrs.o heapsort.o instr-aux.o instrs.o odt.o pdp11.o PREDEPEND = CLEANFILES = *.o SHARSRC =\ README\ *.doc\ KDJ11-A KDJ11-A.instrs.byname KDJ11-A.instrs.byvalue\ Makefile\ *.fsm\ *.c\ *.h\ *.s11\ inc .SUFFIXES: .s11 .l11 .o11 .MAIN: as11 disas11 pdp11 test.o11 .for b in $(BINS) $b: $(OBJ_$(b)) $(CC) -o $b $(OBJ_$b) $(TRACE) CLEANFILES += $b .endfor asm-parse.c: asm-parse.fsm fsm < asm-parse.fsm > asm-parse.c CLEANFILES += asm-parse.c PREDEPEND += asm-parse.c .PHONY: pdp11.shar pdp11.shar: shar -o pdp11.shar -r $(SHARSRC) pdp11.shar.gz: pdp11.shar gzip --best < pdp11.shar > pdp11.shar.gz pdp11.shar.gz.btoa: pdp11.shar.gz btoa < pdp11.shar.gz > pdp11.shar.gz.btoa CLEANFILES += pdp1.shar* fcvt-exptab: fcvt-exptab-gen fcvt-exptab-gen > fcvt-exptab PREDEPEND += fcvt-exptab CLEANFILES += fcvt-exptab fcvt-exptab-gen: fcvt-exptab-gen.c $(CC) -o fcvt-exptab-gen fcvt-exptab-gen.c $(TRACE) CLEANFILES += fcvt-exptab-gen fcvt-mantbits: fcvt-mantbits-gen fcvt-mantbits-gen > fcvt-mantbits PREDEPEND += fcvt-mantbits CLEANFILES += fcvt-mantbits fcvt-mantbits-gen: fcvt-mantbits-gen.c $(CC) -o fcvt-mantbits-gen fcvt-mantbits-gen.c $(TRACE) CLEANFILES += fcvt-mantbits-gen # grrr, some (most? all?) makes don't listen to the dependency on as11 on these next two lines.... # not much to do about it, though! .s11.o11: as11 as11 -o $*.o11 -l $*.l11 $*.s11 .s11.l11: as11 as11 -o $*.o11 -l $*.l11 $*.s11 CLEANFILES += *.l11 *.o11 .PHONY: depend depend: $(PREDEPEND) mkdep $(CFLAGS) *.c CLEANFILES += .depend .PHONY: clean clean: rm -f $(CLEANFILES)