1 --- doomlegacy-1.44/src/Makefile 2011-03-13 23:16:45.655640054 +0200
2 +++ doomlegacy-1.44/src/Makefile 2011-03-13 23:14:40.039898572 +0200
4 # SDL Mixer, to get music
7 -# Developers with svn can enable this to have svn number in executable.
8 -# Causes compile error message otherwise.
9 -# Until can find test for presence of svn, this is best that can be done.
12 # Subdirectories for objects and binaries
16 NASMFORMAT=elf -DLINUX
17 i_cdmus_o=$(O)/i_cdmus.o
20 # default system media interface
35 -.PHONY : versionstring
36 -# This may fail because, (a) svn not installed, (b) not a svn directory.
37 -# This compiles d_main a second time, with SVN_REV set.
40 - $(CC) -c $(CFLAGS) -DSVN_REV=\"`svn info | grep Revision | sed -e 's/Revision: //'`\" d_main.c -o $(O)/d_main.o
43 +# this prints "exported" if is outside svn dir, and "none" if svn not installed
44 +# release tarball should include svnrev.txt or not use the define in code.
46 + (svnversion 2>/dev/null || echo none) > $@
48 +$(O)/d_main.o: d_main.c svnrev.txt
49 + $(CC) $(CFLAGS) -DSVN_REV=\"`cat svnrev.txt`\" -c $< -o $@
51 $(BIN)/wadtool: $(O)/wadtool.o $(O)/md5_cpp.o
52 $(CXX) $(LDFLAGS) $^ -o $@
54 asm: $(BIN)/$(EXENAME)
55 objdump -d $(BIN)/$(EXENAME) --no-show-raw-insn > $(BIN)/doomlegacy.s
59 -$(BIN)/$(EXENAME): $(O) $(OBJS) $(O)/i_main.o versionstring
60 +$(BIN)/$(EXENAME): $(O) $(OBJS)
63 - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(O)/i_main.o \
64 + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) \
65 -o $(BIN)/$(EXENAME) $(LIBS)