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
2011-07-08 09:17:23 +00:00
WHOAMI = $( shell whoami)
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
i f e q ( $( FTE_TARGET ) , w i n 3 2 )
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
e n d i f
2007-11-02 00:30:47 +00:00
2010-12-08 14:42:05 +00:00
#correct the gcc build when cross compiling
i f e q ( $( FTE_TARGET ) , w i n 6 4 )
ifeq ( $( shell $( CC) -v 2>& 1 | grep mingw) ,)
#CC didn't state that it was mingw... so try fixing that up
ifneq ( $( shell which amd64-mingw32msvc-gcc 2> /dev/null) ,)
#yup, the alternative exists (this matches the one debian has)
CC = amd64-mingw32msvc-gcc -m64
WINDRES = amd64-mingw32msvc-windres
STRIP = amd64-mingw32msvc-strip
2011-07-08 09:17:23 +00:00
# BITS=64
2010-12-08 14:42:05 +00:00
endif
endif
e n d i f
2009-04-08 08:12:29 +00:00
#correct the gcc build when cross compiling
2011-07-08 09:17:23 +00:00
i f e q ( $( shell echo $ ( FTE_TARGET ) |grep -v -i win 32_SDL ) , )
2009-04-08 08:12:29 +00:00
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
2011-07-08 09:17:23 +00:00
# BITS=32
2009-04-08 08:12:29 +00:00
endif
endif
e n d i f
2010-12-10 13:41:31 +00:00
#correct the gcc build when cross compiling
2011-07-08 09:17:23 +00:00
i f e q ( $( shell echo $ ( FTE_TARGET ) |grep -v -i win 64_SDL ) , )
2010-12-10 13:41:31 +00:00
ifeq ( $( shell $( CC) -v 2>& 1 | grep mingw) ,)
#CC didn't state that it was mingw... so try fixing that up
ifneq ( $( shell which amd64-mingw32msvc-gcc 2> /dev/null) ,)
#yup, the alternative exists (this matches the one debian has)
CC = amd64-mingw32msvc-gcc -m64
WINDRES = amd64-mingw32msvc-windres
STRIP = amd64-mingw32msvc-strip
2011-07-08 09:17:23 +00:00
# BITS=64
2010-12-10 13:41:31 +00:00
endif
endif
e n d i f
2007-11-02 00:30:47 +00:00
#crosscompile macosx from linux, default target ppc 32bit
i f e q ( $( FTE_TARGET ) , m a c o s x )
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
e n d i f
i f e q ( $( FTE_TARGET ) , m a c o s x _ p p c 6 4 )
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
e n d i f
i f e q ( $( FTE_TARGET ) , m a c o s x _ x 8 6 )
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
e n d i f
#crosscompile morphos from linux
i f e q ( $( FTE_TARGET ) , m o r p h o s )
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
e n d i f
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
i f e q ( $( FTE_TARGET ) , l i n u x 3 2 )
FTE_TARGET = linux
CC = gcc -m32
BITS = 32
e n d i f
i f e q ( $( FTE_TARGET ) , l i n u x 6 4 )
FTE_TARGET = linux
CC = gcc -m64
BITS = 64
e n d i f
2005-12-15 19:15:39 +00:00
2005-01-23 17:44:11 +00:00
i f e q ( $( 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.
e n d i f
2005-11-21 22:16:53 +00:00
i f n e q ( $( shell ls |grep config .h ) , )
HAVECONFIG = -DHAVE_CONFIG_H
e n d i f
2005-01-23 17:44:11 +00:00
CLIENT_DIR = $( BASE_DIR) /client
GL_DIR = $( BASE_DIR) /gl
2011-03-03 12:57:34 +00:00
D3D_DIR = $( BASE_DIR) /d3d
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
2009-09-05 11:03:25 +00:00
PROFILE_DIR = $( BASE_DIR) /profile
2005-01-23 17:44:11 +00:00
2005-11-21 22:16:53 +00:00
ALL_CFLAGS = $( HAVECONFIG) $( CFLAGS) $( BASE_CFLAGS) $( WCFLAGS)
2011-03-12 13:51:40 +00:00
#cheap compile-everything-in-one-unit (compile becomes preprocess only)
i f n e q ( $( WPO ) , )
LTO_CC = -E
LTO_LD = -combine -fwhole-program -x c
LTO_END = ltoxnone
LTO_START = ltoxc
e n d i f
#proper/consistant link-time optimisations (requires gcc 4.5+ or so)
i f n e q ( $( LTO ) , )
LTO_CC = -flto
LTO_LD = -flto
e n d i f
DO_CC = @echo $< && $( CC) $( LTO_CC) $( ALL_CFLAGS) -o $@ -c $<
2005-12-21 03:07:33 +00:00
2009-11-04 21:16:50 +00:00
i f e q ( $( FTE_TARGET ) , v c )
BASELDFLAGS =
e n d i f
2005-12-21 03:07:33 +00:00
i f e q ( $( FTE_TARGET ) , c y g w i n )
BASELDFLAGS = -lm
e n d i f
2006-03-06 22:15:40 +00:00
i f e q ( $( FTE_TARGET ) , m o r p h o s )
BASELDFLAGS = -lm
e n d i f
2006-03-14 01:29:45 +00:00
i f e q ( $( FTE_TARGET ) , b s d )
BASELDFLAGS = -lm
e n d i f
2007-07-23 18:55:10 +00:00
BASELDFLAGS ?= -lm -ldl -lpthread
2005-12-21 03:07:33 +00:00
2011-07-08 09:17:23 +00:00
i f e q ( $( shell echo $ ( FTE_TARGET ) |grep -v win ) , )
BASELDFLAGS = -lm
MINGW_LIBS_DIR = $( LIBS_DIR) /mingw-libs
ifeq ( $( shell echo $( FTE_TARGET) | grep -v win64) ,)
MINGW_LIBS_DIR = $( LIBS_DIR) /mingw64-libs
endif
IMAGELDFLAGS = $( MINGW_LIBS_DIR) /libpng.a $( MINGW_LIBS_DIR) /libz.a $( MINGW_LIBS_DIR) /libjpeg.a
RELEASE_CFLAGS = $( CPUOPTIMIZATIONS)
ifeq ( $( shell echo $( FTE_TARGET) | grep -v -i _SDL) ,)
RELEASE_CFLAGS += -D_SDL
SDL_LDFLAGS = $( MINGW_LIBS_DIR) /libSDL.a $( MINGW_LIBS_DIR) /libSDLmain.a
endif
2010-12-10 13:41:31 +00:00
e n d i f
2011-07-08 09:17:23 +00:00
2009-04-08 08:12:29 +00:00
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
2009-11-04 21:16:50 +00:00
i f e q ( $( FTE_TARGET ) , v c )
WARNINGFLAGS = -W3 -D_CRT_SECURE_NO_WARNINGS
GNUC_FUNCS =
e l s e
2010-11-15 02:45:59 +00:00
WARNINGFLAGS = -Wall -Wno-pointer-sign
2009-11-04 21:16:50 +00:00
GNUC_FUNCS = -Dstrnicmp= strncasecmp -Dstricmp= strcasecmp -D_vsnprintf= vsnprintf -D_snprintf= snprintf
e n d i f
2011-03-03 12:57:34 +00:00
BASE_CFLAGS = $( WARNINGFLAGS) $( GNUC_FUNCS) -I$( CLIENT_DIR) -I$( SERVER_DIR) -I$( COMMON_DIR) -I$( GL_DIR) -I$( D3D_DIR) -I$( PROGS_DIR) -I$( LIBS_DIR) -I$( LIBS_DIR) /dxsdk9/include -I$( LIBS_DIR) /sdl/include -I/usr/include/SDL -I$( LIBS_DIR) /sdl/include/SDL -I./libs/freetype2/include -I./libs/freetype2/include/freetype -I./libs/speex $( 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
2011-07-08 09:17:23 +00:00
#incase our compiler doesn't support it (mingw)
i f e q ( $( shell $ ( CC ) -v 2>&1 | grep -v unrecognised ) , )
DEBUG_CFLAGS += -rdynamic
2010-12-10 13:41:31 +00:00
e n d i f
2009-09-02 15:14:50 +00:00
2011-07-08 09:17:23 +00:00
PROFILE_CFLAGS = -pg
DX7SDK = -I./libs/dxsdk7/include/
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
2011-03-03 12:57:34 +00:00
CLIENT_OBJS = \
2005-01-23 17:44:11 +00:00
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_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 \
renderer.o \
renderque.o \
sbar.o \
skin.o \
2010-12-07 13:19:19 +00:00
snd_al.o \
2005-01-23 17:44:11 +00:00
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 \
2009-11-05 03:07:52 +00:00
gl_backend.o \
2005-01-23 17:44:11 +00:00
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 \
2009-11-07 13:29:15 +00:00
r_surf.o \
2005-01-23 17:44:11 +00:00
ltface.o \
2009-11-05 03:07:52 +00:00
r_2d.o \
2005-01-23 17:44:11 +00:00
gl_screen.o \
2006-03-03 03:31:19 +00:00
gl_bloom.o \
2009-11-04 21:16:50 +00:00
gl_shadow.o \
2005-01-23 17:44:11 +00:00
gl_shader.o \
gl_warp.o \
gl_vidcommon.o \
gl_hlmdl.o
2007-09-17 20:35:39 +00:00
D3DQUAKE_OBJS = \
2011-01-28 05:06:20 +00:00
d3d_backend.o \
d3d_image.o \
2011-04-01 12:52:58 +00:00
d3d_shader.o \
2011-01-28 05:39:40 +00:00
vid_d3d.o
2011-01-28 08:35:19 +00:00
D3DONLY_OBJS = \
gl_font.o \
gl_model.o \
gl_shader.o \
gl_rlight.o \
gl_alias.o \
gl_warp.o \
ltface.o \
r_surf.o \
r_2d.o
2007-09-17 20:35:39 +00:00
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 \
2009-08-29 15:17:43 +00:00
pr_x86.o \
2005-01-23 17:44:11 +00:00
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_phys.o \
sv_user.o \
sv_mvd.o \
sv_ccmds.o \
sv_rankin.o \
sv_chat.o \
sv_demo.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
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
2011-03-03 12:57:34 +00:00
COMMON_OBJS = \
2007-05-27 13:59:39 +00:00
com_mesh.o \
2009-11-05 01:42:19 +00:00
com_phys_ode.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 \
2011-02-27 02:04:36 +00:00
r_d3.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 \
2010-11-07 02:12:35 +00:00
world.o \
2010-11-07 03:58:09 +00:00
sv_move.o \
2005-01-23 17:44:11 +00:00
pmove.o \
pmovetst.o \
iwebiface.o \
translate.o \
plugin.o \
q1bsp.o \
q2pmove.o
#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
i f d e f w i n d i r
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
e l s e
2007-09-17 20:35:39 +00:00
GL_LDFLAGS = $( GLLDFLAGS) $( IMAGELDFLAGS) ` sdl-config --libs`
2005-01-23 17:44:11 +00:00
e n d i f
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-11-04 21:16:50 +00:00
SV_CFLAGS = $( SERVER_ONLY_CFLAGS)
2009-11-15 11:00:11 +00:00
SV_LDFLAGS = -lz
2009-04-07 03:48:32 +00:00
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)
i f d e f w i n d i r
2009-06-14 13:51:13 +00:00
M_LDFLAGS = $( MLDFLAGS) -lmingw32 -lws2_32 -lSDLmain -lSDL
2009-04-07 03:48:32 +00:00
e l s e
#pthread is needed because of SDL.
M_LDFLAGS = $( MLDFLAGS) ` sdl-config --libs` $( IMAGELDFLAGS)
e n d i f
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
2011-07-08 09:17:23 +00:00
#FTE_TARGET=win32_SDL | FTE_TARGET=win64_SDL (MinGW32 + SDL | MinGW64 + SDL)
2011-07-08 10:38:56 +00:00
i f e q ( $( shell echo $ ( FTE_TARGET ) |grep -E -i -v "win ( 32|64) _sdl $ $ ") , )
2011-07-08 09:17:23 +00:00
LIBS_DIR = ./libs
2011-07-08 10:38:56 +00:00
ifeq ( $( shell echo $( FTE_TARGET) | grep -i -v "win64_sdl" ) ,)
2011-07-08 09:17:23 +00:00
BITS = 64
endif
2009-04-08 08:12:29 +00:00
#the defaults for sdl come first
2011-03-12 13:51:40 +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 $( LTO_END) resources.o $( LTO_START)
2011-07-08 09:17:23 +00:00
GL_EXE_NAME = ../fteqw_sdl_gl$( BITS) .exe
GLCL_EXE_NAME = ../fteqwcl_sdl$( BITS) .exe
2009-04-08 08:12:29 +00:00
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
2011-07-08 09:17:23 +00:00
GL_LDFLAGS = $( IMAGELDFLAGS) -lws2_32 -lmingw32 $( SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $( GLLDFLAGS) ` sdl-config --libs`
2009-04-08 08:12:29 +00:00
endif
2011-07-08 09:17:23 +00:00
GL_CFLAGS = -D_SDL -I$( LIBS_DIR) -I$( MINGW_LIBS_DIR) / -I$( MINGW_LIBS_DIR) $( GLCFLAGS) ` sdl-config --cflags` $( DX7SDK)
ifeq ( $( shell echo $( FTE_TARGET) | grep -E -i -v "win32.*sdl" ) ,)
GL_CFLAGS += -D_MINGW_VFPRINTF
endif
2011-07-08 11:33:26 +00:00
GLB_DIR = sdl_gl_mgw_sdl$( BITS)
GLCL_DIR = sdl_glcl_mgw_sdl$( BITS)
2009-04-08 08:12:29 +00:00
2011-03-12 13:51:40 +00:00
SV_OBJS = $( COMMON_OBJS) $( SERVER_OBJS) $( PROGS_OBJS) $( WINDOWSSERVERONLY_OBJS) $( LTO_END) resources.o $( LTO_START)
2011-07-08 09:17:23 +00:00
SV_EXE_NAME = ../fteqw_sdl_sv$( BITS) .exe
2009-06-08 08:10:32 +00:00
SV_CFLAGS = $( SERVER_ONLY_CFLAGS) -D_SDL
2011-07-08 09:17:23 +00:00
SV_LDFLAGS = $( MINGW_LIBS_DIR) /libz.a -lm -lmingw32 -lws2_32 -lwinmm
2009-04-08 08:12:29 +00:00
MINGL_DIR = mingl_sdl$( BITS)
2011-07-08 09:17:23 +00:00
MINGL_EXE_NAME = ../fteqw_sdl_mingl$( BITS) .exe
2009-04-08 08:12:29 +00:00
MB_DIR = m_mgw_sdl$( BITS)
2011-07-08 09:17:23 +00:00
M_EXE_NAME = ../fteqw_sdl$( BITS) .exe
2011-03-12 13:51:40 +00:00
MCL_OBJS = $( GLQUAKE_OBJS) $( SOFTWARE_OBJS) $( D3DQUAKE_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $( LTO_END) resources.o $( LTO_START)
2011-07-08 09:17:23 +00:00
M_CFLAGS = $( D3DCFLAGS) -D_MINGW_VFPRINTF -D_SDL -I$( LIBS_DIR) -I$( MINGW_LIBS_DIR) / -I$( MINGW_LIBS_DIR) $( GLCFLAGS) ` sdl-config --cflags` -D_MERGED_SDL $( DX7SDK)
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.
2011-07-08 09:17:23 +00:00
M_LDFLAGS = $( IMAGELDFLAGS) -lws2_32 -lmingw32 $( MINGW_LIBS_DIR) /libSDL.a $( MINGW_LIBS_DIR) /libSDLmain.a -mwindows -ldxguid -lwinmm -lole32 $( MLDFLAGS) ` sdl-config --libs` $( IMAGELDFLAGS)
2009-04-08 08:12:29 +00:00
endif
2011-01-28 08:35:19 +00:00
2011-03-12 13:51:40 +00:00
D3DCL_OBJS = $( D3DQUAKE_OBJS) snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $( D3DONLY_OBJS) $( LTO_END) resources.o $( LTO_START)
2011-07-08 11:33:26 +00:00
D3D_EXE_NAME = ../fted3d_sdl_qw$( BITS) .exe
D3DCL_EXE_NAME = ../fted3d_sdl_clqw$( BITS) .exe
2011-07-08 09:17:23 +00:00
D3D_LDFLAGS = $( IMAGELDFLAGS) -lws2_32 -lmingw32 $( SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32
D3D_CFLAGS = $( D3DCFLAGS) -D_MINGW_VFPRINTF -D_SDL -DNO_XFLIP -I$( LIBS_DIR) -I$( MINGW_LIBS_DIR) / -I$( MINGW_LIBS_DIR) ` sdl-config --cflags` $( DX7SDK)
2011-07-08 11:33:26 +00:00
D3DB_DIR = sdl_d3d_mgw$( BITS)
D3DCL_DIR = sdl_d3dcl_mgw$( BITS)
2011-01-28 08:35:19 +00:00
2009-04-08 08:12:29 +00:00
e n d i f
2011-07-08 09:17:23 +00:00
#FTE_TARGET=vc (Visual C)
2009-11-04 21:16:50 +00:00
i f e q ( $( FTE_TARGET ) , v c )
CC = cl
DEBUG_CFLAGS ?= -Od $( CPUOPTIMIZATIONS) /fp:fast
PROFILE_CFLAGS = -O2 -Ot -Ox -GL $( CPUOPTIMISATIONS) /fp:fast
PROFILE_LDFLAGS = /LTCG:PGINSTRUMENT
RELEASE_CFLAGS = -O2 -Ot -Ox -GL $( CPUOPTIMIZATIONS) /fp:fast
RELEASE_LDFLAGS = /LTCG:PGOPTIMIZE
DO_CC = @$( CC) /nologo $( ALL_CFLAGS) -Fo$@ -c $<
DO_LD = link /nologo /out:$@ wsock32.lib user32.lib advapi32.lib winmm.lib libs/zlib.lib shell32.lib /nodefaultlib:libc.lib /nodefaultlib:MSVCRT /manifest:no /OPT:REF
PRECOMPHEADERS =
NODEPS = 1
LIBS_DIR = ./libs/
SV_CFLAGS = $( SERVER_ONLY_CFLAGS) $( W32_CFLAGS)
SV_EXE_NAME = ../fteqwsv.exe
SV_DIR = sv_vc
SV_OBJS = $( COMMON_OBJS) $( SERVER_OBJS) $( PROGS_OBJS) $( WINDOWSSERVERONLY_OBJS) fs_win32.o resources.o
SV_LDFLAGS = /subsystem:console
M_EXE_NAME = ../fteqw.exe
MCL_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
2011-01-28 05:39:40 +00:00
M_CFLAGS = $( GLCFLAGS) $( W32_CFLAGS) $( D3DCFLAGS)
2009-11-04 21:16:50 +00:00
MB_DIR = m_vc
2011-03-03 12:57:34 +00:00
M_LDFLAGS = $( GLLDFLAGS) libs/jpeg.lib libs/libpng.lib libs/zlib.lib uuid.lib gdi32.lib ole32.lib /subsystem:windows
2009-11-04 21:16:50 +00:00
e n d i f
2011-07-08 09:17:23 +00:00
#FTE_TARGET=win32 | FTE_TARGET=win64 (MinGW32 | MinGW64)
2011-07-08 10:38:56 +00:00
i f e q ( $( shell echo $ ( FTE_TARGET ) |grep -E -v "win ( 32|64) $ $ ") , )
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
2011-07-08 09:17:23 +00:00
2011-07-08 10:38:56 +00:00
ifeq ( $( FTE_TARGET) ,win64)
2011-07-08 09:17:23 +00:00
BITS = 64
endif
2006-10-05 21:59:43 +00:00
SV_CFLAGS = $( SERVER_ONLY_CFLAGS) $( W32_CFLAGS)
2005-01-24 23:47:32 +00:00
LIBS_DIR = $( BASE_DIR) /libs
2011-07-08 09:17:23 +00:00
SV_EXE_NAME = ../fteqwsv$( BITS) .exe
2011-07-08 11:33:26 +00:00
SV_LDFLAGS = $( MINGW_LIBS_DIR) /libz.a -lws2_32 -lwinmm
SV_DIR = sv_mingw$( BITS)
2011-03-12 13:51:40 +00:00
SV_OBJS = $( COMMON_OBJS) $( SERVER_OBJS) $( PROGS_OBJS) $( WINDOWSSERVERONLY_OBJS) fs_win32.o $( LTO_END) resources.o $( LTO_START)
2005-05-20 08:13:48 +00:00
2009-04-03 07:31:54 +00:00
2011-03-12 13:51:40 +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 $( LTO_END) resources.o $( LTO_START)
2011-07-08 09:17:23 +00:00
GL_EXE_NAME = ../fteglqw$( BITS) .exe
GLCL_EXE_NAME = ../fteglqwcl$( BITS) .exe
2009-06-14 13:51:13 +00:00
GL_LDFLAGS = $( GLLDFLAGS) $( IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32
2011-07-08 09:17:23 +00:00
GL_CFLAGS = $( GLCFLAGS) $( W32_CFLAGS) $( DX7SDK)
2011-07-08 11:33:26 +00:00
GLB_DIR = gl_mgw$( BITS)
GLCL_DIR = glcl_mgw$( BITS)
2005-01-23 17:44:11 +00:00
2011-03-12 13:51:40 +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_npqtv.o sys_plugfte.o $( LTO_END) npplug.o ../../ftequake/npapi.def $( LTO_START)
2011-07-08 09:17:23 +00:00
NPQTV_DLL_NAME = ../npqtv$( BITS) .dll
NPQTVCL_DLL_NAME = ../npqtvcl$( BITS) .dll
2009-06-14 13:51:13 +00:00
NPQTV_LDFLAGS = --enable-stdcall-fixup $( GLLDFLAGS) $( IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32 -shared
2011-07-08 09:17:23 +00:00
NPQTV_CFLAGS = $( NPQTVCFLAGS) $( GLCFLAGS) $( W32_CFLAGS) $( DX7SDK)
2011-07-08 11:33:26 +00:00
NPQTVB_DIR = npqtv_mgw$( BITS)
NPQTVCL_DIR = npqtvcl_mgw$( BITS)
2009-04-03 07:31:54 +00:00
2011-03-12 13:51:40 +00:00
MCL_OBJS = $( GLQUAKE_OBJS) $( SOFTWARE_OBJS) $( D3DQUAKE_OBJS) fs_win32.o gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o $( LTO_END) resources.o $( LTO_START)
2011-07-08 09:17:23 +00:00
M_EXE_NAME = ../fteqw$( BITS) .exe
MCL_EXE_NAME = ../fteqwcl$( BITS) .exe
2009-06-14 13:51:13 +00:00
M_LDFLAGS = $( GLLDFLAGS) $( IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32
2011-07-08 09:17:23 +00:00
M_CFLAGS = $( GLCFLAGS) $( W32_CFLAGS) $( D3DCFLAGS) $( DX7SDK)
2011-07-08 11:33:26 +00:00
MB_DIR = m_mgw$( BITS)
MCL_DIR = mcl_mgw$( BITS)
2005-01-23 17:44:11 +00:00
2011-03-12 13:51:40 +00:00
D3DCL_OBJS = $( D3DQUAKE_OBJS) snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o $( D3DONLY_OBJS) fs_win32.o $( LTO_END) resources.o $( LTO_START)
2011-07-08 09:17:23 +00:00
D3D_EXE_NAME = ../fted3dqw$( BITS) .exe
D3DCL_EXE_NAME = ../fted3dclqw$( BITS) .exe
2011-01-28 08:35:19 +00:00
D3D_LDFLAGS = $( IMAGELDFLAGS) -ldxguid -lws2_32 -lwinmm -lgdi32 -lole32
2011-07-08 09:17:23 +00:00
D3D_CFLAGS = $( D3DCFLAGS) $( W32_CFLAGS) $( DX7SDK)
2011-07-08 11:33:26 +00:00
D3DB_DIR = d3d_mgw$( BITS)
D3DCL_DIR = d3dcl_mgw$( BITS)
2007-09-17 20:35:39 +00:00
2011-07-08 16:27:10 +00:00
MINGL_EXE_NAME = ../fteminglqw( $BITS ) .exe
2011-07-08 11:33:26 +00:00
MINGL_DIR = mingl_mgw$( BITS)
2005-01-23 17:44:11 +00:00
e n d i f
2010-12-08 14:42:05 +00:00
2005-05-20 08:13:48 +00:00
i f e q ( $( FTE_TARGET ) , b s d )
#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
GLCL_OBJS = $( GL_OBJS) $( GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o
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
2010-12-07 13:19:19 +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
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
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
e n d i f
2007-09-02 19:55:17 +00:00
i f n e q ( $( 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
2011-01-29 19:53:38 +00:00
GLCL_OBJS = $( GL_OBJS) $( GLQUAKE_OBJS) gl_vidlinuxglx.o snd_alsa.o snd_linux.o cd_linux.o sys_linux.o
2007-09-02 19:55:17 +00:00
GL_EXE_NAME = ../fteqw.gl$( BITS)
GLCL_EXE_NAME = ../fteqwcl.gl$( BITS)
2010-12-07 13:19:19 +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
2010-11-18 06:44:46 +00:00
MCL_OBJS = $( GLQUAKE_OBJS) $( SOFTWARE_OBJS) gl_vidlinuxglx.o snd_linux.o snd_alsa.o cd_linux.o sys_linux.o
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
e n d i f
2007-11-02 00:30:47 +00:00
i f n e q ( $( 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
2011-07-08 10:57:35 +00:00
GL_CFLAGS = $( GLCFLAGS) -D__MACOSX__ -L/sw/lib -I/sw/include -L/opt/local/lib -I/opt/local/include -I$( LIBS_DIR) -I./libs/speex
2011-07-08 09:17:23 +00:00
ifeq ( $( WHOAMI) ,moodles)
GL_CFLAGS += -I/home/moodles/mac/include/ -L/home/moodles/mac/lib
endif
2010-12-16 03:25:37 +00:00
ifeq ( $( FTE_TARGET) ,macosx_x86)
2011-07-08 10:57:35 +00:00
GL_CFLAGS = $( GLCFLAGS) -D__MACOSX__ -L/sw/lib -I/sw/include -L/opt/local/lib -I/opt/local/include -I$( LIBS_DIR) -I./libs/speex
2011-07-08 09:17:23 +00:00
ifeq ( $( WHOAMI) ,moodles)
GL_CFLAGS += -I/home/moodles/mac/x86/include/ -L/home/moodles/mac/x86/lib
endif
2010-12-16 03:25:37 +00:00
endif
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
e n d i f
2006-03-06 22:15:40 +00:00
i f e q ( $( FTE_TARGET ) , m o r p h o s )
2010-11-18 06:44:46 +00:00
#-Wno-pointer-sign unrecognised
WARNINGFLAGS = -Wall
2006-03-06 22:15:40 +00:00
SV_DIR = sv_morphos
2010-12-09 07:37:22 +00:00
SV_LDFLAGS = -ldl -lz
2006-03-06 22:15:40 +00:00
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
2010-12-09 03:52:48 +00:00
GL_CFLAGS = $( GLCFLAGS) -noixemul -I./libs/speex -I./
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
2010-12-09 07:37:22 +00:00
SV_OBJS = $( COMMON_OBJS) $( SERVER_OBJS) $( PROGS_OBJS) $( SERVERONLY_OBJS)
SV_EXE_NAME = ../morphos_fteqw.sv$( BITS)
2011-07-08 09:17:23 +00:00
SV_CFLAGS = $( SERVER_ONLY_CFLAGS)
ifeq ( $( WHOAMI) ,moodles)
SV_CFLAGS += -I/home/moodles/zlib/zlib-1.2.5 -L/home/moodles/zlib/zlib-1.2.5 -I/home/moodles/fteqw/trunk/engine/libs
endif
2006-03-06 22:15:40 +00:00
e n d i f
2005-12-15 19:15:39 +00:00
i f e q ( $( FTE_TARGET ) , c y g w i n )
SV_DIR = sv_cygwin
SV_LDFLAGS = -lz
GLCL_OBJS = $( GL_OBJS) $( GLQUAKE_OBJS) gl_vidlinuxglx.o snd_linux.o cd_null.o sys_linux.o
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
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
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
e n d i f
2005-01-23 17:44:11 +00:00
SV_DIR ?= sv_sdl
.default : help
2007-09-02 19:55:17 +00:00
all : rel
2011-01-28 09:56:45 +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
2011-01-28 09:56:45 +00:00
profile : sv -profile gl -profile mingl -profile
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
2010-12-10 13:41:31 +00:00
-$( MAKE) FTE_TARGET = win64 rel
-$( MAKE) FTE_TARGET = win32_SDL rel
-$( MAKE) FTE_TARGET = win64_SDL rel
-$( MAKE) FTE_TARGET = morphos rel
-$( MAKE) FTE_TARGET = macosx rel
2007-09-02 19:55:17 +00:00
# -$(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
i f n e q ( $( OUT_DIR ) , )
2009-11-07 02:55:09 +00:00
- i n c l u d e $( OUT_DIR ) / * . o . d
2005-11-21 22:16:53 +00:00
e n d i f
2011-03-03 12:57:34 +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) : $( D3D_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
2009-11-04 21:16:50 +00:00
i f e q ( $( NODEPS ) , )
2005-11-21 22:16:53 +00:00
@set -e; rm -f $@ .d; \
$( CC) -MM $( ALL_CFLAGS) $< > $@ .d.$$ $$ ; \
2009-11-07 02:55:09 +00:00
sed 's,\($*\)\.o[ :]*,$@ $@.d : ,g' < $@ .d.$$ $$ > $@ .d; \
sed -e 's/.*://' -e 's/\\$$//' < $@ .d.$$ $$ | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@ .d; \
2005-11-21 22:16:53 +00:00
rm -f $@ .d.$$ $$
2009-11-04 21:16:50 +00:00
e n d i f
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
2009-11-04 21:16:50 +00:00
i f e q ( $( NODEPS ) , )
2006-02-06 01:06:17 +00:00
@set -e; rm -f $@ .d; \
$( CC) -MM $( ALL_CFLAGS) $< > $@ .d.$$ $$ ; \
2009-11-07 02:55:09 +00:00
sed 's,\($*\)\.oo[ :]*,$@ $@.d : ,g' < $@ .d.$$ $$ > $@ .d; \
sed -e 's/.*://' -e 's/\\$$//' < $@ .d.$$ $$ | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@ .d; \
2006-02-06 01:06:17 +00:00
rm -f $@ .d.$$ $$
2009-11-04 21:16:50 +00:00
e n d i f
2006-02-06 01:06:17 +00:00
$( 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.$$ $$ ; \
2009-11-07 02:55:09 +00:00
sed 's,\($*\)\.mo[ :]*,$@ $@.d : ,g' < $@ .d.$$ $$ > $@ .d; \
sed -e 's/.*://' -e 's/\\$$//' < $@ .d.$$ $$ | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@ .d; \
2007-09-23 22:00:19 +00:00
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)
2009-11-04 21:16:50 +00:00
PRECOMPHEADERS ?= $( OUT_DIR) /quakedef.h.gch
2005-05-20 08:13:48 +00:00
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
2011-03-12 13:51:40 +00:00
DO_LD ?= $( CC) -o $@ $( LTO_LD) $( WCFLAGS) $( CFLAGS)
$(OUT_DIR)/$(EXE_NAME) : $( PRECOMPHEADERS ) $( foreach fn , $ ( CUSTOMOBJS ) $ ( foreach ol , $ ( OBJS ) , $ ( $ ( ol ) ) ) ,$ ( if $ ( findstring ltox ,$ ( fn ) ) ,,$ ( OUT_DIR ) /$ ( fn ) ) )
$( DO_LD) $( foreach fn, $( CUSTOMOBJS) $( foreach ol, $( OBJS) $( LTO_END) , $( $( ol) ) ) ,$( if $( findstring ltox,$( fn) ) ,$( subst ltox,-x ,$( fn) ) ,$( OUT_DIR) /$( fn) ) ) -x none $( LDFLAGS)
2005-01-23 17:44:11 +00:00
_out-rel :
2009-11-04 21:16:50 +00:00
$( MAKE) $( OUT_DIR) /$( EXE_NAME) EXE_NAME = " $( EXE_NAME) " OUT_DIR = " $( OUT_DIR) " WCFLAGS = " $( WCFLAGS) $( RELEASE_CFLAGS) " LDFLAGS = " $( BASELDFLAGS) $( LDFLAGS) $( RELEASE_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 :
2009-11-04 21:16:50 +00:00
$( MAKE) $( OUT_DIR) /$( EXE_NAME) EXE_NAME = " $( EXE_NAME) " OUT_DIR = " $( OUT_DIR) " WCFLAGS = " $( WCFLAGS) $( DEBUG_CFLAGS) " LDFLAGS = " $( BASELDFLAGS) $( LDFLAGS) $( DEBUG_LDFLAGS) " OBJS = " $( OBJS) "
2005-01-23 17:44:11 +00:00
2009-09-05 11:03:25 +00:00
_out-profile :
2009-11-04 21:16:50 +00:00
$( MAKE) $( OUT_DIR) /$( EXE_NAME) EXE_NAME = " $( EXE_NAME) " OUT_DIR = " $( OUT_DIR) " WCFLAGS = " $( WCFLAGS) $( PROFILE_CFLAGS) " LDFLAGS = " $( BASELDFLAGS) $( LDFLAGS) $( PROFILE_LDFLAGS) " OBJS = " $( OBJS) "
2009-09-05 11:03:25 +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
2009-09-05 11:03:25 +00:00
_cl-profile : reldir
$( MAKE) _out-profile 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
2009-09-05 11:03:25 +00:00
_clsv-profile : reldir
$( MAKE) _out-profile 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) "
2009-09-05 11:03:25 +00:00
sv-profile :
$( MAKE) sv-tmp TYPE = _out-profile OUT_DIR = " $( PROFILE_DIR) / $( SV_DIR) "
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) "
2009-09-05 11:03:25 +00:00
d3dcl-profile :
$( MAKE) d3dcl-tmp TYPE = _cl-profile OUT_DIR = " $( PROFILE_DIR) / $( D3DCL_DIR) "
2007-09-17 20:35:39 +00:00
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) "
2009-09-05 11:03:25 +00:00
d3d-profile :
$( MAKE) d3d-tmp TYPE = _clsv-profile OUT_DIR = " $( PROFILE_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) "
2009-09-05 11:03:25 +00:00
npqtvcl-profile :
$( MAKE) npqtvcl-tmp TYPE = _cl-profile OUT_DIR = " $( PROFILE_DIR) / $( NPQTVCL_DIR) "
2009-04-03 07:31:54 +00:00
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) "
2009-09-05 11:03:25 +00:00
npqtv-profile :
$( MAKE) npqtv-tmp TYPE = _cl-profile OUT_DIR = " $( PROFILE_DIR) / $( NPQTVB_DIR) "
2009-04-03 07:31:54 +00:00
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) "
2009-09-05 11:03:25 +00:00
glcl-profile :
$( MAKE) glcl-tmp TYPE = _cl-profile OUT_DIR = " $( PROFILE_DIR) / $( GLCL_DIR) "
2005-01-23 17:44:11 +00:00
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) "
2009-09-05 11:03:25 +00:00
gl-profile :
$( MAKE) gl-tmp TYPE = _clsv-profile OUT_DIR = " $( PROFILE_DIR) / $( GLB_DIR) "
2005-01-23 17:44:11 +00:00
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) "
2009-09-04 15:29:08 +00:00
mingl-dbg :
$( MAKE) mingl-tmp TYPE = _cl-dbg OUT_DIR = " $( DEBUG_DIR) / $( MINGL_DIR) "
2009-09-05 11:03:25 +00:00
mingl-profile :
$( MAKE) mingl-tmp TYPE = _cl-profile OUT_DIR = " $( PROFILE_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) "
2009-09-05 11:03:25 +00:00
mcl-profile :
$( MAKE) mcl-tmp TYPE = _cl-profile OUT_DIR = " $( PROFILE_DIR) / $( MCL_DIR) "
2005-01-23 17:44:11 +00:00
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) "
2009-09-05 11:03:25 +00:00
m-profile :
$( MAKE) m-tmp TYPE = _clsv-profile OUT_DIR = " $( PROFILE_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
i f d e f w i n d i r
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
e l s e
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
e n d i f
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"
2009-09-05 11:03:25 +00:00
@-echo "profile - make all the releases with profiling support 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)"
2009-11-04 21:16:50 +00:00
@-echo ""
@-echo "Cross targets can be specified with FTE_TARGET=blah"
@-echo "linux32, linux64 specify specific x86 archs"
@-echo "SDL - Attempt to use sdl for the current target"
@-echo "win32 - Mingw compile for win32"
@-echo "vc - Attempts to use msvc8+ to compile. Note: uses profile guided optimisations. You must build+run the relevent profile target before a release target will compile properly. Debug doesn't care."
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/
2009-09-05 11:03:25 +00:00
-cp profile/*.* /opt/quake
2005-12-15 19:15:39 +00:00
2005-01-23 17:44:11 +00:00
clean :
-rm -f -r $( RELEASE_DIR)
-rm -f -r $( DEBUG_DIR)
2009-09-05 11:03:25 +00:00
-rm -f -r $( PROFILE_DIR)
2005-01-23 17:44:11 +00:00