Build libqtvc, link against it _after_ libc.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2820 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2007-12-27 15:15:22 +00:00
parent 178b7fb2ba
commit fffc415fd0

View file

@ -1,15 +1,25 @@
CC=gcc CC=$(TOOLPREFIX)gcc
AR=$(TOOLPREFIX)ar
RANLIB=$(TOOLPREFIX)ranlib
STRIP=$(TOOLPREFIX)strip
SPIKEISALAZYBUGGERCFLAGS=-Wall -O2 SPIKEISALAZYBUGGERCFLAGS=-Wall -O2
STRIP=strip
STRIPFLAGS=--strip-unneeded --remove-section=.comment STRIPFLAGS=--strip-unneeded --remove-section=.comment
OBJS = netchan.o parse.o msg.o qw.o source.o bsp.o rcon.o mdfour.o crc.o control.o forward.o pmove.o httpsv.o OBJS = netchan.o parse.o msg.o qw.o source.o bsp.o rcon.o mdfour.o crc.o control.o forward.o pmove.o httpsv.o
all: qtv
%.o: %.c %.o: %.c
$(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $< -c -o $@ $(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $< -c -o $@
qtv: $(OBJS) qtv.h libqtvc:
$(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $@.db -lm $(MAKE) -C libqtvc CC="$(CC)" CFLAGS="$(CFLAGS) $(SPIKEISALAZYBUGGERCFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)"
libqtvc/libqtvc.a: libqtvc
qtv: libqtvc/libqtvc.a $(OBJS) qtv.h
$(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $@.db -lm -lc -L libqtvc -lqtvc
$(STRIP) $(STRIPFLAGS) $@.db -o $@ $(STRIP) $(STRIPFLAGS) $@.db -o $@
qtv.exe: *.c *.h qtv.exe: *.c *.h
@ -18,3 +28,7 @@ qtv.exe: *.c *.h
clean: clean:
rm -rf qtv qtv.exe qtv.db *.o rm -rf qtv qtv.exe qtv.db *.o
$(MAKE) -C libqtvc clean
.PHONY: libqtvc