# $Header$ # M A K E F I L E F O R A C K C - C O M P I L E R # Machine and environ dependent definitions EMHOME = ../../.. MKDEP = $(EMHOME)/bin/mkdep PRID = $(EMHOME)/bin/prid CID = $(EMHOME)/bin/cid # Libraries and EM interface definitions SYSLIB = $(EMHOME)/modules/lib/libsystem.a EMKLIB = $(EMHOME)/modules/lib/libemk.a EMELIB = $(EMHOME)/modules/lib/libeme.a STRLIB = $(EMHOME)/modules/lib/libstring.a PRTLIB = $(EMHOME)/modules/lib/libprint.a EMMESLIB = $(EMHOME)/modules/lib/libem_mes.a INPLIB = $(EMHOME)/modules/lib/libinput.a ALLOCLIB = $(EMHOME)/modules/lib/liballoc.a MALLOC = $(EMHOME)/modules/lib/malloc.o LIBS = $(INPLIB) $(EMMESLIB) $(EMKLIB) $(PRTLIB) $(STRLIB) \ $(ALLOCLIB) $(MALLOC) $(SYSLIB) ELIBS = $(INPLIB) $(EMMESLIB) $(EMELIB) $(PRTLIB) $(STRLIB) \ $(ALLOCLIB) $(MALLOC) $(SYSLIB) LIB_INCLUDES = -I$(EMHOME)/modules/h -I$(EMHOME)/modules/pkg EM_INCLUDES = -I$(EMHOME)/h SYSLLIB = $(EMHOME)/modules/lib/llib-lsys.ln EMKLLIB = $(EMHOME)/modules/lib/llib-lemk.ln EMELLIB = $(EMHOME)/modules/lib/llib-leme.ln STRLLIB = $(EMHOME)/modules/lib/llib-lstr.ln PRTLLIB = $(EMHOME)/modules/lib/llib-lprint.ln EMMESLLIB = $(EMHOME)/modules/lib/llib-lmes.ln INPLLIB = $(EMHOME)/modules/lib/llib-linput.ln ALLOCLLIB = $(EMHOME)/modules/lib/llib-lalloc.ln LINTLIBS = #LINTLIBS = $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(SYSLLIB) $(ALLOCLLIB) CURRDIR = . COPTIONS = # What parser generator to use and how GEN = $(EMHOME)/bin/LLgen GENOPTIONS = -v # Special #defines during compilation CDEFS = $(EM_INCLUDES) $(LIB_INCLUDES) CFLAGS = $(CDEFS) $(COPTIONS) -O LDFLAGS = -i # Grammar files and their objects LSRC = tokenfile.g declar.g statement.g expression.g program.g ival.g LCSRC = tokenfile.c declar.c statement.c expression.c program.c Lpars.c ival.c LOBJ = tokenfile.o declar.o statement.o expression.o program.o Lpars.o ival.o # Objects of hand-written C files CSRC = main.c idf.c declarator.c decspecs.c struct.c \ expr.c ch7.c ch7bin.c cstoper.c arith.c \ asm.c code.c dumpidf.c error.c field.c\ tokenname.c LLlex.c LLmessage.c \ input.c domacro.c replace.c init.c options.c \ scan.c skip.c stack.c type.c ch7mon.c label.c eval.c \ switch.c conversion.c \ blocks.c dataflow.c Version.c COBJ = main.o idf.o declarator.o decspecs.o struct.o \ expr.o ch7.o ch7bin.o cstoper.o arith.o \ asm.o code.o dumpidf.o error.o field.o\ tokenname.o LLlex.o LLmessage.o \ input.o domacro.o replace.o init.o options.o \ scan.o skip.o stack.o type.o ch7mon.o label.o eval.o \ switch.o conversion.o \ blocks.o dataflow.o Version.o # Objects of other generated C files GCSRC = char.c symbol2str.c next.c GOBJ = char.o symbol2str.o next.o STRSRC = code.str declar.str decspecs.str def.str expr.str field.str \ estack.str \ idf.str macro.str stack.str stmt.str struct.str switch.str type.str # generated source files GHSTRSRC = code.h declar.h decspecs.h def.h expr.h field.h \ estack.h \ idf.h macro.h stack.h stmt.h struct.h switch.h type.h GSRC = $(GCSRC) $(GHSTRSRC) # .h files generated by `make hfiles LLfiles'; PLEASE KEEP THIS UP-TO-DATE! GHSRC = botch_free.h dataflow.h debug.h density.h errout.h \ idfsize.h ifdepth.h inputtype.h lapbuf.h \ nobitfield.h nofloat.h nopp.h noRoption.h nocross.h \ nparams.h numsize.h parbufsize.h pathlength.h Lpars.h \ strsize.h target_sizes.h textsize.h use_tmp.h spec_arith.h static.h HSRC = LLlex.h align.h arith.h assert.h atw.h class.h faulty.h \ input.h interface.h label.h level.h mes.h sizes.h specials.h \ file_info.h tokenname.h HFILES = $(HSRC) $(GHSRC) $(GHSTRSRC) # generated files, for 'make clean' only GENERATED = tab tokenfile.g Lpars.h LLfiles LL.output lint.out \ print Xref lxref hfiles Cfiles $(GHSRC) $(GSRC) longnames $(LCSRC) # include files containing ALLOCDEF specifications OBJ = $(COBJ) $(LOBJ) $(GOBJ) SRC = $(CSRC) $(LCSRC) $(GCSRC) #EXCLEXCLEXCLEXCL .SUFFIXES: .str .h .str.h: ./make.allocd <$*.str >$*.h Main: Cfiles sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make $(CURRDIR)/main ; else sh Resolve main ; fi' @rm -f nmclash.o a.out Emain: Cfiles sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make $(CURRDIR)/emain ; else sh Resolve emain ; fi' @rm -f nmclash.o a.out install: Main rm -f $(EMHOME)/lib/em_cemcom $(EMHOME)/man/em_cemcom.6 cp $(CURRDIR)/main $(EMHOME)/lib/em_cemcom cp $(CURRDIR)/cemcom.1 $(EMHOME)/man/em_cemcom.6 cmp: Main -cmp $(CURRDIR)/main $(EMHOME)/lib/em_cemcom -cmp $(CURRDIR)/cemcom.1 $(EMHOME)/man/em_cemcom.6 pr: @pr makefile make.* tab.c char.tab Parameters $(HSRC) $(STRSRC) $(LSRC) $(CSRC) opr: make pr | opr clean: rm -f $(OBJ) $(GENERATED) main (cd .. ; rm -rf Xsrc) lint: Cfiles sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make Xlint ; else sh Resolve Xlint ; fi' @rm -f nmclash.o a.out longnames: $(SRC) $(HFILES) sh -c 'if test -f longnames ; then : ; else touch longnames ; fi ; $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames' # entry points not to be used directly Cfiles: hfiles LLfiles $(GENCFILES) $(GSRC) $(GHSRC) makefile echo $(SRC) $(HFILES) > Cfiles hfiles: ./make.hfiles Parameters ./make.hfiles Parameters @touch hfiles LLfiles: $(LSRC) $(GEN) $(GENOPTIONS) $(LSRC) @touch LLfiles tokenfile.g: tokenname.c make.tokfile tokenfile.g symbol2str.c: tokenname.c make.tokcase symbol2str.c char.c: tab char.tab tab -fchar.tab >char.c tab: $(CC) tab.c -o tab next.c: make.next $(STRSRC) ./make.next $(STRSRC) >next.c code.h: make.allocd declar.h: make.allocd decspecs.h: make.allocd def.h: make.allocd expr.h: make.allocd field.h: make.allocd idf.h: make.allocd macro.h: make.allocd stack.h: make.allocd stmt.h: make.allocd struct.h: make.allocd switch.h: make.allocd type.h: make.allocd estack.h: make.allocd depend: Cfiles sed '/^#AUTOAUTO/,$$d' makefile >makefile.new echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >>makefile.new $(MKDEP) $(SRC) | sed 's/\.c:/.o:/' >>makefile.new mv makefile makefile.old mv makefile.new makefile #INCLINCLINCLINCL $(CURRDIR)/main: $(OBJ) $(CURRDIR)/makefile $(CC) $(COPTIONS) $(LDFLAGS) $(OBJ) $(LIBS) -o $(CURRDIR)/main size $(CURRDIR)/main $(CURRDIR)/emain: $(OBJ) $(CURRDIR)/makefile $(CC) $(COPTIONS) $(LDFLAGS) $(OBJ) $(ELIBS) -o $(CURRDIR)/emain size $(CURRDIR)/emain Xlint: lint $(CDEFS) $(LINTFLAGS) $(SRC) #AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO main.o: LLlex.h main.o: Lpars.h main.o: align.h main.o: arith.h main.o: debug.h main.o: declar.h main.o: file_info.h main.o: idf.h main.o: input.h main.o: inputtype.h main.o: level.h main.o: noRoption.h main.o: nobitfield.h main.o: nocross.h main.o: nofloat.h main.o: nopp.h main.o: sizes.h main.o: spec_arith.h main.o: specials.h main.o: target_sizes.h main.o: tokenname.h main.o: type.h main.o: use_tmp.h idf.o: LLlex.h idf.o: Lpars.h idf.o: align.h idf.o: arith.h idf.o: assert.h idf.o: botch_free.h idf.o: debug.h idf.o: declar.h idf.o: decspecs.h idf.o: def.h idf.o: file_info.h idf.o: idf.h idf.o: idfsize.h idf.o: label.h idf.o: level.h idf.o: noRoption.h idf.o: nobitfield.h idf.o: nocross.h idf.o: nofloat.h idf.o: nopp.h idf.o: sizes.h idf.o: spec_arith.h idf.o: specials.h idf.o: stack.h idf.o: struct.h idf.o: target_sizes.h idf.o: type.h declarator.o: Lpars.h declarator.o: arith.h declarator.o: botch_free.h declarator.o: declar.h declarator.o: expr.h declarator.o: idf.h declarator.o: label.h declarator.o: nobitfield.h declarator.o: nocross.h declarator.o: nofloat.h declarator.o: nopp.h declarator.o: sizes.h declarator.o: spec_arith.h declarator.o: target_sizes.h declarator.o: type.h decspecs.o: Lpars.h decspecs.o: arith.h decspecs.o: decspecs.h decspecs.o: def.h decspecs.o: level.h decspecs.o: noRoption.h decspecs.o: nobitfield.h decspecs.o: nofloat.h decspecs.o: spec_arith.h decspecs.o: type.h struct.o: LLlex.h struct.o: Lpars.h struct.o: align.h struct.o: arith.h struct.o: assert.h struct.o: botch_free.h struct.o: debug.h struct.o: def.h struct.o: field.h struct.o: file_info.h struct.o: idf.h struct.o: level.h struct.o: noRoption.h struct.o: nobitfield.h struct.o: nocross.h struct.o: nofloat.h struct.o: nopp.h struct.o: sizes.h struct.o: spec_arith.h struct.o: stack.h struct.o: struct.h struct.o: target_sizes.h struct.o: type.h expr.o: LLlex.h expr.o: Lpars.h expr.o: arith.h expr.o: botch_free.h expr.o: declar.h expr.o: decspecs.h expr.o: def.h expr.o: expr.h expr.o: file_info.h expr.o: idf.h expr.o: label.h expr.o: level.h expr.o: noRoption.h expr.o: nobitfield.h expr.o: nocross.h expr.o: nofloat.h expr.o: nopp.h expr.o: sizes.h expr.o: spec_arith.h expr.o: target_sizes.h expr.o: type.h ch7.o: Lpars.h ch7.o: arith.h ch7.o: assert.h ch7.o: debug.h ch7.o: def.h ch7.o: expr.h ch7.o: idf.h ch7.o: label.h ch7.o: nobitfield.h ch7.o: nofloat.h ch7.o: nopp.h ch7.o: spec_arith.h ch7.o: struct.h ch7.o: type.h ch7bin.o: Lpars.h ch7bin.o: arith.h ch7bin.o: botch_free.h ch7bin.o: expr.h ch7bin.o: idf.h ch7bin.o: label.h ch7bin.o: noRoption.h ch7bin.o: nobitfield.h ch7bin.o: nofloat.h ch7bin.o: nopp.h ch7bin.o: spec_arith.h ch7bin.o: struct.h ch7bin.o: type.h cstoper.o: Lpars.h cstoper.o: arith.h cstoper.o: assert.h cstoper.o: debug.h cstoper.o: expr.h cstoper.o: idf.h cstoper.o: label.h cstoper.o: nobitfield.h cstoper.o: nocross.h cstoper.o: nofloat.h cstoper.o: nopp.h cstoper.o: sizes.h cstoper.o: spec_arith.h cstoper.o: target_sizes.h cstoper.o: type.h arith.o: Lpars.h arith.o: arith.h arith.o: botch_free.h arith.o: expr.h arith.o: field.h arith.o: idf.h arith.o: label.h arith.o: mes.h arith.o: noRoption.h arith.o: nobitfield.h arith.o: nofloat.h arith.o: nopp.h arith.o: spec_arith.h arith.o: type.h code.o: LLlex.h code.o: Lpars.h code.o: align.h code.o: arith.h code.o: assert.h code.o: atw.h code.o: botch_free.h code.o: code.h code.o: dataflow.h code.o: debug.h code.o: declar.h code.o: decspecs.h code.o: def.h code.o: expr.h code.o: file_info.h code.o: idf.h code.o: label.h code.o: level.h code.o: mes.h code.o: noRoption.h code.o: nobitfield.h code.o: nocross.h code.o: nofloat.h code.o: nopp.h code.o: sizes.h code.o: spec_arith.h code.o: specials.h code.o: stack.h code.o: stmt.h code.o: target_sizes.h code.o: type.h code.o: use_tmp.h dumpidf.o: Lpars.h dumpidf.o: arith.h dumpidf.o: debug.h dumpidf.o: def.h dumpidf.o: expr.h dumpidf.o: field.h dumpidf.o: idf.h dumpidf.o: label.h dumpidf.o: nobitfield.h dumpidf.o: nofloat.h dumpidf.o: nopp.h dumpidf.o: spec_arith.h dumpidf.o: stack.h dumpidf.o: static.h dumpidf.o: struct.h dumpidf.o: type.h error.o: LLlex.h error.o: arith.h error.o: debug.h error.o: errout.h error.o: expr.h error.o: file_info.h error.o: label.h error.o: nofloat.h error.o: nopp.h error.o: spec_arith.h error.o: tokenname.h error.o: use_tmp.h field.o: Lpars.h field.o: arith.h field.o: assert.h field.o: code.h field.o: debug.h field.o: expr.h field.o: field.h field.o: idf.h field.o: label.h field.o: nobitfield.h field.o: nocross.h field.o: nofloat.h field.o: nopp.h field.o: sizes.h field.o: spec_arith.h field.o: target_sizes.h field.o: type.h tokenname.o: LLlex.h tokenname.o: Lpars.h tokenname.o: arith.h tokenname.o: file_info.h tokenname.o: idf.h tokenname.o: nofloat.h tokenname.o: nopp.h tokenname.o: spec_arith.h tokenname.o: tokenname.h LLlex.o: LLlex.h LLlex.o: Lpars.h LLlex.o: arith.h LLlex.o: assert.h LLlex.o: class.h LLlex.o: debug.h LLlex.o: def.h LLlex.o: file_info.h LLlex.o: idf.h LLlex.o: idfsize.h LLlex.o: input.h LLlex.o: nocross.h LLlex.o: nofloat.h LLlex.o: nopp.h LLlex.o: numsize.h LLlex.o: sizes.h LLlex.o: spec_arith.h LLlex.o: strsize.h LLlex.o: target_sizes.h LLmessage.o: LLlex.h LLmessage.o: Lpars.h LLmessage.o: arith.h LLmessage.o: file_info.h LLmessage.o: idf.h LLmessage.o: nofloat.h LLmessage.o: nopp.h LLmessage.o: spec_arith.h input.o: file_info.h input.o: input.h input.o: inputtype.h input.o: nopp.h domacro.o: LLlex.h domacro.o: Lpars.h domacro.o: arith.h domacro.o: assert.h domacro.o: botch_free.h domacro.o: class.h domacro.o: debug.h domacro.o: file_info.h domacro.o: idf.h domacro.o: idfsize.h domacro.o: ifdepth.h domacro.o: input.h domacro.o: interface.h domacro.o: macro.h domacro.o: nofloat.h domacro.o: nopp.h domacro.o: nparams.h domacro.o: parbufsize.h domacro.o: spec_arith.h domacro.o: textsize.h replace.o: LLlex.h replace.o: arith.h replace.o: assert.h replace.o: class.h replace.o: debug.h replace.o: file_info.h replace.o: idf.h replace.o: input.h replace.o: interface.h replace.o: macro.h replace.o: nofloat.h replace.o: nopp.h replace.o: pathlength.h replace.o: spec_arith.h replace.o: static.h replace.o: strsize.h init.o: class.h init.o: idf.h init.o: interface.h init.o: macro.h init.o: nopp.h options.o: align.h options.o: arith.h options.o: botch_free.h options.o: class.h options.o: dataflow.h options.o: idf.h options.o: idfsize.h options.o: macro.h options.o: noRoption.h options.o: nobitfield.h options.o: nocross.h options.o: nofloat.h options.o: nopp.h options.o: sizes.h options.o: spec_arith.h options.o: target_sizes.h options.o: use_tmp.h scan.o: class.h scan.o: idf.h scan.o: input.h scan.o: interface.h scan.o: lapbuf.h scan.o: macro.h scan.o: nopp.h scan.o: nparams.h skip.o: LLlex.h skip.o: arith.h skip.o: class.h skip.o: file_info.h skip.o: input.h skip.o: interface.h skip.o: nofloat.h skip.o: nopp.h skip.o: spec_arith.h stack.o: Lpars.h stack.o: arith.h stack.o: botch_free.h stack.o: debug.h stack.o: def.h stack.o: idf.h stack.o: level.h stack.o: mes.h stack.o: noRoption.h stack.o: nobitfield.h stack.o: nofloat.h stack.o: nopp.h stack.o: spec_arith.h stack.o: stack.h stack.o: struct.h stack.o: type.h type.o: Lpars.h type.o: align.h type.o: arith.h type.o: botch_free.h type.o: def.h type.o: idf.h type.o: nobitfield.h type.o: nocross.h type.o: nofloat.h type.o: nopp.h type.o: sizes.h type.o: spec_arith.h type.o: target_sizes.h type.o: type.h ch7mon.o: Lpars.h ch7mon.o: arith.h ch7mon.o: botch_free.h ch7mon.o: def.h ch7mon.o: expr.h ch7mon.o: idf.h ch7mon.o: label.h ch7mon.o: nobitfield.h ch7mon.o: nofloat.h ch7mon.o: nopp.h ch7mon.o: spec_arith.h ch7mon.o: type.h label.o: Lpars.h label.o: arith.h label.o: def.h label.o: idf.h label.o: label.h label.o: level.h label.o: noRoption.h label.o: nobitfield.h label.o: nofloat.h label.o: nopp.h label.o: spec_arith.h label.o: type.h eval.o: Lpars.h eval.o: align.h eval.o: arith.h eval.o: assert.h eval.o: atw.h eval.o: code.h eval.o: dataflow.h eval.o: debug.h eval.o: def.h eval.o: expr.h eval.o: idf.h eval.o: label.h eval.o: level.h eval.o: mes.h eval.o: nobitfield.h eval.o: nocross.h eval.o: nofloat.h eval.o: nopp.h eval.o: sizes.h eval.o: spec_arith.h eval.o: stack.h eval.o: target_sizes.h eval.o: type.h switch.o: Lpars.h switch.o: arith.h switch.o: assert.h switch.o: botch_free.h switch.o: code.h switch.o: debug.h switch.o: density.h switch.o: expr.h switch.o: idf.h switch.o: label.h switch.o: noRoption.h switch.o: nobitfield.h switch.o: nofloat.h switch.o: nopp.h switch.o: spec_arith.h switch.o: switch.h switch.o: type.h conversion.o: Lpars.h conversion.o: arith.h conversion.o: nobitfield.h conversion.o: nocross.h conversion.o: nofloat.h conversion.o: sizes.h conversion.o: spec_arith.h conversion.o: target_sizes.h conversion.o: type.h blocks.o: align.h blocks.o: arith.h blocks.o: atw.h blocks.o: label.h blocks.o: nocross.h blocks.o: nofloat.h blocks.o: sizes.h blocks.o: spec_arith.h blocks.o: stack.h blocks.o: target_sizes.h dataflow.o: dataflow.h tokenfile.o: Lpars.h declar.o: LLlex.h declar.o: Lpars.h declar.o: arith.h declar.o: debug.h declar.o: declar.h declar.o: decspecs.h declar.o: def.h declar.o: expr.h declar.o: field.h declar.o: file_info.h declar.o: idf.h declar.o: label.h declar.o: level.h declar.o: nobitfield.h declar.o: nocross.h declar.o: nofloat.h declar.o: nopp.h declar.o: sizes.h declar.o: spec_arith.h declar.o: struct.h declar.o: target_sizes.h declar.o: type.h statement.o: LLlex.h statement.o: Lpars.h statement.o: arith.h statement.o: botch_free.h statement.o: code.h statement.o: debug.h statement.o: def.h statement.o: expr.h statement.o: file_info.h statement.o: idf.h statement.o: label.h statement.o: nobitfield.h statement.o: nofloat.h statement.o: nopp.h statement.o: spec_arith.h statement.o: stack.h statement.o: type.h expression.o: LLlex.h expression.o: Lpars.h expression.o: arith.h expression.o: expr.h expression.o: file_info.h expression.o: idf.h expression.o: label.h expression.o: noRoption.h expression.o: nobitfield.h expression.o: nofloat.h expression.o: nopp.h expression.o: spec_arith.h expression.o: type.h program.o: LLlex.h program.o: Lpars.h program.o: arith.h program.o: code.h program.o: declar.h program.o: decspecs.h program.o: def.h program.o: expr.h program.o: file_info.h program.o: idf.h program.o: label.h program.o: nobitfield.h program.o: nofloat.h program.o: nopp.h program.o: spec_arith.h program.o: type.h Lpars.o: Lpars.h ival.o: LLlex.h ival.o: Lpars.h ival.o: align.h ival.o: arith.h ival.o: assert.h ival.o: class.h ival.o: debug.h ival.o: def.h ival.o: estack.h ival.o: expr.h ival.o: field.h ival.o: file_info.h ival.o: idf.h ival.o: label.h ival.o: level.h ival.o: noRoption.h ival.o: nobitfield.h ival.o: nocross.h ival.o: nofloat.h ival.o: nopp.h ival.o: sizes.h ival.o: spec_arith.h ival.o: struct.h ival.o: target_sizes.h ival.o: type.h char.o: class.h symbol2str.o: Lpars.h