mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-25 05:11:35 +00:00
7eeb3578b1
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4021 fc73d0e0-1445-4013-8a0c-d673dee63da5
39 lines
967 B
Makefile
39 lines
967 B
Makefile
CC=$(TOOLPREFIX)gcc
|
|
AR=$(TOOLPREFIX)ar
|
|
RANLIB=$(TOOLPREFIX)ranlib
|
|
STRIP=$(TOOLPREFIX)strip
|
|
|
|
SPIKEISALAZYBUGGERCFLAGS=-Wall -O2
|
|
STRIPFLAGS=--strip-unneeded --remove-section=.comment
|
|
|
|
# 'cause Microsoft suck.
|
|
CLIBNAME = c
|
|
|
|
VPATH=../engine/common
|
|
|
|
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 menu.o httpsv.o sha1.o
|
|
|
|
all: qtv
|
|
|
|
%.o: %.c
|
|
$(CC) $(SPIKEISALAZYBUGGERCFLAGS) $(CFLAGS) $< -c -o $@
|
|
|
|
libqtvc:
|
|
$(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 -l$(CLIBNAME) -Llibqtvc -lqtvc
|
|
$(STRIP) $(STRIPFLAGS) $@.db -o $@
|
|
|
|
qtv.exe: *.c *.h
|
|
$(MAKE) qtv CFLAGS=-mno-cygwin LDFLAGS="-lwsock32 -lwinmm" CLIBNAME=msvcrt
|
|
mv qtv qtv.exe
|
|
|
|
clean:
|
|
rm -rf qtv qtv.exe qtv.db *.o
|
|
$(MAKE) -C libqtvc clean
|
|
|
|
.PHONY: libqtvc
|
|
|