2007-12-27 15:15:22 +00:00
|
|
|
CC=$(TOOLPREFIX)gcc
|
|
|
|
AR=$(TOOLPREFIX)ar
|
|
|
|
RANLIB=$(TOOLPREFIX)ranlib
|
|
|
|
STRIP=$(TOOLPREFIX)strip
|
|
|
|
|
2007-12-11 15:38:44 +00:00
|
|
|
SPIKEISALAZYBUGGERCFLAGS=-Wall -O2
|
2005-09-06 16:49:40 +00:00
|
|
|
STRIPFLAGS=--strip-unneeded --remove-section=.comment
|
|
|
|
|
2008-01-02 13:41:57 +00:00
|
|
|
# 'cause Microsoft suck.
|
|
|
|
CLIBNAME = c
|
|
|
|
|
2007-07-23 10:53:59 +00:00
|
|
|
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
|
2005-09-06 16:49:40 +00:00
|
|
|
|
2007-12-27 15:15:22 +00:00
|
|
|
all: qtv
|
|
|
|
|
2007-12-11 15:38:44 +00:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $< -c -o $@
|
|
|
|
|
2007-12-27 15:15:22 +00:00
|
|
|
libqtvc:
|
|
|
|
$(MAKE) -C libqtvc CC="$(CC)" CFLAGS="$(CFLAGS) $(SPIKEISALAZYBUGGERCFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)"
|
|
|
|
|
|
|
|
libqtvc/libqtvc.a: libqtvc
|
|
|
|
|
|
|
|
qtv: libqtvc/libqtvc.a $(OBJS) qtv.h
|
2008-01-02 13:54:26 +00:00
|
|
|
$(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $@.db -lm -l$(CLIBNAME) -Llibqtvc -lqtvc
|
2005-09-06 16:49:40 +00:00
|
|
|
$(STRIP) $(STRIPFLAGS) $@.db -o $@
|
|
|
|
|
2006-09-17 01:27:32 +00:00
|
|
|
qtv.exe: *.c *.h
|
2008-01-02 13:41:57 +00:00
|
|
|
$(MAKE) qtv CFLAGS=-mno-cygwin LDFLAGS="-lwsock32 -lwinmm" CLIBNAME=msvcrt
|
2005-09-24 21:36:41 +00:00
|
|
|
mv qtv qtv.exe
|
|
|
|
|
2005-09-06 16:49:40 +00:00
|
|
|
clean:
|
2006-09-17 01:27:32 +00:00
|
|
|
rm -rf qtv qtv.exe qtv.db *.o
|
2007-12-27 15:15:22 +00:00
|
|
|
$(MAKE) -C libqtvc clean
|
|
|
|
|
|
|
|
.PHONY: libqtvc
|
|
|
|
|