2005-01-23 17:44:11 +00:00
|
|
|
CC=gcc
|
2007-10-25 17:59:01 +00:00
|
|
|
WINDRES=windres
|
2006-05-02 00:11:29 +00:00
|
|
|
STRIP=strip
|
|
|
|
|
|
|
|
STRIPFLAGS=--strip-unneeded --remove-section=.comment
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
CPUOPTIMIZATIONS=
|
|
|
|
|
|
|
|
BASE_DIR=.
|
|
|
|
|
2009-07-25 13:21:40 +00:00
|
|
|
SVNREVISION:=-DSVNREVISION=$(shell test -d .svn && svnversion || echo -)
|
2009-07-25 11:22:28 +00:00
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
#only limited forms of cross-making is supported
|
|
|
|
#only the following 3 are supported
|
2009-04-06 02:45:11 +00:00
|
|
|
#linux->win32 (FTE_TARGET=win32) RPM Package: "mingw32-gcc", DEB Package: "mingw32"
|
|
|
|
#linux->linux32 (FTE_TARGET=linux32)
|
|
|
|
#linux->linux64 (FTE_TARGET=linux64)
|
|
|
|
#linux->morphos (FTE_TARGET=morphos) Contact Moodles for crosscompiler
|
|
|
|
#linux->macosx (FTE_TARGET=macosx) or (FTE_TARGET=macosx_x86) Contact Moodles for crosscompiler, only works with Mac OSX 10.4 Tiger.
|
2005-12-15 19:15:39 +00:00
|
|
|
#if you are cross compiling, you'll need to use FTE_TARGET=mytaget
|
|
|
|
|
2007-07-23 18:55:10 +00:00
|
|
|
#correct the gcc build when cross compiling
|
|
|
|
ifeq ($(FTE_TARGET),win32)
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
|
|
|
#CC didn't state that it was mingw... so try fixing that up
|
2007-10-14 22:02:30 +00:00
|
|
|
ifneq ($(shell which i586-mingw32msvc-gcc 2> /dev/null),)
|
2007-09-02 19:55:17 +00:00
|
|
|
#yup, the alternative exists (this matches the one debian has)
|
|
|
|
CC=i586-mingw32msvc-gcc
|
2007-10-26 09:05:59 +00:00
|
|
|
WINDRES=i586-mingw32msvc-windres
|
2008-11-18 03:20:10 +00:00
|
|
|
STRIP=i586-mingw32msvc-strip
|
2007-09-02 19:55:17 +00:00
|
|
|
# BITS?=32
|
|
|
|
endif
|
2007-07-23 18:55:10 +00:00
|
|
|
endif
|
|
|
|
endif
|
2007-11-02 00:30:47 +00:00
|
|
|
|
2009-04-08 08:12:29 +00:00
|
|
|
#correct the gcc build when cross compiling
|
|
|
|
ifeq ($(FTE_TARGET),win32_SDL)
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
|
|
|
#CC didn't state that it was mingw... so try fixing that up
|
|
|
|
ifneq ($(shell which i586-mingw32msvc-gcc 2> /dev/null),)
|
|
|
|
#yup, the alternative exists (this matches the one debian has)
|
|
|
|
CC=i586-mingw32msvc-gcc
|
|
|
|
WINDRES=i586-mingw32msvc-windres
|
|
|
|
STRIP=i586-mingw32msvc-strip
|
|
|
|
# BITS?=32
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2007-11-02 00:30:47 +00:00
|
|
|
#crosscompile macosx from linux, default target ppc 32bit
|
|
|
|
ifeq ($(FTE_TARGET),macosx)
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep apple),)
|
|
|
|
ifneq ($(shell which powerpc-apple-darwin8-gcc 2> /dev/null),)
|
|
|
|
CC=powerpc-apple-darwin8-gcc
|
|
|
|
STRIP=powerpc-apple-darwin8-strip
|
|
|
|
#seems, macosx has a more limited version of strip
|
|
|
|
STRIPFLAGS=
|
|
|
|
BITS=32
|
|
|
|
EXTENSION=_ppc
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(FTE_TARGET),macosx_ppc64)
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep apple),)
|
|
|
|
ifneq ($(shell which powerpc-apple-darwin8-gcc 2> /dev/null),)
|
|
|
|
FTE_TARGET=macosx
|
|
|
|
CC=powerpc-apple-darwin8-gcc -arch ppc64
|
|
|
|
STRIP=powerpc-apple-darwin8-strip
|
|
|
|
#seems, macosx has a more limited version of strip
|
|
|
|
STRIPFLAGS=
|
|
|
|
BITS=64
|
|
|
|
EXTENSION=_ppc
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(FTE_TARGET),macosx_x86)
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep apple),)
|
|
|
|
ifneq ($(shell which i686-apple-darwin8-gcc 2> /dev/null),)
|
|
|
|
FTE_TARGET=macosx
|
|
|
|
# i686-apple-darwin8-gcc's default target is i386, powerpc-apple-darwin8-gcc -arch i386 just invokes i686-apple-darwin8-gcc anyway
|
|
|
|
CC=i686-apple-darwin8-gcc
|
|
|
|
STRIP=i686-apple-darwin8-strip
|
|
|
|
#seems, macosx has a more limited version of strip
|
|
|
|
STRIPFLAGS=
|
|
|
|
EXTENSION=_x86
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#crosscompile morphos from linux
|
|
|
|
ifeq ($(FTE_TARGET),morphos)
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep morphos),)
|
|
|
|
ifneq ($(shell which ppc-morphos-gcc 2> /dev/null),)
|
|
|
|
CC=ppc-morphos-gcc
|
|
|
|
#morphos strip has a 'feature', it strips permissions
|
|
|
|
STRIP=ppc-morphos-strip
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
#if you have an x86, you can get gcc to build 32bit or 64bit specific builds, instead of builds for the native platform
|
|
|
|
ifeq ($(FTE_TARGET),linux32)
|
|
|
|
FTE_TARGET=linux
|
|
|
|
CC=gcc -m32
|
|
|
|
BITS=32
|
|
|
|
endif
|
|
|
|
ifeq ($(FTE_TARGET),linux64)
|
|
|
|
FTE_TARGET=linux
|
|
|
|
CC=gcc -m64
|
|
|
|
BITS=64
|
|
|
|
endif
|
|
|
|
|
2005-12-15 19:15:39 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(FTE_TARGET),) #user didn't specify prefered target
|
2005-12-20 22:27:31 +00:00
|
|
|
ifneq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
2005-01-23 17:44:11 +00:00
|
|
|
FTE_TARGET=win32
|
2005-12-15 19:15:39 +00:00
|
|
|
endif
|
2005-12-20 22:27:31 +00:00
|
|
|
ifneq ($(shell $(CC) -v 2>&1 | grep cygwin),)
|
2005-12-15 19:15:39 +00:00
|
|
|
FTE_TARGET=cygwin
|
|
|
|
endif
|
|
|
|
ifeq ($(FTE_TARGET),) #still not set
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(shell uname),Linux)
|
|
|
|
FTE_TARGET=linux
|
2005-05-20 03:33:10 +00:00
|
|
|
endif
|
2007-09-22 19:28:27 +00:00
|
|
|
ifeq ($(shell uname),Darwin)
|
|
|
|
FTE_TARGET=macosx
|
|
|
|
endif
|
2005-05-20 08:13:48 +00:00
|
|
|
ifeq ($(shell uname),FreeBSD)
|
|
|
|
FTE_TARGET=bsd
|
|
|
|
endif
|
|
|
|
ifeq ($(shell uname),NetBSD)
|
|
|
|
FTE_TARGET=bsd
|
|
|
|
endif
|
|
|
|
ifeq ($(shell uname),OpenBSD)
|
|
|
|
FTE_TARGET=bsd
|
|
|
|
endif
|
2006-03-06 22:15:40 +00:00
|
|
|
ifeq ($(shell uname),MorphOS)
|
|
|
|
FTE_TARGET=morphos
|
|
|
|
endif
|
2005-05-20 08:13:48 +00:00
|
|
|
#else I've no idea what it is you're running
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
FTE_TARGET ?= sdl #so go for sdl.
|
|
|
|
endif
|
|
|
|
|
2005-11-21 22:16:53 +00:00
|
|
|
ifneq ($(shell ls|grep config.h),)
|
|
|
|
HAVECONFIG=-DHAVE_CONFIG_H
|
|
|
|
endif
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
CLIENT_DIR=$(BASE_DIR)/client
|
|
|
|
GL_DIR=$(BASE_DIR)/gl
|
2007-09-17 20:35:39 +00:00
|
|
|
D3D7_DIR=$(BASE_DIR)/d3d
|
|
|
|
D3D9_DIR=$(BASE_DIR)/d3d9
|
2005-01-23 17:44:11 +00:00
|
|
|
SERVER_DIR=$(BASE_DIR)/server
|
|
|
|
COMMON_DIR=$(BASE_DIR)/common
|
|
|
|
HTTP_DIR=$(BASE_DIR)/http
|
2005-01-24 23:47:32 +00:00
|
|
|
#LIBS_DIR=$(BASE_DIR)/libs
|
|
|
|
LIBS_DIR?=.
|
2005-01-23 17:44:11 +00:00
|
|
|
PROGS_DIR=$(BASE_DIR)/qclib
|
|
|
|
SNDCODEC_DIR=$(BASE_DIR)/sndcodec
|
|
|
|
|
|
|
|
RELEASE_DIR=$(BASE_DIR)/release
|
|
|
|
DEBUG_DIR=$(BASE_DIR)/debug
|
|
|
|
|
2005-11-21 22:16:53 +00:00
|
|
|
ALL_CFLAGS=$(HAVECONFIG) $(CFLAGS) $(BASE_CFLAGS) $(WCFLAGS)
|
|
|
|
|
|
|
|
DO_CC=$(CC) $(ALL_CFLAGS) -o $@ -c $<
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
ifdef windir
|
2005-01-24 05:06:16 +00:00
|
|
|
DO_AS=$(CC) $(BASE_CFLAGS) $(WCFLAGS) -x assembler-with-cpp -o $@ -c $< $(CFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2005-01-24 05:06:16 +00:00
|
|
|
DO_AS=$(CC) $(BASE_CFLAGS) $(WCFLAGS) -x assembler-with-cpp -DELF -o $@ -c $< $(CFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
endif
|
2005-12-21 03:07:33 +00:00
|
|
|
|
|
|
|
ifeq ($(FTE_TARGET),win32)
|
|
|
|
BASELDFLAGS=-lm
|
|
|
|
endif
|
2009-04-08 08:12:29 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32_SDL)
|
|
|
|
BASELDFLAGS=-lm
|
|
|
|
endif
|
2005-12-21 03:07:33 +00:00
|
|
|
ifeq ($(FTE_TARGET),cygwin)
|
|
|
|
BASELDFLAGS=-lm
|
|
|
|
endif
|
2006-03-06 22:15:40 +00:00
|
|
|
ifeq ($(FTE_TARGET),morphos)
|
|
|
|
BASELDFLAGS=-lm
|
|
|
|
endif
|
2006-03-14 01:29:45 +00:00
|
|
|
ifeq ($(FTE_TARGET),bsd)
|
|
|
|
BASELDFLAGS=-lm
|
|
|
|
endif
|
2007-07-23 18:55:10 +00:00
|
|
|
BASELDFLAGS ?= -lm -ldl -lpthread
|
2005-12-21 03:07:33 +00:00
|
|
|
|
2007-10-12 10:27:51 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32)
|
|
|
|
IMAGELDFLAGS=$(LIBS_DIR)/mingw-libs/libpng.a $(LIBS_DIR)/mingw-libs/libz.a $(LIBS_DIR)/mingw-libs/libjpeg.a
|
|
|
|
endif
|
2009-04-08 08:12:29 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32_SDL)
|
|
|
|
IMAGELDFLAGS=./libs/mingw-libs/libpng.a ./libs/mingw-libs/libz.a ./libs/mingw-libs/libjpeg.a
|
|
|
|
endif
|
|
|
|
IMAGELDFLAGS ?= -lpng -ljpeg
|
2007-09-17 20:35:39 +00:00
|
|
|
|
2005-10-14 18:30:13 +00:00
|
|
|
#BASELDFLAGS=-lm -lz
|
2007-09-17 20:35:39 +00:00
|
|
|
GLXLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext $(IMAGELDFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
GLSLDFLAGS=-L/usr/X11R6/lib -lMesaGL -lglide -lvga
|
2007-09-17 20:35:39 +00:00
|
|
|
XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext $(IMAGELDFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
SLDFLAGS=-lvga
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
COMMON_ASM_OBJS = \
|
|
|
|
worlda.o \
|
|
|
|
math.o
|
|
|
|
|
|
|
|
CLIENT_ASM_OBJS = \
|
|
|
|
snd_mixa.o
|
|
|
|
|
|
|
|
SOFTWARE_ASM_OBJS = \
|
|
|
|
r_aclipa.o \
|
|
|
|
r_aliasa.o \
|
|
|
|
r_drawa.o \
|
|
|
|
r_edgea.o \
|
|
|
|
r_varsa.o \
|
|
|
|
d_draw.o \
|
|
|
|
d_draw16.o \
|
|
|
|
d_parta.o \
|
|
|
|
d_polysa.o \
|
|
|
|
d_scana.o \
|
|
|
|
d_spr8.o \
|
|
|
|
d_varsa.o \
|
|
|
|
surf16.o \
|
|
|
|
surf8.o
|
|
|
|
|
|
|
|
else
|
|
|
|
BASE_ASM_CFLAGS = -DNOASM
|
|
|
|
endif
|
|
|
|
|
2009-07-25 11:22:28 +00:00
|
|
|
BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(GL_DIR) -I$(D3D9_DIR) -I$(D3D7_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -I./libs/freetype2/include -I./libs/freetype2/include/freetype -D_vsnprintf=vsnprintf -D_snprintf=snprintf $(SVNREVISION)
|
2005-01-23 17:44:11 +00:00
|
|
|
CLIENT_ONLY_CFLAGS=-DCLIENTONLY
|
|
|
|
SERVER_ONLY_CFLAGS=-DSERVERONLY
|
|
|
|
JOINT_CFLAGS=
|
|
|
|
DEBUG_CFLAGS=-ggdb -g
|
2007-10-12 10:27:51 +00:00
|
|
|
|
|
|
|
ifeq ($(FTE_TARGET),win32)
|
|
|
|
RELEASE_CFLAGS=-fno-strict-aliasing -ffast-math -fexpensive-optimizations $(CPUOPTIMIZATIONS)
|
|
|
|
endif
|
2009-04-08 08:12:29 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32_SDL)
|
2009-06-08 08:10:32 +00:00
|
|
|
RELEASE_CFLAGS=-fno-strict-aliasing -ffast-math -fexpensive-optimizations $(CPUOPTIMIZATIONS) -D_SDL
|
2009-04-08 08:12:29 +00:00
|
|
|
endif
|
|
|
|
RELEASE_CFLAGS ?= -O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
|
|
|
|
#RELEASE_CFLAGS=-O6 -fno-strict-aliasing -ffast-math -funroll-loops -fexpensive-optimizations $(CPUOPTIMIZATIONS)
|
2007-10-12 10:27:51 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
GLCFLAGS=-DGLQUAKE
|
2007-09-17 20:35:39 +00:00
|
|
|
D3DCFLAGS=-DD3DQUAKE
|
2009-04-03 07:31:54 +00:00
|
|
|
NPQTVCFLAGS=-DNPQTV
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
CLIENT_OBJS = $(CLIENT_ASM_OBJS) \
|
|
|
|
textedit.o \
|
|
|
|
fragstats.o \
|
|
|
|
teamplay.o \
|
|
|
|
zqtp.o \
|
|
|
|
cl_demo.o \
|
|
|
|
cl_ents.o \
|
|
|
|
clq2_ents.o \
|
|
|
|
cl_input.o \
|
|
|
|
cl_main.o \
|
|
|
|
cl_parse.o \
|
|
|
|
cl_pred.o \
|
|
|
|
cl_tent.o \
|
|
|
|
cl_cam.o \
|
|
|
|
cl_screen.o \
|
|
|
|
cl_ui.o \
|
2005-11-30 01:20:53 +00:00
|
|
|
cl_ignore.o \
|
2005-11-21 22:16:53 +00:00
|
|
|
cl_cg.o \
|
|
|
|
clq3_parse.o \
|
2005-01-24 05:06:16 +00:00
|
|
|
pr_csqc.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
console.o \
|
|
|
|
image.o \
|
|
|
|
keys.o \
|
|
|
|
menu.o \
|
2005-05-20 08:13:48 +00:00
|
|
|
m_download.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
m_master.o \
|
|
|
|
m_multi.o \
|
|
|
|
m_items.o \
|
|
|
|
m_options.o \
|
|
|
|
m_single.o \
|
|
|
|
m_script.o \
|
|
|
|
m_mp3.o \
|
|
|
|
roq_read.o \
|
|
|
|
clq2_cin.o \
|
|
|
|
net_master.o \
|
|
|
|
r_bulleten.o \
|
|
|
|
r_part.o \
|
2008-11-09 22:29:28 +00:00
|
|
|
p_script.o \
|
|
|
|
p_null.o \
|
|
|
|
p_classic.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
r_partset.o \
|
|
|
|
r_efrag.o \
|
|
|
|
renderer.o \
|
|
|
|
renderque.o \
|
|
|
|
sbar.o \
|
|
|
|
skin.o \
|
|
|
|
snd_dma.o \
|
|
|
|
snd_mem.o \
|
|
|
|
snd_mix.o \
|
|
|
|
snd_mp3.o \
|
|
|
|
snd_ov.o \
|
|
|
|
valid.o \
|
|
|
|
view.o \
|
|
|
|
wad.o \
|
|
|
|
\
|
|
|
|
ftpclient.o \
|
|
|
|
httpclient.o \
|
|
|
|
\
|
|
|
|
\
|
|
|
|
pr_menu.o
|
|
|
|
|
|
|
|
GLQUAKE_OBJS = \
|
|
|
|
gl_alias.o \
|
|
|
|
gl_draw.o \
|
|
|
|
gl_model.o \
|
|
|
|
gl_ngraph.o \
|
|
|
|
gl_rlight.o \
|
|
|
|
gl_rmain.o \
|
|
|
|
gl_rmisc.o \
|
2009-07-14 23:42:54 +00:00
|
|
|
gl_font.o \
|
2005-09-09 23:40:55 +00:00
|
|
|
gl_heightmap.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
gl_rsurf.o \
|
|
|
|
ltface.o \
|
|
|
|
gl_screen.o \
|
2006-03-03 03:31:19 +00:00
|
|
|
gl_bloom.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
gl_backend.o \
|
|
|
|
gl_shader.o \
|
|
|
|
gl_warp.o \
|
|
|
|
gl_ppl.o \
|
|
|
|
gl_vidcommon.o \
|
|
|
|
gl_hlmdl.o
|
|
|
|
|
2007-09-17 20:35:39 +00:00
|
|
|
D3DQUAKE_OBJS = \
|
|
|
|
d3d_draw.o \
|
|
|
|
d3d_mesh.o \
|
|
|
|
d3d_rmain.o \
|
|
|
|
d3d_rsurf.o \
|
|
|
|
vid_d3d.o \
|
|
|
|
d3d9_draw.o \
|
|
|
|
d3d9_mesh.o \
|
|
|
|
d3d9_rmain.o \
|
|
|
|
d3d9_rsurf.o \
|
|
|
|
vid_d3d9.o
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
MP3_OBJS = \
|
|
|
|
fixed.o \
|
|
|
|
bit.o \
|
|
|
|
timer.o \
|
|
|
|
stream.o \
|
|
|
|
frame.o \
|
|
|
|
synth.o \
|
|
|
|
decoder.o \
|
|
|
|
layer12.o \
|
|
|
|
layer3.o \
|
|
|
|
huffman.o \
|
|
|
|
mymad.o
|
|
|
|
|
|
|
|
PROGS_OBJS = \
|
|
|
|
comprout.o \
|
|
|
|
hash.o \
|
|
|
|
initlib.o \
|
2008-11-15 02:12:55 +00:00
|
|
|
pr_bgcmd.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
pr_edict.o \
|
|
|
|
pr_exec.o \
|
|
|
|
pr_multi.o \
|
|
|
|
qcc_cmdlib.o \
|
|
|
|
qccmain.o \
|
|
|
|
qcc_pr_comp.o \
|
|
|
|
qcc_pr_lex.o \
|
|
|
|
qcdecomp.o \
|
|
|
|
qcd_main.o
|
|
|
|
|
|
|
|
SERVER_OBJS = \
|
|
|
|
pr_cmds.o \
|
2007-09-02 19:55:17 +00:00
|
|
|
pr_q1qvm.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
sv_master.o \
|
|
|
|
sv_init.o \
|
|
|
|
sv_main.o \
|
|
|
|
sv_nchan.o \
|
|
|
|
sv_ents.o \
|
|
|
|
sv_send.o \
|
|
|
|
sv_move.o \
|
|
|
|
sv_phys.o \
|
|
|
|
sv_user.o \
|
|
|
|
sv_mvd.o \
|
|
|
|
sv_ccmds.o \
|
|
|
|
sv_rankin.o \
|
|
|
|
sv_chat.o \
|
|
|
|
sv_demo.o \
|
|
|
|
world.o \
|
|
|
|
net_preparse.o \
|
|
|
|
savegame.o \
|
|
|
|
svq2_ents.o \
|
|
|
|
svq2_game.o \
|
2005-11-21 22:16:53 +00:00
|
|
|
svq3_game.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
snd_vc.o \
|
|
|
|
snd_voicecodecs.o \
|
|
|
|
g711.o \
|
|
|
|
g721.o \
|
|
|
|
g723_24.o \
|
|
|
|
g723_40.o \
|
|
|
|
g72x.o \
|
|
|
|
webgen.o \
|
|
|
|
ftpserver.o \
|
2005-11-21 22:16:53 +00:00
|
|
|
httpserver.o
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
SERVERONLY_OBJS = \
|
2005-07-16 14:37:38 +00:00
|
|
|
gl_alias.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
svmodel.o \
|
|
|
|
sv_sys_unix.o
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
WINDOWSSERVERONLY_OBJS = \
|
2005-10-30 22:59:14 +00:00
|
|
|
gl_alias.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
svmodel.o \
|
|
|
|
sv_sys_win.o
|
|
|
|
|
|
|
|
COMMON_OBJS = $(COMMON_ASM_OBJS) \
|
2007-05-27 13:59:39 +00:00
|
|
|
com_mesh.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
common.o \
|
|
|
|
cvar.o \
|
|
|
|
cmd.o \
|
|
|
|
crc.o \
|
2005-09-09 23:40:55 +00:00
|
|
|
fs.o \
|
2009-04-02 22:25:54 +00:00
|
|
|
fs_stdio.o \
|
|
|
|
fs_pak.o \
|
|
|
|
fs_zip.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
mathlib.o \
|
|
|
|
huff.o \
|
|
|
|
md4.o \
|
2005-09-27 19:48:42 +00:00
|
|
|
log.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
net_chan.o \
|
|
|
|
net_wins.o \
|
|
|
|
zone.o \
|
2005-12-17 22:50:02 +00:00
|
|
|
qvm.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
gl_q2bsp.o \
|
|
|
|
glmod_doom.o \
|
2005-11-21 22:16:53 +00:00
|
|
|
q3common.o \
|
2005-01-23 17:44:11 +00:00
|
|
|
pmove.o \
|
|
|
|
pmovetst.o \
|
|
|
|
iwebiface.o \
|
|
|
|
translate.o \
|
|
|
|
plugin.o \
|
|
|
|
q1bsp.o \
|
|
|
|
q2pmove.o
|
|
|
|
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
#the defaults for sdl come first
|
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o
|
2007-09-02 19:55:17 +00:00
|
|
|
GL_EXE_NAME=../fteqw_sdl.gl$(BITS)
|
|
|
|
GLCL_EXE_NAME=../fteqwcl_sdl.gl$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
ifdef windir
|
2009-06-14 13:51:13 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `sdl-config --libs`
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2007-09-17 20:35:39 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) `sdl-config --libs`
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
GL_CFLAGS=$(GLCFLAGS) `sdl-config --cflags`
|
2007-09-02 19:55:17 +00:00
|
|
|
GLB_DIR=gl_sdl$(BITS)
|
|
|
|
GLCL_DIR=glcl_sdl$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2005-05-26 12:55:34 +00:00
|
|
|
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(SERVERONLY_OBJS)
|
2009-06-08 08:10:32 +00:00
|
|
|
SV_EXE_NAME=../fteqw_sdl.sv$(BITS)
|
2009-04-07 03:48:32 +00:00
|
|
|
SV_CFLAGS=$(SERVER_ONLY_CFLAGS) -lz
|
|
|
|
|
|
|
|
MINGL_DIR=mingl_sdl$(BITS)
|
|
|
|
MINGL_EXE_NAME=../fteqw_sdl.mingl$(BITS)
|
|
|
|
|
|
|
|
MB_DIR=m_sdl$(BITS)
|
|
|
|
M_EXE_NAME=../fteqw_sdl$(BITS)
|
2009-07-17 10:17:22 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=$(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL
|
2009-04-07 03:48:32 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS)
|
|
|
|
|
|
|
|
ifdef windir
|
2009-06-14 13:51:13 +00:00
|
|
|
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 -lSDLmain -lSDL
|
2009-04-07 03:48:32 +00:00
|
|
|
else
|
|
|
|
#pthread is needed because of SDL.
|
|
|
|
M_LDFLAGS=$(MLDFLAGS) `sdl-config --libs` $(IMAGELDFLAGS)
|
|
|
|
endif
|
|
|
|
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
#specific targets override those defaults as needed.
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2009-04-08 08:12:29 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32_SDL)
|
|
|
|
LIBS_DIR=./libs/
|
|
|
|
|
|
|
|
#the defaults for sdl come first
|
2009-04-10 03:39:47 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o resources.o
|
2009-04-08 08:12:29 +00:00
|
|
|
GL_EXE_NAME=../fteqw_sdl_gl.exe
|
|
|
|
GLCL_EXE_NAME=../fteqwcl_sdl.exe
|
|
|
|
ifdef windir
|
2009-06-14 13:51:13 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lws2_32 `sdl-config --libs`
|
2009-04-08 08:12:29 +00:00
|
|
|
else
|
2009-06-14 13:51:13 +00:00
|
|
|
GL_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 ./libs/mingw-libs/libSDL.a ./libs/mingw-libs/libSDLmain.a -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `sdl-config --libs`
|
2009-04-08 08:12:29 +00:00
|
|
|
endif
|
|
|
|
GL_CFLAGS=-D_MINGW_VFPRINTF -D_SDL -I./libs/ -I./libs/mingw-libs/ -I./libs/dxsdk7/include/ -I./libs/mingw-libs $(GLCFLAGS) `sdl-config --cflags`
|
|
|
|
GLB_DIR=gl_mgw_sdl$(BITS)
|
|
|
|
GLCL_DIR=glcl_mgw_sdl$(BITS)
|
|
|
|
|
|
|
|
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) resources.o
|
2009-06-08 08:10:32 +00:00
|
|
|
SV_EXE_NAME=../fteqw_sdl_sv.exe
|
|
|
|
SV_CFLAGS=$(SERVER_ONLY_CFLAGS) -D_SDL
|
2009-06-14 13:51:13 +00:00
|
|
|
SV_LDFLAGS=./libs/mingw-libs/libz.a -lm -lmingw32 -lws2_32 -lwinmm
|
2009-04-08 08:12:29 +00:00
|
|
|
|
|
|
|
MINGL_DIR=mingl_sdl$(BITS)
|
|
|
|
MINGL_EXE_NAME=../fteqw_sdl_mingl.exe
|
|
|
|
|
|
|
|
MB_DIR=m_mgw_sdl$(BITS)
|
|
|
|
M_EXE_NAME=../fteqw_sdl.exe
|
2009-07-17 10:17:22 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o resources.o
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=-D_MINGW_VFPRINTF -D_SDL -I./libs/ -I./libs/mingw-libs/ -I./libs/dxsdk7/include/ -I./libs/mingw-libs $(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL
|
2009-04-08 08:12:29 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS)
|
|
|
|
|
|
|
|
ifdef windir
|
2009-06-14 13:51:13 +00:00
|
|
|
M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lws2_32 -lSDLmain -lSDL
|
2009-04-08 08:12:29 +00:00
|
|
|
else
|
|
|
|
#pthread is needed because of SDL.
|
2009-06-14 13:51:13 +00:00
|
|
|
M_LDFLAGS=$(IMAGELDFLAGS) -lws2_32 -lmingw32 ./libs/mingw-libs/libSDL.a ./libs/mingw-libs/libSDLmain.a -mwindows -ldxguid -lwinmm -lole32 $(MLDFLAGS) `sdl-config --libs` $(IMAGELDFLAGS)
|
2009-04-08 08:12:29 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32)
|
2007-10-25 17:59:01 +00:00
|
|
|
# The extra object file called resources.o is specific for MinGW to link the icon in
|
2006-10-05 21:59:43 +00:00
|
|
|
|
|
|
|
#cygwin's gcc requires an extra command to use mingw instead of cygwin (default paths, etc).
|
|
|
|
ifneq ($(shell $(CC) -v 2>&1 | grep cygwin),)
|
|
|
|
W32_CFLAGS=-mno-cygwin
|
|
|
|
endif
|
|
|
|
|
|
|
|
SV_CFLAGS=$(SERVER_ONLY_CFLAGS) $(W32_CFLAGS)
|
|
|
|
|
|
|
|
|
2005-01-24 23:47:32 +00:00
|
|
|
LIBS_DIR = $(BASE_DIR)/libs
|
2005-01-23 17:44:11 +00:00
|
|
|
SV_EXE_NAME=../fteqwsv.exe
|
2009-06-14 13:51:13 +00:00
|
|
|
SV_LDFLAGS=libs/zlib.lib -lws2_32 -lwinmm
|
2005-01-23 17:44:11 +00:00
|
|
|
SV_DIR=sv_mingw
|
2009-05-24 10:11:17 +00:00
|
|
|
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) fs_win32.o resources.o
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2009-04-03 07:31:54 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(USEASM),true)
|
2009-05-24 10:11:17 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o resources.o
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2009-05-24 10:11:17 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
GL_EXE_NAME=../fteglqw.exe
|
|
|
|
GLCL_EXE_NAME=../fteglqwcl.exe
|
2009-06-14 13:51:13 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32
|
2006-10-05 21:59:43 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) $(W32_CFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
GLB_DIR=gl_mgw
|
|
|
|
GLCL_DIR=glcl_mgw
|
|
|
|
|
2009-04-03 07:31:54 +00:00
|
|
|
ifeq ($(USEASM),true)
|
2009-05-24 10:11:17 +00:00
|
|
|
NPQTVCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o npplug.o sys_npqtv.o ../../ftequake/npapi.def
|
2009-04-03 07:31:54 +00:00
|
|
|
else
|
2009-05-24 10:11:17 +00:00
|
|
|
NPQTVCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o npplug.o sys_npqtv.o ../../ftequake/npapi.def
|
2009-04-03 07:31:54 +00:00
|
|
|
endif
|
|
|
|
NPQTV_DLL_NAME=../npqtv.dll
|
|
|
|
NPQTVCL_DLL_NAME=../npqtvcl.dll
|
2009-06-14 13:51:13 +00:00
|
|
|
NPQTV_LDFLAGS=--enable-stdcall-fixup $(GLLDFLAGS) $(IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32 -shared
|
2009-04-03 07:31:54 +00:00
|
|
|
NPQTV_CFLAGS=$(NPQTVCFLAGS) $(GLCFLAGS) $(W32_CFLAGS)
|
|
|
|
NPQTVB_DIR=npqtv_mgw
|
|
|
|
NPQTVCL_DIR=npqtvcl_mgw
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(USEASM),true)
|
2009-05-24 10:11:17 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) fs_win32.o gl_vidnt.o vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o resources.o
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2009-05-24 10:11:17 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) fs_win32.o gl_vidnt.o vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqw.exe
|
|
|
|
MCL_EXE_NAME=../fteqwcl.exe
|
2009-06-14 13:51:13 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=$(GLCFLAGS) $(W32_CFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
MB_DIR=m_mgw
|
|
|
|
MCL_DIR=mcl_mgw
|
|
|
|
|
2007-10-25 17:59:01 +00:00
|
|
|
D3DCL_OBJS=$(D3DQUAKE_OBJS) snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o resources.o
|
2007-09-17 20:35:39 +00:00
|
|
|
D3D_EXE_NAME=../fted3dqw.exe
|
|
|
|
D3DCL_EXE_NAME=../fted3dclqw.exe
|
2009-06-14 13:51:13 +00:00
|
|
|
D3D_LDFLAGS= -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32
|
2007-09-17 20:35:39 +00:00
|
|
|
D3D_CFLAGS=$(D3DCFLAGS) $(W32_CFLAGS) -DMINIMAL
|
|
|
|
D3DB_DIR=d3d_mgw
|
|
|
|
D3DCL_DIR=d3dcl_mgw
|
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
MINGL_EXE_NAME=../fteminglqw.exe
|
|
|
|
MINGL_DIR=mingl_mgw
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
2005-05-20 08:13:48 +00:00
|
|
|
ifeq ($(FTE_TARGET),bsd)
|
|
|
|
#mostly uses the linux stuff.
|
|
|
|
#oss, X, etc.
|
|
|
|
|
|
|
|
SV_DIR=sv_linux
|
2007-10-20 19:58:32 +00:00
|
|
|
SV_LDFLAGS=-lz -ldl
|
2005-05-20 08:13:48 +00:00
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
|
|
|
else
|
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o
|
|
|
|
endif
|
|
|
|
GL_EXE_NAME=../fteqw.gl
|
|
|
|
GLCL_EXE_NAME=../fteqwcl.gl
|
2007-10-20 19:58:32 +00:00
|
|
|
GL_LDFLAGS= -L/usr/local/lib $(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm -lpthread
|
2006-03-06 22:15:40 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) -I/usr/local/include -I/usr/X11R6/include
|
2005-05-20 08:13:48 +00:00
|
|
|
GLB_DIR=gl_bsd
|
|
|
|
GLCL_DIR=glcl_bsd
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
2009-07-16 22:06:59 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
2005-05-20 08:13:48 +00:00
|
|
|
else
|
2009-07-16 22:06:59 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o
|
2005-05-20 08:13:48 +00:00
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqw
|
|
|
|
MCL_EXE_NAME=../fteqwcl
|
2007-10-20 19:58:32 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm -lpthread
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include
|
2005-05-20 08:13:48 +00:00
|
|
|
MB_DIR=m_bsd
|
|
|
|
MCL_DIR=mcl_bsd
|
2007-10-20 19:52:02 +00:00
|
|
|
|
|
|
|
MINGL_EXE_NAME=../fteqw.mingl
|
|
|
|
MINGL_DIR=mingl_bsd
|
2005-05-20 08:13:48 +00:00
|
|
|
endif
|
2007-09-02 19:55:17 +00:00
|
|
|
ifneq ($(shell echo $(FTE_TARGET)|grep linux),)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
SV_DIR=sv_linux$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
SV_LDFLAGS=-lz
|
2009-06-08 08:10:32 +00:00
|
|
|
SV_EXE_NAME=../fteqw.sv$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2006-02-06 01:06:17 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o snd_alsa.oo cd_linux.o sys_linux.o
|
2007-10-26 14:25:34 +00:00
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
GLCL_OBJS+= sys_dosa.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
2007-09-02 19:55:17 +00:00
|
|
|
GL_EXE_NAME=../fteqw.gl$(BITS)
|
|
|
|
GLCL_EXE_NAME=../fteqwcl.gl$(BITS)
|
2007-10-26 14:51:12 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm -lXxf86dga
|
2008-05-13 12:03:52 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include -DUSE_DGA
|
2007-09-02 19:55:17 +00:00
|
|
|
GLB_DIR=gl_linux$(BITS)
|
|
|
|
GLCL_DIR=glcl_linux$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2009-07-16 22:06:59 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o snd_linux.o snd_alsa.oo cd_linux.o sys_linux.o
|
2007-10-26 14:25:34 +00:00
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
MCL_OBJS+= sys_dosa.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
2007-09-02 19:55:17 +00:00
|
|
|
M_EXE_NAME=../fteqw$(BITS)
|
|
|
|
MCL_EXE_NAME=../fteqwcl$(BITS)
|
2007-10-26 14:51:12 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm -lXxf86dga
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include
|
2007-09-02 19:55:17 +00:00
|
|
|
MB_DIR=m_linux$(BITS)
|
|
|
|
MCL_DIR=mcl_linux$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-02 19:55:17 +00:00
|
|
|
MINGL_EXE_NAME=../fteqw.mingl$(BITS)
|
|
|
|
MINGL_DIR=mingl_linux$(BITS)
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
2007-11-02 00:30:47 +00:00
|
|
|
ifneq ($(shell echo $(FTE_TARGET)|grep macosx),)
|
|
|
|
SV_DIR=sv_macosx$(EXTENSION)$(BITS)
|
|
|
|
GLB_DIR=gl_macosx$(EXTENSION)$(BITS)
|
|
|
|
GLCL_DIR=glcl_macosx$(EXTENSION)$(BITS)
|
|
|
|
MINGL_DIR=mingl_macosx$(EXTENSION)$(BITS)
|
2007-09-22 19:28:27 +00:00
|
|
|
|
2009-07-22 05:43:13 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) -D__MACOSX__ -L/sw/lib -I/sw/include -L/opt/local/lib -I/opt/local/include
|
2009-07-19 10:11:32 +00:00
|
|
|
GL_LDFLAGS=-framework AGL -framework OpenGL -framework Cocoa -framework AudioUnit -lz -lpng -ljpeg
|
2007-09-23 22:00:19 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidcocoa.mo gl_vidmacos.o sys_linux.o in_macos.o cd_null.o snd_macos.o
|
2007-09-22 19:28:27 +00:00
|
|
|
|
2007-11-02 00:30:47 +00:00
|
|
|
GL_EXE_NAME=../macosx_fteqw.gl$(EXTENSION)$(BITS)
|
|
|
|
GLCL_EXE_NAME=../macosx_fteqwcl.gl$(EXTENSION)$(BITS)
|
|
|
|
M_EXE_NAME=../macosx_fteqw$(EXTENSION)$(BITS)
|
|
|
|
MCL_EXE_NAME=../macosx_fteqwcl$(EXTENSION)$(BITS)
|
|
|
|
MINGL_EXE_NAME=../macosx_fteqw.mingl$(EXTENSION)$(BITS)
|
|
|
|
MINGL_DIR=mingl_macosx$(EXTENSION)$(BITS)
|
|
|
|
|
|
|
|
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(SERVERONLY_OBJS)
|
|
|
|
SV_EXE_NAME=../macosx_fteqw.sv$(EXTENSION)$(BITS)
|
2009-07-19 11:05:00 +00:00
|
|
|
SV_CFLAGS=$(SERVER_ONLY_CFLAGS)
|
|
|
|
SV_LDFLAGS=-lz
|
2007-09-23 22:00:19 +00:00
|
|
|
|
|
|
|
#seems, macosx has a more limited version of strip
|
|
|
|
STRIPFLAGS=
|
2007-09-22 19:28:27 +00:00
|
|
|
endif
|
2006-03-06 22:15:40 +00:00
|
|
|
ifeq ($(FTE_TARGET),morphos)
|
|
|
|
|
|
|
|
SV_DIR=sv_morphos
|
|
|
|
SV_LDFLAGS=-lz
|
|
|
|
|
2006-03-06 22:17:43 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidmorphos.o in_morphos.o snd_morphos.o cd_null.o sys_morphos.o
|
2007-11-02 00:30:47 +00:00
|
|
|
GL_EXE_NAME=../morphos_fteqw.gl
|
|
|
|
GLCL_EXE_NAME=../morphos_fteqwcl.gl
|
2007-10-20 14:23:41 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -ldl $(IMAGELDFLAGS) -lz
|
2006-07-08 23:26:47 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) -noixemul
|
2006-03-06 22:15:40 +00:00
|
|
|
GLB_DIR=gl_morphos
|
|
|
|
GLCL_DIR=glcl_morphos
|
|
|
|
|
2006-03-06 22:17:43 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidmorphos.o vid_morphos.o in_morphos.o snd_morphos.o cd_null.o sys_morphos.o
|
2007-11-02 00:30:47 +00:00
|
|
|
M_EXE_NAME=../morphos_fteqw
|
|
|
|
MCL_EXE_NAME=../morphos_fteqwcl
|
2006-03-06 22:15:40 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS)
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=$(GLCFLAGS)
|
2006-03-06 22:15:40 +00:00
|
|
|
MB_DIR=m_morphos
|
|
|
|
MCL_DIR=mcl_morphos
|
|
|
|
|
2007-11-02 00:30:47 +00:00
|
|
|
MINGL_EXE_NAME=../morphos_fteqw.mingl
|
2006-03-06 22:15:40 +00:00
|
|
|
MINGL_DIR=mingl_morphos
|
2007-11-02 00:30:47 +00:00
|
|
|
|
|
|
|
#morphos dedicated server doesnt compile: alloca.h: No such file or directory
|
|
|
|
#SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(SERVERONLY_OBJS)
|
|
|
|
#SV_EXE_NAME=../morphos_fteqw.sv$(BITS)
|
|
|
|
#SV_CFLAGS=$(SERVER_ONLY_CFLAGS)
|
2006-03-06 22:15:40 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2005-12-15 19:15:39 +00:00
|
|
|
ifeq ($(FTE_TARGET),cygwin)
|
|
|
|
|
|
|
|
SV_DIR=sv_cygwin
|
|
|
|
SV_LDFLAGS=-lz
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
|
|
|
else
|
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o
|
|
|
|
endif
|
|
|
|
GL_EXE_NAME=../fteqwglcyg.exe
|
|
|
|
GLCL_EXE_NAME=../fteqwclglcyg.exe
|
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS)
|
2007-08-06 21:13:15 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include
|
2005-12-15 19:15:39 +00:00
|
|
|
GLB_DIR=gl_cygwin
|
|
|
|
GLCL_DIR=glcl_cygwin
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
2009-07-16 22:06:59 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
2005-12-15 19:15:39 +00:00
|
|
|
else
|
2009-07-16 22:06:59 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o
|
2005-12-15 19:15:39 +00:00
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqwcyg.exe
|
|
|
|
MCL_EXE_NAME=../fteqwclcyg.exe
|
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS)
|
2009-07-16 22:06:59 +00:00
|
|
|
M_CFLAGS=$(GLCFLAGS)
|
2005-12-15 19:15:39 +00:00
|
|
|
MB_DIR=m_cygwin
|
|
|
|
MCL_DIR=mcl_cygwin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MINGL_EXE_NAME=../fteqwminglcyg.exe
|
|
|
|
MINGL_DIR=mingl_cygwin
|
|
|
|
endif
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
SV_DIR?=sv_sdl
|
|
|
|
|
|
|
|
.default: help
|
2007-09-02 19:55:17 +00:00
|
|
|
all: rel
|
2009-07-18 05:19:09 +00:00
|
|
|
rel: sv-rel gl-rel mingl-rel
|
|
|
|
dbg: sv-dbg gl-dbg mingl-dbg
|
2009-07-16 22:06:59 +00:00
|
|
|
relcl: glcl-rel mcl-rel
|
2007-09-02 19:55:17 +00:00
|
|
|
|
|
|
|
releases:
|
|
|
|
#this is for releasing things from a linux box
|
|
|
|
#just go through compiling absolutly everything
|
|
|
|
-$(MAKE) FTE_TARGET=linux32 rel
|
|
|
|
-$(MAKE) FTE_TARGET=linux64 rel
|
|
|
|
-$(MAKE) FTE_TARGET=win32 rel
|
|
|
|
# -$(MAKE) FTE_TARGET=linux32 relcl
|
|
|
|
# -$(MAKE) FTE_TARGET=linux64 relcl
|
|
|
|
# -$(MAKE) FTE_TARGET=win32 relcl
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2005-11-21 22:16:53 +00:00
|
|
|
autoconfig: clean
|
|
|
|
/bin/bash makeconfig.sh y
|
|
|
|
|
|
|
|
config: clean
|
|
|
|
/bin/bash makeconfig.sh
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2005-11-21 22:16:53 +00:00
|
|
|
ifneq ($(OUT_DIR),)
|
|
|
|
-include $(OUT_DIR)/*.d
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2009-07-16 22:06:59 +00:00
|
|
|
VPATH = $(BASE_DIR) : $(CLIENT_DIR) : $(GL_DIR) : $(COMMON_DIR) : $(SERVER_DIR) : $(HTTP_DIR) : $(BASE_DIR)/irc : $(BASE_DIR)/email : $(QUX_DIR) : $(PROGS_DIR) : $(SNDCODEC_DIR) : $(D3D7_DIR) : $(D3D9_DIR)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2007-10-25 17:59:01 +00:00
|
|
|
# This is for linking the FTE icon to the MinGW target
|
|
|
|
$(OUT_DIR)/resources.o : winquake.rc
|
|
|
|
$(WINDRES) -I$(CLIENT_DIR) -O coff $< $@
|
|
|
|
|
2009-04-03 07:31:54 +00:00
|
|
|
#npAPI stuff requires some extra resources
|
|
|
|
$(OUT_DIR)/npplug.o : ftequake/npplug.rc
|
|
|
|
$(WINDRES) -I$(CLIENT_DIR) -O coff $< $@
|
|
|
|
|
|
|
|
|
2005-11-21 22:16:53 +00:00
|
|
|
#$(OUT_DIR)/%.d: %.c
|
|
|
|
# @set -e; rm -f $@; \
|
|
|
|
# $(CC) -MM $(ALL_CFLAGS) $< > $@.$$$$; \
|
|
|
|
# sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
|
|
|
# rm -f $@.$$$$
|
|
|
|
|
|
|
|
$(OUT_DIR)/%.o $(OUT_DIR)/%.d : %.c
|
|
|
|
@set -e; rm -f $@.d; \
|
|
|
|
$(CC) -MM $(ALL_CFLAGS) $< > $@.d.$$$$; \
|
|
|
|
sed 's,\($*\)\.o[ :]*,\1.o $@.d : ,g' < $@.d.$$$$ > $@.d; \
|
|
|
|
rm -f $@.d.$$$$
|
2005-05-20 08:13:48 +00:00
|
|
|
$(DO_CC) -I$(OUT_DIR)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2006-02-06 01:06:17 +00:00
|
|
|
$(OUT_DIR)/%.oo $(OUT_DIR)/%.d : %.c
|
|
|
|
@set -e; rm -f $@.d; \
|
|
|
|
$(CC) -MM $(ALL_CFLAGS) $< > $@.d.$$$$; \
|
|
|
|
sed 's,\($*\)\.oo[ :]*,\1.oo $@.d : ,g' < $@.d.$$$$ > $@.d; \
|
|
|
|
rm -f $@.d.$$$$
|
|
|
|
$(DO_CC) -I$(OUT_DIR)
|
|
|
|
|
2007-09-23 22:00:19 +00:00
|
|
|
$(OUT_DIR)/%.mo $(OUT_DIR)/%.d : %.m
|
|
|
|
@set -e; rm -f $@.d; \
|
|
|
|
$(CC) -MM $(ALL_CFLAGS) $< > $@.d.$$$$; \
|
|
|
|
sed 's,\($*\)\.mo[ :]*,\1.mo $@.d : ,g' < $@.d.$$$$ > $@.d; \
|
|
|
|
rm -f $@.d.$$$$
|
|
|
|
$(DO_CC) -I$(OUT_DIR)
|
|
|
|
|
2005-05-20 08:13:48 +00:00
|
|
|
#enables use of precompiled headers in gcc 3.4 onwards.
|
|
|
|
$(OUT_DIR)/quakedef.h.gch : quakedef.h
|
|
|
|
$(CC) -x c $(BASE_CFLAGS) $(WCFLAGS) -o $@ -c $< $(CFLAGS)
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
#addprefix is to add the ./release/server/ part of the object name
|
|
|
|
#foreach is needed as the OBJS is a list of variable names containing object lists.
|
|
|
|
#which is needed as windows sucks too much for the chaining to carry a full list.
|
|
|
|
#god knows how gcc loads the list properly.
|
|
|
|
#or at least I hope he does. It makes no sence to mortals.
|
2005-05-20 08:13:48 +00:00
|
|
|
|
|
|
|
$(OUT_DIR)/$(EXE_NAME): $(OUT_DIR)/quakedef.h.gch $(addprefix $(OUT_DIR)/, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol))))
|
2005-01-24 23:47:32 +00:00
|
|
|
$(CC) $(WCFLAGS) -o $@ $(addprefix $(OUT_DIR)/, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol)))) $(LDFLAGS) $(CFLAGS)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
_out-rel:
|
2005-01-24 05:06:16 +00:00
|
|
|
$(MAKE) $(OUT_DIR)/$(EXE_NAME) EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(WCFLAGS) $(RELEASE_CFLAGS)" LDFLAGS="$(BASELDFLAGS) $(LDFLAGS)" OBJS="$(OBJS)"
|
2006-05-02 00:11:29 +00:00
|
|
|
$(STRIP) $(STRIPFLAGS) $(OUT_DIR)/$(EXE_NAME)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
_out-dbg:
|
2005-01-24 05:06:16 +00:00
|
|
|
$(MAKE) $(OUT_DIR)/$(EXE_NAME) EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(WCFLAGS) $(DEBUG_CFLAGS)" LDFLAGS="$(BASELDFLAGS) $(LDFLAGS)" OBJS="$(OBJS)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2006-03-06 22:15:40 +00:00
|
|
|
_cl-rel: reldir
|
2005-05-26 12:55:34 +00:00
|
|
|
$(MAKE) _out-rel EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(CLIENT_ONLY_CFLAGS) $(WCFLAGS)" LDFLAGS="$(LDFLAGS)" SOBJS="$(SOBJS)" OBJS="SOBJS COMMON_OBJS CLIENT_OBJS PROGS_OBJS"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2006-03-06 22:15:40 +00:00
|
|
|
_cl-dbg: debugdir
|
2005-05-26 12:55:34 +00:00
|
|
|
$(MAKE) _out-dbg EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(CLIENT_ONLY_CFLAGS) $(WCFLAGS)" LDFLAGS="$(LDFLAGS)" SOBJS="$(SOBJS)" OBJS="SOBJS COMMON_OBJS CLIENT_OBJS PROGS_OBJS"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
_clsv-rel: reldir
|
2005-05-26 12:55:34 +00:00
|
|
|
$(MAKE) _out-rel EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(JOINT_CFLAGS) $(WCFLAGS)" LDFLAGS="$(LDFLAGS)" SOBJS="$(SOBJS)" OBJS="SOBJS COMMON_OBJS CLIENT_OBJS PROGS_OBJS SERVER_OBJS"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
_clsv-dbg: debugdir
|
2005-05-26 12:55:34 +00:00
|
|
|
$(MAKE) _out-dbg EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(JOINT_CFLAGS) $(WCFLAGS)" LDFLAGS="$(LDFLAGS)" SOBJS="$(SOBJS)" OBJS="SOBJS COMMON_OBJS CLIENT_OBJS PROGS_OBJS SERVER_OBJS"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
sv-tmp: reldir debugdir
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(SV_EXE_NAME)" WCFLAGS="$(SV_CFLAGS)" LDFLAGS="$(SV_LDFLAGS) $(LDFLAGS)" OBJS="SV_OBJS"
|
2005-01-23 17:44:11 +00:00
|
|
|
sv-rel:
|
|
|
|
$(MAKE) sv-tmp TYPE=_out-rel OUT_DIR="$(RELEASE_DIR)/$(SV_DIR)"
|
|
|
|
sv-dbg:
|
|
|
|
$(MAKE) sv-tmp TYPE=_out-dbg OUT_DIR="$(DEBUG_DIR)/$(SV_DIR)"
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
|
2007-09-17 20:35:39 +00:00
|
|
|
d3dcl-tmp:
|
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(D3DCL_EXE_NAME)" WCFLAGS="$(D3D_CFLAGS)" LDFLAGS="$(D3D_LDFLAGS) $(LDFLAGS)" SOBJS="$(D3DCL_OBJS)"
|
|
|
|
d3d-tmp:
|
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(D3D_EXE_NAME)" WCFLAGS="$(D3D_CFLAGS)" LDFLAGS="$(D3D_LDFLAGS) $(LDFLAGS)" SOBJS="$(D3DCL_OBJS)"
|
|
|
|
|
|
|
|
d3dcl-rel:
|
|
|
|
$(MAKE) d3dcl-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(D3DCL_DIR)"
|
|
|
|
d3dcl-dbg:
|
|
|
|
$(MAKE) d3dcl-tmp TYPE=_cl-dbg OUT_DIR="$(DEBUG_DIR)/$(D3DCL_DIR)"
|
|
|
|
d3d-rel:
|
|
|
|
$(MAKE) d3d-tmp TYPE=_clsv-rel OUT_DIR="$(RELEASE_DIR)/$(D3DB_DIR)"
|
|
|
|
d3d-dbg:
|
|
|
|
$(MAKE) d3d-tmp TYPE=_clsv-dbg OUT_DIR="$(DEBUG_DIR)/$(D3DB_DIR)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
|
2009-04-03 07:31:54 +00:00
|
|
|
npqtvcl-tmp:
|
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(NPQTVCL_DLL_NAME)" WCFLAGS="$(NPQTV_CFLAGS)" LDFLAGS="$(NPQTV_LDFLAGS) $(LDFLAGS)" SOBJS="$(NPQTVCL_OBJS)"
|
|
|
|
npqtv-tmp:
|
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(NPQTV_DLL_NAME)" WCFLAGS="$(NPQTV_CFLAGS)" LDFLAGS="$(NPQTV_LDFLAGS) $(LDFLAGS)" SOBJS="$(NPQTVCL_OBJS)"
|
|
|
|
|
|
|
|
npqtvcl-rel:
|
|
|
|
$(MAKE) npqtvcl-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(NPQTVCL_DIR)"
|
|
|
|
npqtvcl-dbg:
|
|
|
|
$(MAKE) npqtvcl-tmp TYPE=_cl-dbg OUT_DIR="$(DEBUG_DIR)/$(NPQTVCL_DIR)"
|
|
|
|
npqtv-rel:
|
|
|
|
$(MAKE) npqtv-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(NPQTVB_DIR)"
|
|
|
|
npqtv-dbg:
|
|
|
|
$(MAKE) npqtv-tmp TYPE=_clsv-dbg OUT_DIR="$(DEBUG_DIR)/$(NPQTVB_DIR)"
|
|
|
|
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
glcl-tmp:
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(GLCL_EXE_NAME)" WCFLAGS="$(GL_CFLAGS)" LDFLAGS="$(GL_LDFLAGS) $(LDFLAGS)" SOBJS="$(GLCL_OBJS)"
|
2005-01-23 17:44:11 +00:00
|
|
|
gl-tmp:
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(GL_EXE_NAME)" WCFLAGS="$(GL_CFLAGS)" LDFLAGS="$(GL_LDFLAGS) $(LDFLAGS)" SOBJS="$(GLCL_OBJS)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
glcl-rel:
|
|
|
|
$(MAKE) glcl-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(GLCL_DIR)"
|
|
|
|
glcl-dbg:
|
|
|
|
$(MAKE) glcl-tmp TYPE=_cl-dbg OUT_DIR="$(DEBUG_DIR)/$(GLCL_DIR)"
|
|
|
|
gl-rel:
|
|
|
|
$(MAKE) gl-tmp TYPE=_clsv-rel OUT_DIR="$(RELEASE_DIR)/$(GLB_DIR)"
|
|
|
|
gl-dbg:
|
|
|
|
$(MAKE) gl-tmp TYPE=_clsv-dbg OUT_DIR="$(DEBUG_DIR)/$(GLB_DIR)"
|
|
|
|
|
|
|
|
|
2005-09-15 05:55:43 +00:00
|
|
|
mingl-tmp: reldir
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(MINGL_EXE_NAME)" WCFLAGS="$(GL_CFLAGS) -DMINIMAL" LDFLAGS="$(GL_LDFLAGS) $(LDFLAGS)" SOBJS="$(GLCL_OBJS)"
|
2005-01-24 05:06:16 +00:00
|
|
|
mingl-rel:
|
|
|
|
$(MAKE) mingl-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(MINGL_DIR)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
mcl-tmp:
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(MCL_EXE_NAME)" WCFLAGS="$(M_CFLAGS)" LDFLAGS="$(M_LDFLAGS) $(LDFLAGS)" SOBJS="$(MCL_OBJS)"
|
2005-02-06 02:47:36 +00:00
|
|
|
m-tmp:
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(M_EXE_NAME)" WCFLAGS="$(M_CFLAGS)" LDFLAGS="$(M_LDFLAGS) $(LDFLAGS)" SOBJS="$(MCL_OBJS)"
|
2005-02-06 02:47:36 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
mcl-rel:
|
|
|
|
$(MAKE) mcl-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(MCL_DIR)"
|
|
|
|
mcl-dbg:
|
|
|
|
$(MAKE) mcl-tmp TYPE=_cl-dbg OUT_DIR="$(DEBUG_DIR)/$(MCL_DIR)"
|
|
|
|
m-rel:
|
2007-09-02 19:55:17 +00:00
|
|
|
$(MAKE) m-tmp TYPE=_clsv-rel OUT_DIR="$(RELEASE_DIR)/$(MB_DIR)"
|
2005-01-23 17:44:11 +00:00
|
|
|
m-dbg:
|
2007-09-02 19:55:17 +00:00
|
|
|
$(MAKE) m-tmp TYPE=_clsv-dbg OUT_DIR="$(DEBUG_DIR)/$(MB_DIR)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2009-07-16 22:06:59 +00:00
|
|
|
.PHONY: m-tmp mcl-tmp mingl-tmp glcl-tmp gl-tmp sv-tmp _clsv-dbg _clsv-rel _cl-dbg _cl-rel _out-rel _out-dbg
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
ifdef windir
|
|
|
|
debugdir:
|
2005-07-25 13:37:57 +00:00
|
|
|
@-mkdir -p $(subst /,\, $(OUT_DIR))
|
2005-01-23 17:44:11 +00:00
|
|
|
reldir:
|
2005-07-25 13:37:57 +00:00
|
|
|
@-mkdir -p $(subst /,\, $(OUT_DIR))
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
|
|
|
reldir:
|
2005-07-25 13:37:57 +00:00
|
|
|
@-mkdir -p $(RELEASE_DIR)
|
|
|
|
@-mkdir -p $(OUT_DIR)
|
2005-01-23 17:44:11 +00:00
|
|
|
debugdir:
|
2005-07-25 13:37:57 +00:00
|
|
|
@-mkdir -p $(DEBUG_DIR)
|
|
|
|
@-mkdir -p $(OUT_DIR)
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
|
2005-01-24 05:06:16 +00:00
|
|
|
plugins:
|
2005-05-20 08:13:48 +00:00
|
|
|
ifneq ($(shell grep all ../plugins/Makefile),)
|
2005-01-24 05:06:16 +00:00
|
|
|
$(MAKE) -C ../plugins
|
2005-05-20 08:13:48 +00:00
|
|
|
else
|
2005-05-20 03:33:10 +00:00
|
|
|
@-echo no plugins directory installed
|
2005-05-20 08:13:48 +00:00
|
|
|
endif
|
|
|
|
plugins:
|
2005-01-24 05:06:16 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
help:
|
|
|
|
@-echo "Specfic targets:"
|
|
|
|
@-echo "clean - removes all output (use make dirs afterwards)"
|
|
|
|
@-echo "all - make all the targets possible"
|
2007-09-02 19:55:17 +00:00
|
|
|
@-echo "rel - make the releases for the default system"
|
2009-04-06 02:45:11 +00:00
|
|
|
@-echo "dbg - make the debug builds for the default system"
|
2005-01-23 17:44:11 +00:00
|
|
|
@-echo ""
|
|
|
|
@-echo "Normal targets:"
|
|
|
|
@-echo "(each of these targets must have the postfix -rel or -dbg)"
|
2009-04-06 02:45:11 +00:00
|
|
|
@-echo "'sv-???' (Dedicated Server)"
|
|
|
|
@-echo "'gl-???' (OpenGL rendering + Built-in Server)"
|
2009-07-16 22:06:59 +00:00
|
|
|
@-echo "'m-???' (Merged client, OpenGL & D3D rendering + Dedicated server)"
|
2009-04-06 02:45:11 +00:00
|
|
|
@-echo "'mingl-???' (Minimal featured OpenGL render)"
|
|
|
|
@-echo "'npqtv-???' (FTE_TARGET=win32 only, for now) (QuakeTV Firefox/Netscape browser plugin)"
|
|
|
|
@-echo "'d3d-???' (for windows builds)"
|
|
|
|
@-echo "'mcl-???' (currently broken)"
|
|
|
|
@-echo "'glcl-???' (currently broken)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
2005-12-15 19:15:39 +00:00
|
|
|
install:
|
|
|
|
-cp debug/*.* /opt/quake/
|
|
|
|
-cp release/*.* /opt/quake/
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
clean:
|
|
|
|
-rm -f -r $(RELEASE_DIR)
|
|
|
|
-rm -f -r $(DEBUG_DIR)
|
|
|
|
|