From 2b9cd1bd7e11ad6d1fd04d2cb4c9fd04f93b09ab Mon Sep 17 00:00:00 2001 From: tma Date: Tue, 4 Oct 2005 23:54:51 +0000 Subject: * VM game modules now built from the main Makefile git-svn-id: svn://svn.icculus.org/quake3/trunk@138 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/tools/lcc/makefile | 422 ++++++++++++++++++++++++------------------------ 1 file changed, 211 insertions(+), 211 deletions(-) (limited to 'code/tools/lcc/makefile') diff --git a/code/tools/lcc/makefile b/code/tools/lcc/makefile index 1c29f32..58ae84c 100644 --- a/code/tools/lcc/makefile +++ b/code/tools/lcc/makefile @@ -12,7 +12,7 @@ else endif CC=gcc -CFLAGS=-O2 -Wall -fno-strict-aliasing +LCC_CFLAGS=-O2 -Wall -fno-strict-aliasing LDFLAGS= LD=gcc AR=ar ruv @@ -22,7 +22,7 @@ RM=rm -f RMDIR=rmdir BUILDDIR=build TSTDIR=$(BUILDDIR)/$(TARGET)/tst -B=$(BUILDDIR)/ +BD=$(BUILDDIR)/ T=$(TSTDIR)/ # $Id: makefile 145 2001-10-17 21:53:10Z timo $ @@ -36,227 +36,227 @@ makedirs: all:: q3rcc lburg q3cpp q3lcc bprint liblcc -q3rcc: makedirs $Bq3rcc$E -lburg: makedirs $Blburg$E -q3cpp: makedirs $Bq3cpp$E -q3lcc: makedirs $Bq3lcc$E -bprint: makedirs $Bbprint$E -liblcc: makedirs $Bliblcc$A - -RCCOBJS=$Balloc$O \ - $Bbind$O \ - $Bdag$O \ - $Bdagcheck$O \ - $Bdecl$O \ - $Benode$O \ - $Berror$O \ - $Bexpr$O \ - $Bevent$O \ - $Binit$O \ - $Binits$O \ - $Binput$O \ - $Blex$O \ - $Blist$O \ - $Bmain$O \ - $Boutput$O \ - $Bprof$O \ - $Bprofio$O \ - $Bsimp$O \ - $Bstmt$O \ - $Bstring$O \ - $Bsym$O \ - $Btrace$O \ - $Btree$O \ - $Btypes$O \ - $Bnull$O \ - $Bsymbolic$O \ - $Bgen$O \ - $Bbytecode$O - -$Bq3rcc$E:: $Bmain$O $Blibrcc$A $(EXTRAOBJS) - $(LD) $(LDFLAGS) -o $@ $Bmain$O $(EXTRAOBJS) $Blibrcc$A $(EXTRALIBS) - -$Blibrcc$A: $(RCCOBJS) +q3rcc: makedirs $(BD)q3rcc$(E) +lburg: makedirs $(BD)lburg$(E) +q3cpp: makedirs $(BD)q3cpp$(E) +q3lcc: makedirs $(BD)q3lcc$(E) +bprint: makedirs $(BD)bprint$(E) +liblcc: makedirs $(BD)liblcc$(A) + +RCCOBJS=$(BD)alloc$O \ + $(BD)bind$O \ + $(BD)dag$O \ + $(BD)dagcheck$O \ + $(BD)decl$O \ + $(BD)enode$O \ + $(BD)error$O \ + $(BD)expr$O \ + $(BD)event$O \ + $(BD)init$O \ + $(BD)inits$O \ + $(BD)input$O \ + $(BD)lex$O \ + $(BD)list$O \ + $(BD)main$O \ + $(BD)output$O \ + $(BD)prof$O \ + $(BD)profio$O \ + $(BD)simp$O \ + $(BD)stmt$O \ + $(BD)string$O \ + $(BD)sym$O \ + $(BD)trace$O \ + $(BD)tree$O \ + $(BD)types$O \ + $(BD)null$O \ + $(BD)symbolic$O \ + $(BD)gen$O \ + $(BD)bytecode$O + +$(BD)q3rcc$(E):: $(BD)main$O $(BD)librcc$(A) $(EXTRAOBJS) + $(LD) $(LDFLAGS) -o $@ $(BD)main$O $(EXTRAOBJS) $(BD)librcc$(A) $(EXTRALIBS) + +$(BD)librcc$(A): $(RCCOBJS) $(AR) $@ $(RCCOBJS); $(RANLIB) $@ || true $(RCCOBJS): src/c.h src/token.h src/config.h -$Balloc$O: src/alloc.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/alloc.c -$Bbind$O: src/bind.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/bind.c -$Bdag$O: src/dag.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/dag.c -$Bdecl$O: src/decl.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/decl.c -$Benode$O: src/enode.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/enode.c -$Berror$O: src/error.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/error.c -$Bevent$O: src/event.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/event.c -$Bexpr$O: src/expr.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/expr.c -$Bgen$O: src/gen.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/gen.c -$Binit$O: src/init.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/init.c -$Binits$O: src/inits.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/inits.c -$Binput$O: src/input.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/input.c -$Blex$O: src/lex.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/lex.c -$Blist$O: src/list.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/list.c -$Bmain$O: src/main.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/main.c -$Bnull$O: src/null.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/null.c -$Boutput$O: src/output.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/output.c -$Bprof$O: src/prof.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/prof.c -$Bprofio$O: src/profio.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/profio.c -$Bsimp$O: src/simp.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/simp.c -$Bstmt$O: src/stmt.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/stmt.c -$Bstring$O: src/string.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/string.c -$Bsym$O: src/sym.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/sym.c -$Bsymbolic$O: src/symbolic.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/symbolic.c -$Bbytecode$O: src/bytecode.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/bytecode.c -$Btrace$O: src/trace.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/trace.c -$Btree$O: src/tree.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/tree.c -$Btypes$O: src/types.c; $(CC) $(CFLAGS) -c -Isrc -o $@ src/types.c -$Bstab$O: src/stab.c src/stab.h; $(CC) $(CFLAGS) -c -Isrc -o $@ src/stab.c - -$Bdagcheck$O: $Bdagcheck.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bdagcheck.c -$Balpha$O: $Balpha.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Balpha.c -$Bmips$O: $Bmips.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bmips.c -$Bsparc$O: $Bsparc.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bsparc.c -$Bx86$O: $Bx86.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bx86.c -$Bx86linux$O: $Bx86linux.c; $(CC) $(CFLAGS) -c -Isrc -o $@ $Bx86linux.c - -$Bdagcheck.c: $Blburg$E src/dagcheck.md; $Blburg src/dagcheck.md $@ -$Balpha.c: $Blburg$E src/alpha.md; $Blburg src/alpha.md $@ -$Bmips.c: $Blburg$E src/mips.md; $Blburg src/mips.md $@ -$Bsparc.c: $Blburg$E src/sparc.md; $Blburg src/sparc.md $@ -$Bx86.c: $Blburg$E src/x86.md; $Blburg src/x86.md $@ -$Bx86linux.c: $Blburg$E src/x86linux.md; $Blburg src/x86linux.md $@ - -$Bq3rcc.h: src/rcc.asdl; $(ASDL_HOME)/bin/asdlGen --c -d $B src/rcc.asdl -$Bq3rcc$O: $Brcc.h; $(CC) $(CFLAGS) -c -Isrc -I$B -I$(ASDL_HOME)/include/asdlGen -o $@ $Brcc.c -$Basdl$O: src/asdl.c $Brcc.h src/c.h; $(CC) $(CFLAGS) -c -Isrc -I$B -I$(ASDL_HOME)/include/asdlGen -o $@ src/asdl.c -$Bpass2$O: src/pass2.c $Brcc.h src/c.h; $(CC) $(CFLAGS) -c -Isrc -I$B -I$(ASDL_HOME)/include/asdlGen -o $@ src/pass2.c -$B2html$O: src/2html.c $Brcc.h src/c.h; $(CC) $(CFLAGS) -c -Isrc -I$B -I$(ASDL_HOME)/include/asdlGen -o $@ src/2html.c - -$Bpass2$E: $Bpass2$O $(EXTRAOBJS) $Blibrcc$A; $(LD) $(LDFLAGS) -o $@ $Bpass2$O $(EXTRAOBJS) $Blibrcc$A $(EXTRALIBS) -$B2html$E: $B2html$O $Bq3rcc$O; $(LD) $(LDFLAGS) -o $@ $B2html$O $Bq3rcc$O $(EXTRALIBS) - -$Bbprint$E: $Bbprint$O; $(LD) $(LDFLAGS) -o $@ $Bbprint$O - -$Bbprint$O: etc/bprint.c; $(CC) $(CFLAGS) -c -Isrc -o $@ etc/bprint.c - -$Bq3lcc$E: $Bq3lcc$O $Bhost$O; $(LD) $(LDFLAGS) -o $@ $Bq3lcc$O $Bhost$O +$(BD)alloc$O: src/alloc.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/alloc.c +$(BD)bind$O: src/bind.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/bind.c +$(BD)dag$O: src/dag.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/dag.c +$(BD)decl$O: src/decl.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/decl.c +$(BD)enode$O: src/enode.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/enode.c +$(BD)error$O: src/error.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/error.c +$(BD)event$O: src/event.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/event.c +$(BD)expr$O: src/expr.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/expr.c +$(BD)gen$O: src/gen.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/gen.c +$(BD)init$O: src/init.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/init.c +$(BD)inits$O: src/inits.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/inits.c +$(BD)input$O: src/input.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/input.c +$(BD)lex$O: src/lex.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/lex.c +$(BD)list$O: src/list.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/list.c +$(BD)main$O: src/main.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/main.c +$(BD)null$O: src/null.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/null.c +$(BD)output$O: src/output.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/output.c +$(BD)prof$O: src/prof.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/prof.c +$(BD)profio$O: src/profio.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/profio.c +$(BD)simp$O: src/simp.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/simp.c +$(BD)stmt$O: src/stmt.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/stmt.c +$(BD)string$O: src/string.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/string.c +$(BD)sym$O: src/sym.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/sym.c +$(BD)symbolic$O: src/symbolic.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/symbolic.c +$(BD)bytecode$O: src/bytecode.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/bytecode.c +$(BD)trace$O: src/trace.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/trace.c +$(BD)tree$O: src/tree.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/tree.c +$(BD)types$O: src/types.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/types.c +$(BD)stab$O: src/stab.c src/stab.h; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ src/stab.c + +$(BD)dagcheck$O: $(BD)dagcheck.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $(BD)dagcheck.c +$(BD)alpha$O: $(BD)alpha.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $(BD)alpha.c +$(BD)mips$O: $(BD)mips.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $(BD)mips.c +$(BD)sparc$O: $(BD)sparc.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $(BD)sparc.c +$(BD)x86$O: $(BD)x86.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $(BD)x86.c +$(BD)x86linux$O: $(BD)x86linux.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ $(BD)x86linux.c + +$(BD)dagcheck.c: $(BD)lburg$(E) src/dagcheck.md; $(BD)lburg src/dagcheck.md $@ +$(BD)alpha.c: $(BD)lburg$(E) src/alpha.md; $(BD)lburg src/alpha.md $@ +$(BD)mips.c: $(BD)lburg$(E) src/mips.md; $(BD)lburg src/mips.md $@ +$(BD)sparc.c: $(BD)lburg$(E) src/sparc.md; $(BD)lburg src/sparc.md $@ +$(BD)x86.c: $(BD)lburg$(E) src/x86.md; $(BD)lburg src/x86.md $@ +$(BD)x86linux.c: $(BD)lburg$(E) src/x86linux.md; $(BD)lburg src/x86linux.md $@ + +$(BD)q3rcc.h: src/rcc.asdl; $(ASDL_HOME)/bin/asdlGen --c -d $(BD) src/rcc.asdl +$(BD)q3rcc$O: $(BD)rcc.h; $(CC) $(LCC_CFLAGS) -c -Isrc -I$(BD) -I$(ASDL_HOME)/include/asdlGen -o $@ $(BD)rcc.c +$(BD)asdl$O: src/asdl.c $(BD)rcc.h src/c.h; $(CC) $(LCC_CFLAGS) -c -Isrc -I$(BD) -I$(ASDL_HOME)/include/asdlGen -o $@ src/asdl.c +$(BD)pass2$O: src/pass2.c $(BD)rcc.h src/c.h; $(CC) $(LCC_CFLAGS) -c -Isrc -I$(BD) -I$(ASDL_HOME)/include/asdlGen -o $@ src/pass2.c +$(BD)2html$O: src/2html.c $(BD)rcc.h src/c.h; $(CC) $(LCC_CFLAGS) -c -Isrc -I$(BD) -I$(ASDL_HOME)/include/asdlGen -o $@ src/2html.c + +$(BD)pass2$(E): $(BD)pass2$O $(EXTRAOBJS) $(BD)librcc$(A); $(LD) $(LDFLAGS) -o $@ $(BD)pass2$O $(EXTRAOBJS) $(BD)librcc$(A) $(EXTRALIBS) +$(BD)2html$(E): $(BD)2html$O $(BD)q3rcc$O; $(LD) $(LDFLAGS) -o $@ $(BD)2html$O $(BD)q3rcc$O $(EXTRALIBS) + +$(BD)bprint$(E): $(BD)bprint$O; $(LD) $(LDFLAGS) -o $@ $(BD)bprint$O + +$(BD)bprint$O: etc/bprint.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ etc/bprint.c + +$(BD)q3lcc$(E): $(BD)q3lcc$O $(BD)host$O; $(LD) $(LDFLAGS) -o $@ $(BD)q3lcc$O $(BD)host$O SYSTEM=$(shell cc -print-search-dirs | head -n 1 | cut -b 10-) -$Bq3lcc$O: etc/lcc.c; $(CC) $(CFLAGS) -c -DTEMPDIR=\"$(TEMPDIR)\" -o $@ etc/lcc.c -$Bhost$O: $(HOSTFILE); $(CC) $(CFLAGS) -c -DSYSTEM=\"$(SYSTEM)\" -o $@ $(HOSTFILE) +$(BD)q3lcc$O: etc/lcc.c; $(CC) $(LCC_CFLAGS) -c -DTEMPDIR=\"$(TEMPDIR)\" -o $@ etc/lcc.c +$(BD)host$O: $(HOSTFILE); $(CC) $(LCC_CFLAGS) -c -DSYSTEM=\"$(SYSTEM)\" -o $@ $(HOSTFILE) -LIBOBJS=$Bassert$O $Bbbexit$O $Byynull$O +LIBOBJS=$(BD)assert$O $(BD)bbexit$O $(BD)yynull$O -$Bliblcc$A: $(LIBOBJS); $(AR) $@ $Bassert$O $Bbbexit$O $Byynull$O; $(RANLIB) $@ || true +$(BD)liblcc$(A): $(LIBOBJS); $(AR) $@ $(BD)assert$O $(BD)bbexit$O $(BD)yynull$O; $(RANLIB) $@ || true -$Bassert$O: lib/assert.c; $(CC) $(CFLAGS) -c -o $@ lib/assert.c -$Byynull$O: lib/yynull.c; $(CC) $(CFLAGS) -c -o $@ lib/yynull.c -$Bbbexit$O: lib/bbexit.c; $(CC) $(CFLAGS) -c -o $@ lib/bbexit.c +$(BD)assert$O: lib/assert.c; $(CC) $(LCC_CFLAGS) -c -o $@ lib/assert.c +$(BD)yynull$O: lib/yynull.c; $(CC) $(LCC_CFLAGS) -c -o $@ lib/yynull.c +$(BD)bbexit$O: lib/bbexit.c; $(CC) $(LCC_CFLAGS) -c -o $@ lib/bbexit.c -$Blburg$E: $Blburg$O $Bgram$O; $(LD) $(LDFLAGS) -o $@ $Blburg$O $Bgram$O +$(BD)lburg$(E): $(BD)lburg$O $(BD)gram$O; $(LD) $(LDFLAGS) -o $@ $(BD)lburg$O $(BD)gram$O -$Blburg$O $Bgram$O: lburg/lburg.h +$(BD)lburg$O $(BD)gram$O: lburg/lburg.h -$Blburg$O: lburg/lburg.c; $(CC) $(CFLAGS) -c -Ilburg -o $@ lburg/lburg.c -$Bgram$O: lburg/gram.c; $(CC) $(CFLAGS) -c -Ilburg -o $@ lburg/gram.c +$(BD)lburg$O: lburg/lburg.c; $(CC) $(LCC_CFLAGS) -c -Ilburg -o $@ lburg/lburg.c +$(BD)gram$O: lburg/gram.c; $(CC) $(LCC_CFLAGS) -c -Ilburg -o $@ lburg/gram.c -CPPOBJS=$Bq3cpp$O $Blexer$O $Bnlist$O $Btokens$O $Bmacro$O $Beval$O \ - $Binclude$O $Bhideset$O $Bgetopt$O $Bunix$O +CPPOBJS=$(BD)q3cpp$O $(BD)lexer$O $(BD)nlist$O $(BD)tokens$O $(BD)macro$O $(BD)eval$O \ + $(BD)include$O $(BD)hideset$O $(BD)getopt$O $(BD)unix$O -$Bq3cpp$E: $(CPPOBJS) +$(BD)q3cpp$(E): $(CPPOBJS) $(LD) $(LDFLAGS) -o $@ $(CPPOBJS) $(CPPOBJS): cpp/cpp.h -$Bq3cpp$O: cpp/cpp.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/cpp.c -$Blexer$O: cpp/lex.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/lex.c -$Bnlist$O: cpp/nlist.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/nlist.c -$Btokens$O: cpp/tokens.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/tokens.c -$Bmacro$O: cpp/macro.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/macro.c -$Beval$O: cpp/eval.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/eval.c -$Binclude$O: cpp/include.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/include.c -$Bhideset$O: cpp/hideset.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/hideset.c -$Bgetopt$O: cpp/getopt.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/getopt.c -$Bunix$O: cpp/unix.c; $(CC) $(CFLAGS) -c -Icpp -o $@ cpp/unix.c - -test: $T8q.s \ - $Tarray.s \ - $Tcf.s \ - $Tcq.s \ - $Tcvt.s \ - $Tfields.s \ - $Tfront.s \ - $Tincr.s \ - $Tinit.s \ - $Tlimits.s \ - $Tparanoia.s \ - $Tsort.s \ - $Tspill.s \ - $Tstdarg.s \ - $Tstruct.s \ - $Tswitch.s \ - $Twf1.s \ - $Tyacc.s - -$T8q.s: tst/8q.c tst/8q.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tarray.s: tst/array.c tst/array.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tcf.s: tst/cf.c tst/cf.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tcq.s: tst/cq.c tst/cq.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tcvt.s: tst/cvt.c tst/cvt.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tfields.s: tst/fields.c tst/fields.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tfront.s: tst/front.c tst/front.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tincr.s: tst/incr.c tst/incr.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tinit.s: tst/init.c tst/init.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tlimits.s: tst/limits.c tst/limits.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tparanoia.s: tst/paranoia.c tst/paranoia.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tsort.s: tst/sort.c tst/sort.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tspill.s: tst/spill.c tst/spill.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tstdarg.s: tst/stdarg.c tst/stdarg.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tstruct.s: tst/struct.c tst/struct.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tswitch.s: tst/switch.c tst/switch.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Twf1.s: tst/wf1.c tst/wf1.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ -$Tyacc.s: tst/yacc.c tst/yacc.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(BD)q3cpp$O: cpp/cpp.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/cpp.c +$(BD)lexer$O: cpp/lex.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/lex.c +$(BD)nlist$O: cpp/nlist.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/nlist.c +$(BD)tokens$O: cpp/tokens.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/tokens.c +$(BD)macro$O: cpp/macro.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/macro.c +$(BD)eval$O: cpp/eval.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/eval.c +$(BD)include$O: cpp/include.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/include.c +$(BD)hideset$O: cpp/hideset.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/hideset.c +$(BD)getopt$O: cpp/getopt.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/getopt.c +$(BD)unix$O: cpp/unix.c; $(CC) $(LCC_CFLAGS) -c -Icpp -o $@ cpp/unix.c + +test: $(T)8q.s \ + $(T)array.s \ + $(T)cf.s \ + $(T)cq.s \ + $(T)cvt.s \ + $(T)fields.s \ + $(T)front.s \ + $(T)incr.s \ + $(T)init.s \ + $(T)limits.s \ + $(T)paranoia.s \ + $(T)sort.s \ + $(T)spill.s \ + $(T)stdarg.s \ + $(T)struct.s \ + $(T)switch.s \ + $(T)wf1.s \ + $(T)yacc.s + +$(T)8q.s: tst/8q.c tst/8q.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)array.s: tst/array.c tst/array.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)cf.s: tst/cf.c tst/cf.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)cq.s: tst/cq.c tst/cq.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)cvt.s: tst/cvt.c tst/cvt.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)fields.s: tst/fields.c tst/fields.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)front.s: tst/front.c tst/front.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)incr.s: tst/incr.c tst/incr.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)init.s: tst/init.c tst/init.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)limits.s: tst/limits.c tst/limits.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)paranoia.s: tst/paranoia.c tst/paranoia.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)sort.s: tst/sort.c tst/sort.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)spill.s: tst/spill.c tst/spill.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)stdarg.s: tst/stdarg.c tst/stdarg.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)struct.s: tst/struct.c tst/struct.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)switch.s: tst/switch.c tst/switch.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)wf1.s: tst/wf1.c tst/wf1.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ +$(T)yacc.s: tst/yacc.c tst/yacc.0 all; @env BUILDDIR=$(BUILDDIR) TSTDIR=$(TSTDIR) src/run.sh $@ testclean: - $(RM) $T8q$E $T8q.s $T8q.2 $T8q.1 - $(RM) $Tarray$E $Tarray.s $Tarray.2 $Tarray.1 - $(RM) $Tcf$E $Tcf.s $Tcf.2 $Tcf.1 - $(RM) $Tcq$E $Tcq.s $Tcq.2 $Tcq.1 - $(RM) $Tcvt$E $Tcvt.s $Tcvt.2 $Tcvt.1 - $(RM) $Tfields$E $Tfields.s $Tfields.2 $Tfields.1 - $(RM) $Tfront$E $Tfront.s $Tfront.2 $Tfront.1 - $(RM) $Tincr$E $Tincr.s $Tincr.2 $Tincr.1 - $(RM) $Tinit$E $Tinit.s $Tinit.2 $Tinit.1 - $(RM) $Tlimits$E $Tlimits.s $Tlimits.2 $Tlimits.1 - $(RM) $Tparanoia$E $Tparanoia.s $Tparanoia.2 $Tparanoia.1 - $(RM) $Tsort$E $Tsort.s $Tsort.2 $Tsort.1 - $(RM) $Tspill$E $Tspill.s $Tspill.2 $Tspill.1 - $(RM) $Tstdarg$E $Tstdarg.s $Tstdarg.2 $Tstdarg.1 - $(RM) $Tstruct$E $Tstruct.s $Tstruct.2 $Tstruct.1 - $(RM) $Tswitch$E $Tswitch.s $Tswitch.2 $Tswitch.1 - $(RM) $Twf1$E $Twf1.s $Twf1.2 $Twf1.1 - $(RM) $Tyacc$E $Tyacc.s $Tyacc.2 $Tyacc.1 + $(RM) $(T)8q$(E) $(T)8q.s $(T)8q.2 $(T)8q.1 + $(RM) $(T)array$(E) $(T)array.s $(T)array.2 $(T)array.1 + $(RM) $(T)cf$(E) $(T)cf.s $(T)cf.2 $(T)cf.1 + $(RM) $(T)cq$(E) $(T)cq.s $(T)cq.2 $(T)cq.1 + $(RM) $(T)cvt$(E) $(T)cvt.s $(T)cvt.2 $(T)cvt.1 + $(RM) $(T)fields$(E) $(T)fields.s $(T)fields.2 $(T)fields.1 + $(RM) $(T)front$(E) $(T)front.s $(T)front.2 $(T)front.1 + $(RM) $(T)incr$(E) $(T)incr.s $(T)incr.2 $(T)incr.1 + $(RM) $(T)init$(E) $(T)init.s $(T)init.2 $(T)init.1 + $(RM) $(T)limits$(E) $(T)limits.s $(T)limits.2 $(T)limits.1 + $(RM) $(T)paranoia$(E) $(T)paranoia.s $(T)paranoia.2 $(T)paranoia.1 + $(RM) $(T)sort$(E) $(T)sort.s $(T)sort.2 $(T)sort.1 + $(RM) $(T)spill$(E) $(T)spill.s $(T)spill.2 $(T)spill.1 + $(RM) $(T)stdarg$(E) $(T)stdarg.s $(T)stdarg.2 $(T)stdarg.1 + $(RM) $(T)struct$(E) $(T)struct.s $(T)struct.2 $(T)struct.1 + $(RM) $(T)switch$(E) $(T)switch.s $(T)switch.2 $(T)switch.1 + $(RM) $(T)wf1$(E) $(T)wf1.s $(T)wf1.2 $(T)wf1.1 + $(RM) $(T)yacc$(E) $(T)yacc.s $(T)yacc.2 $(T)yacc.1 install:: all - install -s -m 0755 $Bq3lcc$E ../ - install -s -m 0755 $Bq3cpp$E ../ - install -s -m 0755 $Bq3rcc$E ../ + install -s -m 0755 $(BD)q3lcc$(E) ../ + install -s -m 0755 $(BD)q3cpp$(E) ../ + install -s -m 0755 $(BD)q3rcc$(E) ../ uninstall:: - -$(RM) ../q3lcc$E - -$(RM) ../q3cpp$E - -$(RM) ../q3rcc$E + -$(RM) ../q3lcc$(E) + -$(RM) ../q3cpp$(E) + -$(RM) ../q3rcc$(E) clean:: testclean - $(RM) $B*$O - $(RM) $Bdagcheck.c $Balpha.c $Bmips.c $Bx86.c $Bsparc.c $Bx86linux.c $Bgram.c - $(RM) $Brcc.c $Brcc.h - $(RM) $Brcc1$E $Brcc1$E $B1rcc$E $B2rcc$E - $(RM) $B*.ilk + $(RM) $(BD)*$O + $(RM) $(BD)dagcheck.c $(BD)alpha.c $(BD)mips.c $(BD)x86.c $(BD)sparc.c $(BD)x86linux.c $(BD)gram.c + $(RM) $(BD)rcc.c $(BD)rcc.h + $(RM) $(BD)rcc1$(E) $(BD)rcc1$(E) $(BD)1rcc$(E) $(BD)2rcc$(E) + $(RM) $(BD)*.ilk clobber:: clean - $(RM) $Bq3rcc$E $B2html$E $Bpass2$E $Blburg$E $Bq3cpp$E $Bq3lcc$E $Bbprint$E $B*$A - $(RM) $B*.pdb $B*.pch + $(RM) $(BD)q3rcc$(E) $(BD)2html$(E) $(BD)pass2$(E) $(BD)lburg$(E) $(BD)q3cpp$(E) $(BD)q3lcc$(E) $(BD)bprint$(E) $(BD)*$(A) + $(RM) $(BD)*.pdb $(BD)*.pch RCCSRCS=src/alloc.c \ src/bind.c \ @@ -287,20 +287,20 @@ RCCSRCS=src/alloc.c \ src/bytecode.c \ src/gen.c \ src/stab.c \ - $Bdagcheck.c \ - $Balpha.c \ - $Bmips.c \ - $Bsparc.c \ - $Bx86linux.c \ - $Bx86.c - -C=$Bq3lcc -A -d0.6 -Wo-lccdir=$(BUILDDIR) -Isrc -I$(BUILDDIR) -triple: $Bq3rcc$E $Bq3lcc$E $Bq3cpp$E - $C -o $B1rcc$E -B$B $(RCCSRCS) - $C -o $B2rcc$E -B$B1 $(RCCSRCS) - strip $B1rcc$E $B2rcc$E - dd if=$B1rcc$E of=$Brcc1$E bs=512 skip=1 - dd if=$B2rcc$E of=$Brcc2$E bs=512 skip=1 - if cmp $Brcc1$E $Brcc2$E; then \ - mv $B2rcc$E $Bq3rcc$E; \ - $(RM) $B1rcc$E $Bq3rcc[12]$E; fi + $(BD)dagcheck.c \ + $(BD)alpha.c \ + $(BD)mips.c \ + $(BD)sparc.c \ + $(BD)x86linux.c \ + $(BD)x86.c + +C=$(BD)q3lcc -A -d0.6 -Wo-lccdir=$(BUILDDIR) -Isrc -I$(BUILDDIR) +triple: $(BD)q3rcc$(E) $(BD)q3lcc$(E) $(BD)q3cpp$(E) + $C -o $(BD)1rcc$(E) -B$(BD) $(RCCSRCS) + $C -o $(BD)2rcc$(E) -B$(BD)1 $(RCCSRCS) + strip $(BD)1rcc$(E) $(BD)2rcc$(E) + dd if=$(BD)1rcc$(E) of=$(BD)rcc1$(E) bs=512 skip=1 + dd if=$(BD)2rcc$(E) of=$(BD)rcc2$(E) bs=512 skip=1 + if cmp $(BD)rcc1$(E) $(BD)rcc2$(E); then \ + mv $(BD)2rcc$(E) $(BD)q3rcc$(E); \ + $(RM) $(BD)1rcc$(E) $(BD)q3rcc[12]$(E); fi -- cgit v1.2.3