From 41cbd8c9fd6b14086a8099388638c4ac7cc1322f Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Tue, 4 Oct 2005 23:54:51 +0000 Subject: [PATCH] * VM game modules now built from the main Makefile --- Makefile | 4 +- code/tools/lcc/makefile | 396 ++++++++++++++++++++-------------------- code/unix/Makefile | 291 ++++++++++++++++------------- code/unix/Makefile.Game | 285 ----------------------------- 4 files changed, 362 insertions(+), 614 deletions(-) delete mode 100644 code/unix/Makefile.Game diff --git a/Makefile b/Makefile index ecec8f23..380005e2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION=1.33_SVN$(shell LANG=C svnversion .) -release debug clean: +release debug clean distclean: $(MAKE) -C code/unix $@ dist: @@ -9,4 +9,4 @@ dist: tar --force-local -cjf quake3-$(VERSION).tar.bz2 quake3-$(VERSION) rm -rf quake3-$(VERSION) -.PHONY: release debug clean +.PHONY: release debug clean distclean diff --git a/code/tools/lcc/makefile b/code/tools/lcc/makefile index 1c29f327..58ae84cb 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 +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=$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 +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 -$Bq3rcc$E:: $Bmain$O $Blibrcc$A $(EXTRAOBJS) - $(LD) $(LDFLAGS) -o $@ $Bmain$O $(EXTRAOBJS) $Blibrcc$A $(EXTRALIBS) +$(BD)q3rcc$(E):: $(BD)main$O $(BD)librcc$(A) $(EXTRAOBJS) + $(LD) $(LDFLAGS) -o $@ $(BD)main$O $(EXTRAOBJS) $(BD)librcc$(A) $(EXTRALIBS) -$Blibrcc$A: $(RCCOBJS) +$(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 +$(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 -$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 +$(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 -$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 $@ +$(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 $@ -$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 +$(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 -$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) +$(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) -$Bbprint$E: $Bbprint$O; $(LD) $(LDFLAGS) -o $@ $Bbprint$O +$(BD)bprint$(E): $(BD)bprint$O; $(LD) $(LDFLAGS) -o $@ $(BD)bprint$O -$Bbprint$O: etc/bprint.c; $(CC) $(CFLAGS) -c -Isrc -o $@ etc/bprint.c +$(BD)bprint$O: etc/bprint.c; $(CC) $(LCC_CFLAGS) -c -Isrc -o $@ etc/bprint.c -$Bq3lcc$E: $Bq3lcc$O $Bhost$O; $(LD) $(LDFLAGS) -o $@ $Bq3lcc$O $Bhost$O +$(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 +$(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: $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 +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 -$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 $@ +$(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 + $(BD)dagcheck.c \ + $(BD)alpha.c \ + $(BD)mips.c \ + $(BD)sparc.c \ + $(BD)x86linux.c \ + $(BD)x86.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 +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 diff --git a/code/unix/Makefile b/code/unix/Makefile index d56a0cf6..8b3ed9c1 100644 --- a/code/unix/Makefile +++ b/code/unix/Makefile @@ -194,12 +194,12 @@ ifeq ($(PLATFORM),linux) $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) \ -# $(B)/baseq3/vm/qagame.qvm \ -# $(B)/baseq3/vm/cgame.qvm \ -# $(B)/baseq3/vm/ui.qvm \ -# $(B)/missionpack/vm/qagame.qvm \ -# $(B)/missionpack/vm/cgame.qvm \ -# $(B)/missionpack/vm/ui.qvm + $(B)/baseq3/vm/cgame.qvm \ + $(B)/baseq3/vm/qagame.qvm \ + $(B)/baseq3/vm/ui.qvm \ + $(B)/missionpack/vm/qagame.qvm \ + $(B)/missionpack/vm/cgame.qvm \ + $(B)/missionpack/vm/ui.qvm # $(B)/$(PLATFORM)quake3-smp \ endif @@ -244,6 +244,8 @@ ifeq ($(PLATFORM),mingw32) SHLIBCFLAGS= SHLIBLDFLAGS=-shared $(LDFLAGS) + BINEXT=.exe + LDFLAGS= -mwindows -lwsock32 -lgdi32 -lwinmm -lole32 GLLDFLAGS= @@ -266,13 +268,13 @@ ifeq ($(PLATFORM),mingw32) $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \ $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ - $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) -# $(B)/baseq3/vm/qagame.qvm \ -# $(B)/baseq3/vm/cgame.qvm \ -# $(B)/baseq3/vm/ui.qvm \ -# $(B)/missionpack/vm/qagame.qvm \ -# $(B)/missionpack/vm/cgame.qvm \ -# $(B)/missionpack/vm/ui.qvm + $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) \ + $(B)/baseq3/vm/cgame.qvm \ + $(B)/baseq3/vm/qagame.qvm \ + $(B)/baseq3/vm/ui.qvm \ + $(B)/missionpack/vm/qagame.qvm \ + $(B)/missionpack/vm/cgame.qvm \ + $(B)/missionpack/vm/ui.qvm else # ifeq mingw32 @@ -325,12 +327,19 @@ ifeq ($(PLATFORM),freebsd) else TARGETS=\ $(B)/$(PLATFORM)quake3 \ + $(B)/$(PLATFORM)q3ded \ $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \ $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \ $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \ $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ - $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) + $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) \ + $(B)/baseq3/vm/cgame.qvm \ + $(B)/baseq3/vm/qagame.qvm \ + $(B)/baseq3/vm/ui.qvm \ + $(B)/missionpack/vm/qagame.qvm \ + $(B)/missionpack/vm/cgame.qvm \ + $(B)/missionpack/vm/ui.qvm endif else # ifeq freebsd @@ -357,8 +366,8 @@ ifeq ($(PLATFORM),irix) LDFLAGS=-ldl -lm GLLDFLAGS=-L/usr/X11/$(LIB) -lGL -lX11 -lXext -lm - TARGETS=$(B)/sgiquake3 \ - $(B)/q3ded + TARGETS=$(B)/$(PLATFORM)quake3 \ + $(B)/$(PLATFORM)q3ded else # ifeq IRIX @@ -404,9 +413,25 @@ DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< DO_DED_CC=$(CC) -DDEDICATED -DC_ONLY $(CFLAGS) -o $@ -c $< DO_WINDRES=$(WINDRES) -i $< -o $@ -#DO_LCC=$(LCC) -o $@ -S -Wf-target=bytecode -Wf-g -DQ3_VM -I$(CGDIR) -I$(GDIR) -I$(UIDIR) $< +############################################################################# +# QVM BUILD TOOLS +############################################################################# + +Q3LCC=../tools/q3lcc$(BINEXT) +Q3ASM=../tools/q3asm$(BINEXT) + +$(Q3LCC): + $(MAKE) -C ../tools/lcc install + +$(Q3ASM): + $(MAKE) -C ../tools/asm install + +DO_Q3LCC=$(Q3LCC) -o $@ -S -DQ3_VM -I$(CGDIR) -I$(GDIR) -I$(UIDIR) $< + +############################################################################# +# MAIN TARGETS +############################################################################# -#### DEFAULT TARGET default:build_release debug: build_debug @@ -1054,41 +1079,13 @@ $(B)/ded/vm_none.o : $(CMDIR)/vm_none.c; $(DO_DED_CC) $(B)/ded/$(VM_PPC).o : $(CMDIR)/$(VM_PPC).c; $(DO_DED_CC) -############################################################################# -## QVM -############################################################################# - -$(B)/baseq3/vm/cgame.qvm: - cd $(CGDIR) && ./cgame.sh - mv /tmp/quake3/baseq3/vm/cgame.qvm $@ - -$(B)/baseq3/vm/ui.qvm: - cd $(Q3UIDIR) && ./q3_ui.sh - mv /tmp/quake3/baseq3/vm/ui.qvm $@ - -$(B)/baseq3/vm/qagame.qvm: - cd $(GDIR) && ./game.sh - mv /tmp/quake3/baseq3/vm/qagame.qvm $@ - -$(B)/missionpack/vm/cgame.qvm: - cd $(CGDIR) && ./cgame_ta.sh - mv /tmp/quake3/missionpack/vm/cgame.qvm $@ - -$(B)/missionpack/vm/qagame.qvm: - cd $(GDIR) && ./game_ta.sh - mv /tmp/quake3/missionpack/vm/qagame.qvm $@ - -$(B)/missionpack/vm/ui.qvm: - cd $(UIDIR) && ./ui.sh - mv /tmp/quake3/missionpack/vm/ui.qvm $@ - - ############################################################################# ## BASEQ3 CGAME ############################################################################# -Q3CGOBJ = \ +Q3CGOBJ_ = \ + $(B)/baseq3/cgame/cg_main.o \ $(B)/baseq3/game/bg_misc.o \ $(B)/baseq3/game/bg_pmove.o \ $(B)/baseq3/game/bg_slidemove.o \ @@ -1100,7 +1097,6 @@ Q3CGOBJ = \ $(B)/baseq3/cgame/cg_event.o \ $(B)/baseq3/cgame/cg_info.o \ $(B)/baseq3/cgame/cg_localents.o \ - $(B)/baseq3/cgame/cg_main.o \ $(B)/baseq3/cgame/cg_marks.o \ $(B)/baseq3/cgame/cg_players.o \ $(B)/baseq3/cgame/cg_playerstate.o \ @@ -1108,20 +1104,26 @@ Q3CGOBJ = \ $(B)/baseq3/cgame/cg_scoreboard.o \ $(B)/baseq3/cgame/cg_servercmds.o \ $(B)/baseq3/cgame/cg_snapshot.o \ - $(B)/baseq3/cgame/cg_syscalls.o \ $(B)/baseq3/cgame/cg_view.o \ $(B)/baseq3/cgame/cg_weapons.o \ $(B)/baseq3/game/q_math.o \ $(B)/baseq3/game/q_shared.o +Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o +Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm + $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) +$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM) + $(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm + ############################################################################# ## MISSIONPACK CGAME ############################################################################# -MPCGOBJ = \ +MPCGOBJ_ = \ + $(B)/missionpack/cgame/cg_main.o \ $(B)/missionpack/game/bg_misc.o \ $(B)/missionpack/game/bg_pmove.o \ $(B)/missionpack/game/bg_slidemove.o \ @@ -1134,7 +1136,6 @@ MPCGOBJ = \ $(B)/missionpack/cgame/cg_event.o \ $(B)/missionpack/cgame/cg_info.o \ $(B)/missionpack/cgame/cg_localents.o \ - $(B)/missionpack/cgame/cg_main.o \ $(B)/missionpack/cgame/cg_marks.o \ $(B)/missionpack/cgame/cg_players.o \ $(B)/missionpack/cgame/cg_playerstate.o \ @@ -1142,23 +1143,29 @@ MPCGOBJ = \ $(B)/missionpack/cgame/cg_scoreboard.o \ $(B)/missionpack/cgame/cg_servercmds.o \ $(B)/missionpack/cgame/cg_snapshot.o \ - $(B)/missionpack/cgame/cg_syscalls.o \ $(B)/missionpack/cgame/cg_view.o \ $(B)/missionpack/cgame/cg_weapons.o \ $(B)/missionpack/game/q_math.o \ $(B)/missionpack/game/q_shared.o \ $(B)/missionpack/ui/ui_shared.o +MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o +MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm + $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ) +$(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm $(Q3ASM) + $(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm + ############################################################################# ## BASEQ3 GAME ############################################################################# -Q3GOBJ = \ +Q3GOBJ_ = \ + $(B)/baseq3/game/g_main.o \ $(B)/baseq3/game/ai_chat.o \ $(B)/baseq3/game/ai_cmd.o \ $(B)/baseq3/game/ai_dmnet.o \ @@ -1176,7 +1183,6 @@ Q3GOBJ = \ $(B)/baseq3/game/g_cmds.o \ $(B)/baseq3/game/g_combat.o \ $(B)/baseq3/game/g_items.o \ - $(B)/baseq3/game/g_main.o \ $(B)/baseq3/game/g_mem.o \ $(B)/baseq3/game/g_misc.o \ $(B)/baseq3/game/g_missile.o \ @@ -1184,7 +1190,6 @@ Q3GOBJ = \ $(B)/baseq3/game/g_session.o \ $(B)/baseq3/game/g_spawn.o \ $(B)/baseq3/game/g_svcmds.o \ - $(B)/baseq3/game/g_syscalls.o \ $(B)/baseq3/game/g_target.o \ $(B)/baseq3/game/g_team.o \ $(B)/baseq3/game/g_trigger.o \ @@ -1194,14 +1199,21 @@ Q3GOBJ = \ $(B)/baseq3/game/q_math.o \ $(B)/baseq3/game/q_shared.o +Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o +Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm + $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) +$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM) + $(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm + ############################################################################# ## MISSIONPACK GAME ############################################################################# -MPGOBJ = \ +MPGOBJ_ = \ + $(B)/missionpack/game/g_main.o \ $(B)/missionpack/game/ai_chat.o \ $(B)/missionpack/game/ai_cmd.o \ $(B)/missionpack/game/ai_dmnet.o \ @@ -1219,7 +1231,6 @@ MPGOBJ = \ $(B)/missionpack/game/g_cmds.o \ $(B)/missionpack/game/g_combat.o \ $(B)/missionpack/game/g_items.o \ - $(B)/missionpack/game/g_main.o \ $(B)/missionpack/game/g_mem.o \ $(B)/missionpack/game/g_misc.o \ $(B)/missionpack/game/g_missile.o \ @@ -1227,7 +1238,6 @@ MPGOBJ = \ $(B)/missionpack/game/g_session.o \ $(B)/missionpack/game/g_spawn.o \ $(B)/missionpack/game/g_svcmds.o \ - $(B)/missionpack/game/g_syscalls.o \ $(B)/missionpack/game/g_target.o \ $(B)/missionpack/game/g_team.o \ $(B)/missionpack/game/g_trigger.o \ @@ -1237,74 +1247,84 @@ MPGOBJ = \ $(B)/missionpack/game/q_math.o \ $(B)/missionpack/game/q_shared.o +MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o +MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm + $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ) +$(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM) + $(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm + ############################################################################# ## BASEQ3 UI ############################################################################# -Q3UIOBJ = \ - $(B)/baseq3/game/bg_misc.o \ - $(B)/baseq3/ui/ui_addbots.o \ - $(B)/baseq3/ui/ui_atoms.o \ - $(B)/baseq3/ui/ui_cdkey.o \ - $(B)/baseq3/ui/ui_cinematics.o \ - $(B)/baseq3/ui/ui_confirm.o \ - $(B)/baseq3/ui/ui_connect.o \ - $(B)/baseq3/ui/ui_controls2.o \ - $(B)/baseq3/ui/ui_credits.o \ - $(B)/baseq3/ui/ui_demo2.o \ - $(B)/baseq3/ui/ui_display.o \ - $(B)/baseq3/ui/ui_gameinfo.o \ - $(B)/baseq3/ui/ui_ingame.o \ - $(B)/baseq3/ui/ui_loadconfig.o \ - $(B)/baseq3/ui/ui_main.o \ - $(B)/baseq3/ui/ui_menu.o \ - $(B)/baseq3/ui/ui_mfield.o \ - $(B)/baseq3/ui/ui_mods.o \ - $(B)/baseq3/ui/ui_network.o \ - $(B)/baseq3/ui/ui_options.o \ - $(B)/baseq3/ui/ui_playermodel.o \ - $(B)/baseq3/ui/ui_players.o \ - $(B)/baseq3/ui/ui_playersettings.o \ - $(B)/baseq3/ui/ui_preferences.o \ - $(B)/baseq3/ui/ui_qmenu.o \ - $(B)/baseq3/ui/ui_removebots.o \ - $(B)/baseq3/ui/ui_saveconfig.o \ - $(B)/baseq3/ui/ui_serverinfo.o \ - $(B)/baseq3/ui/ui_servers2.o \ - $(B)/baseq3/ui/ui_setup.o \ - $(B)/baseq3/ui/ui_sound.o \ - $(B)/baseq3/ui/ui_sparena.o \ - $(B)/baseq3/ui/ui_specifyserver.o \ - $(B)/baseq3/ui/ui_splevel.o \ - $(B)/baseq3/ui/ui_sppostgame.o \ - $(B)/baseq3/ui/ui_spskill.o \ - $(B)/baseq3/ui/ui_startserver.o \ - $(B)/missionpack/ui/ui_syscalls.o \ - $(B)/baseq3/ui/ui_team.o \ - $(B)/baseq3/ui/ui_teamorders.o \ - $(B)/baseq3/ui/ui_video.o \ - \ - $(B)/baseq3/game/q_math.o \ - $(B)/baseq3/game/q_shared.o +Q3UIOBJ_ = \ + $(B)/baseq3/ui/ui_main.o \ + $(B)/baseq3/game/bg_misc.o \ + $(B)/baseq3/ui/ui_addbots.o \ + $(B)/baseq3/ui/ui_atoms.o \ + $(B)/baseq3/ui/ui_cdkey.o \ + $(B)/baseq3/ui/ui_cinematics.o \ + $(B)/baseq3/ui/ui_confirm.o \ + $(B)/baseq3/ui/ui_connect.o \ + $(B)/baseq3/ui/ui_controls2.o \ + $(B)/baseq3/ui/ui_credits.o \ + $(B)/baseq3/ui/ui_demo2.o \ + $(B)/baseq3/ui/ui_display.o \ + $(B)/baseq3/ui/ui_gameinfo.o \ + $(B)/baseq3/ui/ui_ingame.o \ + $(B)/baseq3/ui/ui_loadconfig.o \ + $(B)/baseq3/ui/ui_menu.o \ + $(B)/baseq3/ui/ui_mfield.o \ + $(B)/baseq3/ui/ui_mods.o \ + $(B)/baseq3/ui/ui_network.o \ + $(B)/baseq3/ui/ui_options.o \ + $(B)/baseq3/ui/ui_playermodel.o \ + $(B)/baseq3/ui/ui_players.o \ + $(B)/baseq3/ui/ui_playersettings.o \ + $(B)/baseq3/ui/ui_preferences.o \ + $(B)/baseq3/ui/ui_qmenu.o \ + $(B)/baseq3/ui/ui_removebots.o \ + $(B)/baseq3/ui/ui_saveconfig.o \ + $(B)/baseq3/ui/ui_serverinfo.o \ + $(B)/baseq3/ui/ui_servers2.o \ + $(B)/baseq3/ui/ui_setup.o \ + $(B)/baseq3/ui/ui_sound.o \ + $(B)/baseq3/ui/ui_sparena.o \ + $(B)/baseq3/ui/ui_specifyserver.o \ + $(B)/baseq3/ui/ui_splevel.o \ + $(B)/baseq3/ui/ui_sppostgame.o \ + $(B)/baseq3/ui/ui_spskill.o \ + $(B)/baseq3/ui/ui_startserver.o \ + $(B)/baseq3/ui/ui_team.o \ + $(B)/baseq3/ui/ui_teamorders.o \ + $(B)/baseq3/ui/ui_video.o \ + \ + $(B)/baseq3/game/q_math.o \ + $(B)/baseq3/game/q_shared.o + +Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o +Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ) $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) +$(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM) + $(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm + ############################################################################# ## MISSIONPACK UI ############################################################################# -MPUIOBJ = \ +MPUIOBJ_ = \ + $(B)/missionpack/ui/ui_main.o \ $(B)/missionpack/ui/ui_atoms.o \ $(B)/missionpack/ui/ui_gameinfo.o \ - $(B)/missionpack/ui/ui_main.o \ $(B)/missionpack/ui/ui_players.o \ - $(B)/missionpack/ui/ui_syscalls.o \ $(B)/missionpack/ui/ui_util.o \ $(B)/missionpack/ui/ui_shared.o \ \ @@ -1313,9 +1333,15 @@ MPUIOBJ = \ $(B)/missionpack/game/q_math.o \ $(B)/missionpack/game/q_shared.o +MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o +MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm + $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ) $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ) +$(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm $(Q3ASM) + $(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm + ############################################################################# @@ -1325,21 +1351,41 @@ $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ) $(B)/baseq3/cgame/%.o: $(CGDIR)/%.c $(DO_SHLIB_CC) +$(B)/baseq3/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) + $(B)/missionpack/cgame/%.o: $(CGDIR)/%.c $(DO_SHLIB_CC) -DMISSIONPACK +$(B)/missionpack/cgame/%.asm: $(CGDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) -DMISSIONPACK + + $(B)/baseq3/game/%.o: $(GDIR)/%.c $(DO_SHLIB_CC) +$(B)/baseq3/game/%.asm: $(GDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) + $(B)/missionpack/game/%.o: $(GDIR)/%.c $(DO_SHLIB_CC) -DMISSIONPACK +$(B)/missionpack/game/%.asm: $(GDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) -DMISSIONPACK + + $(B)/baseq3/ui/%.o: $(Q3UIDIR)/%.c $(DO_SHLIB_CC) +$(B)/baseq3/ui/%.asm: $(Q3UIDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) + $(B)/missionpack/ui/%.o: $(UIDIR)/%.c $(DO_SHLIB_CC) -DMISSIONPACK +$(B)/missionpack/ui/%.asm: $(UIDIR)/%.c $(Q3LCC) + $(DO_Q3LCC) -DMISSIONPACK + ############################################################################# @@ -1367,31 +1413,14 @@ copyfiles: install -s -m 0755 $(BR)/missionpack/ui$(ARCH).$(SHLIBEXT) \ $(COPYDIR)/missionpack/. -# TTimo: FIXME: doesn't clean the binary and .so - clean:clean-debug clean-release -clean2: clean-bins - rm -f $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) $(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) - rm -f $(CGDIR)/vm/*.asm - rm -f $(GDIR)/vm/*.asm - rm -f $(UIDIR)/vm/*.asm - rm -f $(Q3UIDIR)/vm/*.asm - -# TTimo: linuxq3ded linuxquake3 linuxquake3-smp .. hardcoded the names .. maybe not such a good thing -# FIXME: also, removing the *.so is crappy .. I just want to avoid rm -rf debugi386-glibc to save the symlinks to pk3's for testing -clean-bins: - if [ -d $(B) ];then (find $(B) -name '*.so' -exec rm {} \;)fi - rm -f $(B)/linuxq3ded - rm -f $(B)/linuxquake3 - rm -f $(B)/linuxquake3-smp - rm -f $(B)/baseq3/vm/cgame.qvm - rm -f $(B)/baseq3/vm/ui.qvm - rm -f $(B)/baseq3/vm/qagame.qvm - rm -f $(B)/missionpack/vm/cgame.qvm - rm -f $(B)/missionpack/vm/qagame.qvm - rm -f $(B)/missionpack/vm/ui.qvm +clean2: if [ -d $(B) ];then (find $(B) -name '*.d' -exec rm {} \;)fi + rm -f $(Q3OBJ) $(Q3POBJ) $(Q3POBJ_SMP) $(Q3DOBJ) \ + $(MPGOBJ) $(Q3GOBJ) $(Q3CGOBJ) $(MPCGOBJ) $(Q3UIOBJ) $(MPUIOBJ) \ + $(MPGVMOBJ) $(Q3GVMOBJ) $(Q3CGVMOBJ) $(MPCGVMOBJ) $(Q3UIVMOBJ) $(MPUIVMOBJ) + rm -f $(TARGETS) clean-debug: $(MAKE) clean2 B=$(BD) CFLAGS="$(DEBUG_CFLAGS)" @@ -1399,6 +1428,10 @@ clean-debug: clean-release: $(MAKE) clean2 B=$(BR) CFLAGS="$(DEBUG_CFLAGS)" +distclean: clean + $(MAKE) -C ../tools/asm clean uninstall + $(MAKE) -C ../tools/lcc clean uninstall + ############################################################################# # DEPENDENCIES ############################################################################# diff --git a/code/unix/Makefile.Game b/code/unix/Makefile.Game deleted file mode 100644 index 8f460ec6..00000000 --- a/code/unix/Makefile.Game +++ /dev/null @@ -1,285 +0,0 @@ -# -# Quake3 Unix Game Makefile -# -# GNU Make required -# - -### -### These paths are where you probably want to change things -### - -#The main Quake3 directory -BDIR=.. - -#This is the game dir -GAMEDIR=baseq3 - -#Where the source is, assumed to be same directory as this Makefile -SRCDIR=. - -#Location of binaries -BINDIR=../bin -LCC=$(BINDIR)/lcc # -lccdir=$(BINDIR)/ -Q3ASM=$(BINDIR)/q3asm - - -############################################################################# -## -## You shouldn't have to touch anything below here -## -############################################################################# - -GDIR=$(SRCDIR)/game -CGDIR=$(SRCDIR)/cgame -UIDIR=$(SRCDIR)/ui - -LCCFLAGS=-DQ3_VM -S -Wf-target=bytecode -Wf-g -I..\cgame -I..\game -I..\ui - -DO_LCC=$(LCC) $(LCCFLAGS) -o $@ -c $< - -TARGETS=\ - $(BDIR)/$(GAMEDIR)/vm/cgame.qvm \ - $(BDIR)/$(GAMEDIR)/vm/qagame.qvm \ - $(BDIR)/$(GAMEDIR)/vm/ui.qvm - -default: makedir $(TARGETS) - -makedir: - @-mkdir $(GDIR)/vm - @-mkdir $(CGDIR)/vm - @-mkdir $(UIDIR)/vm - -############################################################################# -# GAME VM -############################################################################# - -##NOTE: g_main must be first. Control passes to first function in the vm - -GVMASM = \ - $(GDIR)/vm/g_main.asm \ - $(GDIR)/vm/bg_misc.asm \ - $(GDIR)/vm/bg_lib.asm \ - $(GDIR)/vm/bg_pmove.asm \ - $(GDIR)/vm/bg_slidemove.asm \ - $(GDIR)/vm/q_math.asm \ - $(GDIR)/vm/q_shared.asm \ - $(GDIR)/vm/ai_dmnet.asm \ - $(GDIR)/vm/ai_dmq3.asm \ - $(GDIR)/vm/ai_team.asm \ - $(GDIR)/vm/ai_main.asm \ - $(GDIR)/vm/ai_chat.asm \ - $(GDIR)/vm/ai_cmd.asm \ - $(GDIR)/vm/g_active.asm \ - $(GDIR)/vm/g_arenas.asm \ - $(GDIR)/vm/g_bot.asm \ - $(GDIR)/vm/g_client.asm \ - $(GDIR)/vm/g_cmds.asm \ - $(GDIR)/vm/g_combat.asm \ - $(GDIR)/vm/g_items.asm \ - $(GDIR)/vm/g_mem.asm \ - $(GDIR)/vm/g_misc.asm \ - $(GDIR)/vm/g_missile.asm \ - $(GDIR)/vm/g_mover.asm \ - $(GDIR)/vm/g_session.asm \ - $(GDIR)/vm/g_spawn.asm \ - $(GDIR)/vm/g_svcmds.asm \ - $(GDIR)/vm/g_target.asm \ - $(GDIR)/vm/g_team.asm \ - $(GDIR)/vm/g_trigger.asm \ - $(GDIR)/vm/g_utils.asm \ - $(GDIR)/vm/g_weapon.asm - -$(BDIR)/$(GAMEDIR)/vm/qagame.qvm : $(GVMASM) - $(Q3ASM) -o $@ $(GVMASM) $(SRCDIR)/game/g_syscalls.asm - -$(GDIR)/vm/ai_chat.asm : $(GDIR)/ai_chat.c; $(DO_LCC) -$(GDIR)/vm/ai_cmd.asm : $(GDIR)/ai_cmd.c; $(DO_LCC) -$(GDIR)/vm/ai_dmnet.asm : $(GDIR)/ai_dmnet.c; $(DO_LCC) -$(GDIR)/vm/ai_dmq3.asm : $(GDIR)/ai_dmq3.c; $(DO_LCC) -$(GDIR)/vm/ai_main.asm : $(GDIR)/ai_main.c; $(DO_LCC) -$(GDIR)/vm/ai_team.asm : $(GDIR)/ai_team.c; $(DO_LCC) -$(GDIR)/vm/bg_lib.asm : $(GDIR)/bg_lib.c; $(DO_LCC) -$(GDIR)/vm/bg_misc.asm : $(GDIR)/bg_misc.c; $(DO_LCC) -$(GDIR)/vm/bg_pmove.asm : $(GDIR)/bg_pmove.c; $(DO_LCC) -$(GDIR)/vm/bg_slidemove.asm : $(GDIR)/bg_slidemove.c; $(DO_LCC) -$(GDIR)/vm/g_active.asm : $(GDIR)/g_active.c; $(DO_LCC) -$(GDIR)/vm/g_arenas.asm : $(GDIR)/g_arenas.c; $(DO_LCC) -$(GDIR)/vm/g_bot.asm : $(GDIR)/g_bot.c; $(DO_LCC) -$(GDIR)/vm/g_client.asm : $(GDIR)/g_client.c; $(DO_LCC) -$(GDIR)/vm/g_cmds.asm : $(GDIR)/g_cmds.c; $(DO_LCC) -$(GDIR)/vm/g_combat.asm : $(GDIR)/g_combat.c; $(DO_LCC) -$(GDIR)/vm/g_items.asm : $(GDIR)/g_items.c; $(DO_LCC) -$(GDIR)/vm/g_main.asm : $(GDIR)/g_main.c; $(DO_LCC) -$(GDIR)/vm/g_mem.asm : $(GDIR)/g_mem.c; $(DO_LCC) -$(GDIR)/vm/g_misc.asm : $(GDIR)/g_misc.c; $(DO_LCC) -$(GDIR)/vm/g_missile.asm : $(GDIR)/g_missile.c; $(DO_LCC) -$(GDIR)/vm/g_mover.asm : $(GDIR)/g_mover.c; $(DO_LCC) -$(GDIR)/vm/g_session.asm : $(GDIR)/g_session.c; $(DO_LCC) -$(GDIR)/vm/g_spawn.asm : $(GDIR)/g_spawn.c; $(DO_LCC) -$(GDIR)/vm/g_svcmds.asm : $(GDIR)/g_svcmds.c; $(DO_LCC) -$(GDIR)/vm/g_target.asm : $(GDIR)/g_target.c; $(DO_LCC) -$(GDIR)/vm/g_team.asm : $(GDIR)/g_team.c; $(DO_LCC) -$(GDIR)/vm/g_trigger.asm : $(GDIR)/g_trigger.c; $(DO_LCC) -$(GDIR)/vm/g_utils.asm : $(GDIR)/g_utils.c; $(DO_LCC) -$(GDIR)/vm/g_weapon.asm : $(GDIR)/g_weapon.c; $(DO_LCC) -$(GDIR)/vm/q_math.asm : $(GDIR)/q_math.c; $(DO_LCC) -$(GDIR)/vm/q_shared.asm : $(GDIR)/q_shared.c; $(DO_LCC) - -$(BDIR)/$(GAMEDIR)/vm/cgame.qvm : - echo cgame.qvm disabled - -$(BDIR)/$(GAMEDIR)/vm/ui.qvm : - echo ui.qvm disabled - -############################################################################# -# CGAME -############################################################################# - -CGOBJ = \ - $(SRCDIR)/cgame/bg_lib.o \ - $(SRCDIR)/cgame/bg_misc.o \ - $(SRCDIR)/cgame/bg_pmove.o \ - $(SRCDIR)/cgame/bg_slidemove.o \ - $(SRCDIR)/cgame/cg_consolecmds.o \ - $(SRCDIR)/cgame/cg_draw.o \ - $(SRCDIR)/cgame/cg_drawtools.o \ - $(SRCDIR)/cgame/cg_effects.o \ - $(SRCDIR)/cgame/cg_ents.o \ - $(SRCDIR)/cgame/cg_event.o \ - $(SRCDIR)/cgame/cg_info.o \ - $(SRCDIR)/cgame/cg_localents.o \ - $(SRCDIR)/cgame/cg_main.o \ - $(SRCDIR)/cgame/cg_marks.o \ - $(SRCDIR)/cgame/cg_players.o \ - $(SRCDIR)/cgame/cg_playerstate.o \ - $(SRCDIR)/cgame/cg_predict.o \ - $(SRCDIR)/cgame/cg_scoreboard.o \ - $(SRCDIR)/cgame/cg_servercmds.o \ - $(SRCDIR)/cgame/cg_snapshot.o \ - $(SRCDIR)/cgame/cg_view.o \ - $(SRCDIR)/cgame/cg_weapons.o \ - $(SRCDIR)/cgame/q_math.o \ - $(SRCDIR)/cgame/q_shared.o - -$(SRCDIR)/cgame$(ARCH).$(SHLIBEXT) : $(CGOBJ) - $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CGOBJ) - -$(SRCDIR)/cgame/bg_lib.o : $(GDIR)/bg_lib.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/bg_pmove.o : $(GDIR)/bg_pmove.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/bg_slidemove.o : $(GDIR)/bg_slidemove.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_consolecmds.o : $(CGDIR)/cg_consolecmds.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_draw.o : $(CGDIR)/cg_draw.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_drawtools.o : $(CGDIR)/cg_drawtools.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_effects.o : $(CGDIR)/cg_effects.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_ents.o : $(CGDIR)/cg_ents.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_event.o : $(CGDIR)/cg_event.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_info.o : $(CGDIR)/cg_info.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_localents.o : $(CGDIR)/cg_localents.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_main.o : $(CGDIR)/cg_main.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_marks.o : $(CGDIR)/cg_marks.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_players.o : $(CGDIR)/cg_players.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_playerstate.o : $(CGDIR)/cg_playerstate.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_predict.o : $(CGDIR)/cg_predict.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_scoreboard.o : $(CGDIR)/cg_scoreboard.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_servercmds.o : $(CGDIR)/cg_servercmds.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_snapshot.o : $(CGDIR)/cg_snapshot.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_view.o : $(CGDIR)/cg_view.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/cg_weapons.o : $(CGDIR)/cg_weapons.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/q_math.o : $(GDIR)/q_math.c; $(DO_SHLIB_CC) -$(SRCDIR)/cgame/q_shared.o : $(GDIR)/q_shared.c; $(DO_SHLIB_CC) - -############################################################################# -# UI -############################################################################# - -UIOBJ = \ - $(SRCDIR)/ui/bg_lib.o \ - $(SRCDIR)/ui/bg_misc.o \ - $(SRCDIR)/ui/ui_addbots.o \ - $(SRCDIR)/ui/ui_atoms.o \ - $(SRCDIR)/ui/ui_cinematics.o \ - $(SRCDIR)/ui/ui_confirm.o \ - $(SRCDIR)/ui/ui_connect.o \ - $(SRCDIR)/ui/ui_controls2.o \ - $(SRCDIR)/ui/ui_credits.o \ - $(SRCDIR)/ui/ui_demo2.o \ - $(SRCDIR)/ui/ui_display.o \ - $(SRCDIR)/ui/ui_gameinfo.o \ - $(SRCDIR)/ui/ui_ingame.o \ - $(SRCDIR)/ui/ui_loadconfig.o \ - $(SRCDIR)/ui/ui_main.o \ - $(SRCDIR)/ui/ui_menu.o \ - $(SRCDIR)/ui/ui_mfield.o \ - $(SRCDIR)/ui/ui_network.o \ - $(SRCDIR)/ui/ui_playermodel.o \ - $(SRCDIR)/ui/ui_players.o \ - $(SRCDIR)/ui/ui_playersettings.o \ - $(SRCDIR)/ui/ui_preferences.o \ - $(SRCDIR)/ui/ui_qmenu.o \ - $(SRCDIR)/ui/ui_saveconfig.o \ - $(SRCDIR)/ui/ui_serverinfo.o \ - $(SRCDIR)/ui/ui_servers2.o \ - $(SRCDIR)/ui/ui_setup.o \ - $(SRCDIR)/ui/ui_sound.o \ - $(SRCDIR)/ui/ui_sparena.o \ - $(SRCDIR)/ui/ui_specifyserver.o \ - $(SRCDIR)/ui/ui_splevel.o \ - $(SRCDIR)/ui/ui_sppostgame.o \ - $(SRCDIR)/ui/ui_spskill.o \ - $(SRCDIR)/ui/ui_startserver.o \ - $(SRCDIR)/ui/ui_team.o \ - $(SRCDIR)/ui/ui_video.o \ - \ - $(SRCDIR)/ui/q_math.o \ - $(SRCDIR)/ui/q_shared.o - -$(SRCDIR)/ui$(ARCH).$(SHLIBEXT) : $(UIOBJ) - $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(UIOBJ) - -$(SRCDIR)/ui/bg_lib.o : $(GDIR)/bg_lib.c; $(DO_CC) -$(SRCDIR)/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_CC) -$(SRCDIR)/ui/ui_addbots.o : $(UIDIR)/ui_addbots.c; $(DO_CC) -$(SRCDIR)/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_CC) -$(SRCDIR)/ui/ui_cinematics.o : $(UIDIR)/ui_cinematics.c; $(DO_CC) -$(SRCDIR)/ui/ui_confirm.o : $(UIDIR)/ui_confirm.c; $(DO_CC) -$(SRCDIR)/ui/ui_connect.o : $(UIDIR)/ui_connect.c; $(DO_CC) -$(SRCDIR)/ui/ui_controls2.o : $(UIDIR)/ui_controls2.c; $(DO_CC) -$(SRCDIR)/ui/ui_credits.o : $(UIDIR)/ui_credits.c; $(DO_CC) -$(SRCDIR)/ui/ui_demo2.o : $(UIDIR)/ui_demo2.c; $(DO_CC) -$(SRCDIR)/ui/ui_display.o : $(UIDIR)/ui_display.c; $(DO_CC) -$(SRCDIR)/ui/ui_gameinfo.o : $(UIDIR)/ui_gameinfo.c; $(DO_CC) -$(SRCDIR)/ui/ui_ingame.o : $(UIDIR)/ui_ingame.c; $(DO_CC) -$(SRCDIR)/ui/ui_loadconfig.o : $(UIDIR)/ui_loadconfig.c; $(DO_CC) -$(SRCDIR)/ui/ui_main.o : $(UIDIR)/ui_main.c; $(DO_CC) -$(SRCDIR)/ui/ui_menu.o : $(UIDIR)/ui_menu.c; $(DO_CC) -$(SRCDIR)/ui/ui_mfield.o : $(UIDIR)/ui_mfield.c; $(DO_CC) -$(SRCDIR)/ui/ui_network.o : $(UIDIR)/ui_network.c; $(DO_CC) -$(SRCDIR)/ui/ui_playermodel.o : $(UIDIR)/ui_playermodel.c; $(DO_CC) -$(SRCDIR)/ui/ui_players.o : $(UIDIR)/ui_players.c; $(DO_CC) -$(SRCDIR)/ui/ui_playersettings.o : $(UIDIR)/ui_playersettings.c; $(DO_CC) -$(SRCDIR)/ui/ui_preferences.o : $(UIDIR)/ui_preferences.c; $(DO_CC) -$(SRCDIR)/ui/ui_qmenu.o : $(UIDIR)/ui_qmenu.c; $(DO_CC) -$(SRCDIR)/ui/ui_quit.o : $(UIDIR)/ui_quit.c; $(DO_CC) -$(SRCDIR)/ui/ui_saveconfig.o : $(UIDIR)/ui_saveconfig.c; $(DO_CC) -$(SRCDIR)/ui/ui_serverinfo.o : $(UIDIR)/ui_serverinfo.c; $(DO_CC) -$(SRCDIR)/ui/ui_servers2.o : $(UIDIR)/ui_servers2.c; $(DO_CC) -$(SRCDIR)/ui/ui_setup.o : $(UIDIR)/ui_setup.c; $(DO_CC) -$(SRCDIR)/ui/ui_sound.o : $(UIDIR)/ui_sound.c; $(DO_CC) -$(SRCDIR)/ui/ui_sparena.o : $(UIDIR)/ui_sparena.c; $(DO_CC) -$(SRCDIR)/ui/ui_specifyserver.o : $(UIDIR)/ui_specifyserver.c; $(DO_CC) -$(SRCDIR)/ui/ui_splevel.o : $(UIDIR)/ui_splevel.c; $(DO_CC) -$(SRCDIR)/ui/ui_sppostgame.o : $(UIDIR)/ui_sppostgame.c; $(DO_CC) -$(SRCDIR)/ui/ui_spskill.o : $(UIDIR)/ui_spskill.c; $(DO_CC) -$(SRCDIR)/ui/ui_startserver.o : $(UIDIR)/ui_startserver.c; $(DO_CC) -$(SRCDIR)/ui/ui_team.o : $(UIDIR)/ui_team.c; $(DO_CC) -$(SRCDIR)/ui/ui_video.o : $(UIDIR)/ui_video.c; $(DO_CC) -$(SRCDIR)/ui/q_math.o : $(GDIR)/q_math.c; $(DO_SHLIB_CC) -$(SRCDIR)/ui/q_shared.o : $(GDIR)/q_shared.c; $(DO_SHLIB_CC) - -############################################################################# -# MISC -############################################################################# - -clean: - rm -f $(GVMASM)