2005-01-23 17:44:11 +00:00
|
|
|
CC=gcc
|
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=.
|
|
|
|
|
2005-12-15 19:15:39 +00:00
|
|
|
#we only autodetect one cross target
|
|
|
|
#linux->win32
|
|
|
|
#if you are cross compiling, you'll need to use FTE_TARGET=mytaget
|
|
|
|
|
|
|
|
|
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
|
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
|
|
|
|
SW_DIR=$(BASE_DIR)/sw
|
|
|
|
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
|
|
|
|
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
|
2005-12-21 03:07:33 +00:00
|
|
|
BASELDFLAGS ?= -lm -ldl
|
|
|
|
|
2005-10-14 18:30:13 +00:00
|
|
|
#BASELDFLAGS=-lm -lz
|
2005-12-15 19:15:39 +00:00
|
|
|
GLXLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lpng -ljpeg
|
2005-01-23 17:44:11 +00:00
|
|
|
GLSLDFLAGS=-L/usr/X11R6/lib -lMesaGL -lglide -lvga
|
|
|
|
XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lpng -ljpeg
|
|
|
|
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
|
|
|
|
|
2006-03-06 22:15:40 +00:00
|
|
|
BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(SW_DIR) -I$(GL_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(QUX_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -D_vsnprintf=vsnprintf -D_snprintf=snprintf
|
2005-01-23 17:44:11 +00:00
|
|
|
CLIENT_ONLY_CFLAGS=-DCLIENTONLY
|
|
|
|
SERVER_ONLY_CFLAGS=-DSERVERONLY
|
|
|
|
JOINT_CFLAGS=
|
|
|
|
DEBUG_CFLAGS=-ggdb -g
|
|
|
|
RELEASE_CFLAGS=-O6 -s -fno-strict-aliasing -ffast-math -funroll-loops -fexpensive-optimizations $(CPUOPTIMIZATIONS)
|
|
|
|
GLCFLAGS=-DGLQUAKE
|
|
|
|
SWCFLAGS=-DSWQUAKE
|
|
|
|
|
|
|
|
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 \
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
SOFTWARE_OBJS = $(SOFTWARE_ASM_OBJS) \
|
|
|
|
sw_screen.o \
|
|
|
|
sw_draw.o \
|
|
|
|
sw_model.o \
|
|
|
|
r_aclip.o \
|
|
|
|
r_alias.o \
|
|
|
|
r_bsp.o \
|
|
|
|
r_draw.o \
|
|
|
|
r_edge.o \
|
|
|
|
r_light.o \
|
|
|
|
r_main.o \
|
|
|
|
r_misc.o \
|
|
|
|
r_sky.o \
|
|
|
|
r_sprite.o \
|
|
|
|
r_surf.o \
|
|
|
|
r_vars.o \
|
|
|
|
d_edge.o \
|
|
|
|
d_fill.o \
|
|
|
|
d_init.o \
|
|
|
|
d_modech.o \
|
|
|
|
d_part.o \
|
|
|
|
d_polyse.o \
|
|
|
|
d_scan.o \
|
|
|
|
d_sky.o \
|
|
|
|
d_sprite.o \
|
|
|
|
d_surf.o \
|
|
|
|
d_trans.o \
|
|
|
|
d_vars.o \
|
|
|
|
d_zpoint.o \
|
|
|
|
nonintel.o
|
|
|
|
|
|
|
|
GLQUAKE_OBJS = \
|
|
|
|
gl_alias.o \
|
|
|
|
gl_draw.o \
|
|
|
|
gl_model.o \
|
|
|
|
gl_ngraph.o \
|
|
|
|
gl_rlight.o \
|
|
|
|
gl_rmain.o \
|
|
|
|
gl_rmisc.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
|
|
|
|
|
|
|
|
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 \
|
|
|
|
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 \
|
|
|
|
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) \
|
|
|
|
common.o \
|
|
|
|
cvar.o \
|
|
|
|
cmd.o \
|
|
|
|
crc.o \
|
2005-09-09 23:40:55 +00:00
|
|
|
fs.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
|
|
|
|
GL_EXE_NAME=../fteqw_sdl.gl
|
|
|
|
GLCL_EXE_NAME=../fteqwcl_sdl.gl
|
|
|
|
ifdef windir
|
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lwsock32 `sdl-config --libs`
|
|
|
|
else
|
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -lpng -ljpeg `sdl-config --libs`
|
|
|
|
endif
|
|
|
|
GL_CFLAGS=$(GLCFLAGS) `sdl-config --cflags`
|
|
|
|
GLB_DIR=gl_sdl
|
|
|
|
GLCL_DIR=glcl_sdl
|
|
|
|
|
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_sdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o
|
|
|
|
SW_EXE_NAME=../fteqw_sdl.sw
|
|
|
|
SWCL_EXE_NAME=../fteqwcl_sdl.sw
|
|
|
|
ifdef windir
|
|
|
|
SW_LDFLAGS=$(SWLDFLAGS) -lmingw32 -lwsock32 -lSDLmain -lSDL
|
|
|
|
else
|
|
|
|
#pthread is needed because of SDL.
|
2005-05-20 08:13:48 +00:00
|
|
|
SW_LDFLAGS=$(SWLDFLAGS) `sdl-config --libs` -lpng -ljpeg
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
SW_CFLAGS=$(SWCFLAGS) `sdl-config --cflags`
|
|
|
|
SWB_DIR=sw_sdl
|
|
|
|
SWCL_DIR=swcl_sdl
|
|
|
|
|
2005-05-26 12:55:34 +00:00
|
|
|
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(SERVERONLY_OBJS)
|
2005-01-23 17:44:11 +00:00
|
|
|
SV_EXE_NAME=../fteqw.sv
|
|
|
|
SV_CFLAGS=$(SERVER_ONLY_CFLAGS)
|
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
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(FTE_TARGET),win32)
|
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
|
|
|
|
SV_LDFLAGS=libs/zlib.lib -lwsock32
|
|
|
|
SV_DIR=sv_mingw
|
2005-05-26 12:55:34 +00:00
|
|
|
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS)
|
2005-05-20 08:13:48 +00:00
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(USEASM),true)
|
2005-10-14 18:30:13 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o sys_dosa.o
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2005-10-14 18:30:13 +00:00
|
|
|
GLCL_OBJS=$(GL_OBJS) $(GLQUAKE_OBJS) gl_vidnt.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
GL_EXE_NAME=../fteglqw.exe
|
|
|
|
GLCL_EXE_NAME=../fteglqwcl.exe
|
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -ldxguid -lwsock32 -lwinmm -lgdi32 -lole32
|
|
|
|
GL_CFLAGS=$(GLCFLAGS)
|
|
|
|
GLB_DIR=gl_mgw
|
|
|
|
GLCL_DIR=glcl_mgw
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
2005-10-14 18:30:13 +00:00
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) 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
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2005-10-14 18:30:13 +00:00
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_ddraw.o vid_dib.o vid_win2.o snd_win.o snd_directx.o cd_win.o in_win.o sys_win.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
SW_EXE_NAME=../fteswqw.exe
|
|
|
|
SWCL_EXE_NAME=../fteswqwcl.exe
|
|
|
|
SW_LDFLAGS=$(SWLDFLAGS) -ldxguid -lwsock32 -lwinmm -lgdi32 -lole32
|
|
|
|
SW_CFLAGS=$(SWCFLAGS)
|
|
|
|
SWB_DIR=sw_mgw
|
|
|
|
SWCL_DIR=swcl_mgw
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
2005-10-14 18:30:13 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) 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
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2005-10-14 18:30:13 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) 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
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqw.exe
|
|
|
|
MCL_EXE_NAME=../fteqwcl.exe
|
|
|
|
M_LDFLAGS=$(GLLDFLAGS) -ldxguid -lwsock32 -lwinmm -lgdi32 -lole32
|
|
|
|
M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS)
|
|
|
|
MB_DIR=m_mgw
|
|
|
|
MCL_DIR=mcl_mgw
|
|
|
|
|
|
|
|
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
|
|
|
|
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=../fteqw.gl
|
|
|
|
GLCL_EXE_NAME=../fteqwcl.gl
|
2005-12-15 19:15:39 +00:00
|
|
|
GL_LDFLAGS= -L/usr/local/lib $(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm
|
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)
|
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_x.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
|
|
|
else
|
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_x.o snd_linux.o cd_null.o sys_linux.o
|
|
|
|
endif
|
|
|
|
SW_EXE_NAME=../fteqw.sw
|
|
|
|
SWCL_EXE_NAME=../fteqwcl.sw
|
|
|
|
SW_LDFLAGS=-L/usr/local/lib $(SWLDFLAGS) $(XLDFLAGS)
|
2006-03-06 22:15:40 +00:00
|
|
|
SW_CFLAGS=$(SWCFLAGS) -I/usr/local/include -I/usr/X11R6/include
|
2005-05-20 08:13:48 +00:00
|
|
|
SWB_DIR=sw_bsd
|
|
|
|
SWCL_DIR=swcl_bsd
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o vid_x.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
|
|
|
else
|
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o vid_x.o snd_linux.o cd_null.o sys_linux.o
|
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqw
|
|
|
|
MCL_EXE_NAME=../fteqwcl
|
2005-12-15 19:15:39 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm
|
2006-03-06 22:15:40 +00:00
|
|
|
M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS) -I/usr/X11R6/include
|
2005-05-20 08:13:48 +00:00
|
|
|
MB_DIR=m_bsd
|
|
|
|
MCL_DIR=mcl_bsd
|
|
|
|
endif
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(FTE_TARGET),linux)
|
|
|
|
|
|
|
|
SV_DIR=sv_linux
|
|
|
|
SV_LDFLAGS=-lz
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
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 sys_dosa.o
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
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
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
GL_EXE_NAME=../fteqw.gl
|
|
|
|
GLCL_EXE_NAME=../fteqwcl.gl
|
2005-12-15 19:15:39 +00:00
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm
|
2006-03-06 22:15:40 +00:00
|
|
|
GL_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include
|
2005-01-23 17:44:11 +00:00
|
|
|
GLB_DIR=gl_linux
|
|
|
|
GLCL_DIR=glcl_linux
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
2006-02-06 01:06:17 +00:00
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_x.o snd_linux.o snd_alsa.oo cd_linux.o sys_linux.o sys_dosa.o
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2006-02-06 01:06:17 +00:00
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_x.o snd_linux.o snd_alsa.oo cd_linux.o sys_linux.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
2005-01-26 17:16:08 +00:00
|
|
|
SW_EXE_NAME=../fteqw.sw
|
|
|
|
SWCL_EXE_NAME=../fteqwcl.sw
|
2005-01-23 17:44:11 +00:00
|
|
|
SW_LDFLAGS=$(SWLDFLAGS) $(XLDFLAGS)
|
2006-03-06 22:15:40 +00:00
|
|
|
SW_CFLAGS=$(SWCFLAGS) -I/usr/X11R6/include
|
2005-01-23 17:44:11 +00:00
|
|
|
SWB_DIR=sw_linux
|
|
|
|
SWCL_DIR=swcl_linux
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
2006-02-06 01:06:17 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o vid_x.o snd_linux.o snd_alsa.oo cd_linux.o sys_linux.o sys_dosa.o
|
2005-01-23 17:44:11 +00:00
|
|
|
else
|
2006-02-06 01:06:17 +00:00
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o vid_x.o snd_linux.o snd_alsa.oo cd_linux.o sys_linux.o
|
2005-01-23 17:44:11 +00:00
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqw
|
|
|
|
MCL_EXE_NAME=../fteqwcl
|
2005-12-15 19:15:39 +00:00
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm
|
2006-03-06 22:15:40 +00:00
|
|
|
M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS) -I/usr/X11R6/include
|
2005-01-23 17:44:11 +00:00
|
|
|
MB_DIR=m_linux
|
|
|
|
MCL_DIR=mcl_linux
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-09-15 05:55:43 +00:00
|
|
|
MINGL_EXE_NAME=../fteqw.mingl
|
|
|
|
MINGL_DIR=mingl_linux
|
2005-01-23 17:44:11 +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
|
2006-03-06 22:15:40 +00:00
|
|
|
GL_EXE_NAME=../fteqw.gl
|
|
|
|
GLCL_EXE_NAME=../fteqwcl.gl
|
|
|
|
GL_LDFLAGS=$(GLLDFLAGS) -ljpeg_shared -lpng_shared -lsyscall
|
|
|
|
GL_CFLAGS=$(GLCFLAGS) -noixemul -D__MORPHOS_SHAREDLIBS
|
|
|
|
GLB_DIR=gl_morphos
|
|
|
|
GLCL_DIR=glcl_morphos
|
|
|
|
|
2006-03-06 22:17:43 +00:00
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_morphos.o in_morphos.o snd_morphos.o cd_null.o sys_morphos.o
|
2006-03-06 22:15:40 +00:00
|
|
|
SW_EXE_NAME=../fteqw.sw
|
|
|
|
SWCL_EXE_NAME=../fteqwcl.sw
|
2006-05-02 00:11:29 +00:00
|
|
|
SW_LDFLAGS=$(SWLDFLAGS) -ljpeg_shared -lpng_shared -lsyscall
|
2006-03-06 22:15:40 +00:00
|
|
|
SW_CFLAGS=$(SWCFLAGS) -noixemul -D__MORPHOS_SHAREDLIBS
|
|
|
|
SWB_DIR=sw_morphos
|
|
|
|
SWCL_DIR=swcl_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
|
2006-03-06 22:15:40 +00:00
|
|
|
M_EXE_NAME=../fteqw
|
|
|
|
MCL_EXE_NAME=../fteqwcl
|
|
|
|
M_LDFLAGS=$(GLLDFLAGS)
|
|
|
|
M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS)
|
|
|
|
MB_DIR=m_morphos
|
|
|
|
MCL_DIR=mcl_morphos
|
|
|
|
|
|
|
|
MINGL_EXE_NAME=../fteqw.mingl
|
|
|
|
MINGL_DIR=mingl_morphos
|
|
|
|
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)
|
|
|
|
GL_CFLAGS=$(GLCFLAGS)
|
|
|
|
GLB_DIR=gl_cygwin
|
|
|
|
GLCL_DIR=glcl_cygwin
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_x.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
|
|
|
else
|
|
|
|
SWCL_OBJS=$(SOFTWARE_OBJS) vid_x.o snd_linux.o cd_null.o sys_linux.o
|
|
|
|
endif
|
|
|
|
SW_EXE_NAME=../fteqwswcyg.exe
|
|
|
|
SWCL_EXE_NAME=../fteqwclswcyg.exe
|
|
|
|
SW_LDFLAGS=$(SWLDFLAGS) $(XLDFLAGS)
|
|
|
|
SW_CFLAGS=$(SWCFLAGS)
|
|
|
|
SWB_DIR=sw_cygwin
|
|
|
|
SWCL_DIR=swcl_cygwin
|
|
|
|
|
|
|
|
ifeq ($(USEASM),true)
|
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o vid_x.o snd_linux.o cd_null.o sys_linux.o sys_dosa.o
|
|
|
|
else
|
|
|
|
MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidlinuxglx.o vid_x.o snd_linux.o cd_null.o sys_linux.o
|
|
|
|
endif
|
|
|
|
M_EXE_NAME=../fteqwcyg.exe
|
|
|
|
MCL_EXE_NAME=../fteqwclcyg.exe
|
|
|
|
M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS)
|
|
|
|
M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS)
|
|
|
|
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
|
2005-11-21 22:16:53 +00:00
|
|
|
all: sv-rel sw-rel gl-rel m-rel
|
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
|
|
|
|
|
|
|
|
|
|
|
|
VPATH = $(BASE_DIR) : $(CLIENT_DIR) : $(GL_DIR) : $(COMMON_DIR) : $(SW_DIR) : $(SERVER_DIR) : $(HTTP_DIR) : $(BASE_DIR)/irc : $(BASE_DIR)/email : $(QUX_DIR) : $(PROGS_DIR) : $(SNDCODEC_DIR)
|
2005-01-23 17:44:11 +00:00
|
|
|
|
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)
|
|
|
|
|
2005-01-23 17:44:11 +00:00
|
|
|
ifeq ($(USEASM),true)
|
2005-01-26 17:16:08 +00:00
|
|
|
$(OUT_DIR)/%.o : %.s sw/*.h
|
2005-01-23 17:44:11 +00:00
|
|
|
$(DO_AS)
|
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
swcl-tmp:
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(SWCL_EXE_NAME)" WCFLAGS="$(SW_CFLAGS)" LDFLAGS="$(SW_LDFLAGS) $(LDFLAGS)" SOBJS="$(SWCL_OBJS)"
|
2005-01-23 17:44:11 +00:00
|
|
|
sw-tmp:
|
2005-12-15 19:15:39 +00:00
|
|
|
$(MAKE) $(TYPE) OUT_DIR="$(OUT_DIR)" EXE_NAME="$(SW_EXE_NAME)" WCFLAGS="$(SW_CFLAGS)" LDFLAGS="$(SW_LDFLAGS) $(LDFLAGS)" SOBJS="$(SWCL_OBJS)"
|
2005-01-23 17:44:11 +00:00
|
|
|
|
|
|
|
swcl-rel:
|
|
|
|
$(MAKE) swcl-tmp TYPE=_cl-rel OUT_DIR="$(RELEASE_DIR)/$(SWCL_DIR)"
|
|
|
|
swcl-dbg:
|
|
|
|
$(MAKE) swcl-tmp TYPE=_cl-dbg OUT_DIR="$(DEBUG_DIR)/$(SWCL_DIR)"
|
|
|
|
sw-rel:
|
|
|
|
$(MAKE) sw-tmp TYPE=_clsv-rel OUT_DIR="$(RELEASE_DIR)/$(SWB_DIR)"
|
|
|
|
sw-dbg:
|
|
|
|
$(MAKE) sw-tmp TYPE=_clsv-dbg OUT_DIR="$(DEBUG_DIR)/$(SWB_DIR)"
|
|
|
|
|
|
|
|
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:
|
|
|
|
$(MAKE) m-tmp TYPE=_clsv-rel OUT_DIR="$(RELEASE_DIR)/$(MCL_DIR)"
|
|
|
|
m-dbg:
|
|
|
|
$(MAKE) m-tmp TYPE=_clsv-dbg OUT_DIR="$(DEBUG_DIR)/$(MCL_DIR)"
|
|
|
|
|
2005-02-06 02:47:36 +00:00
|
|
|
.PHONY: m-tmp mcl-tmp sw-tmp swcl-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"
|
|
|
|
@-echo ""
|
|
|
|
@-echo "Normal targets:"
|
|
|
|
@-echo "(each of these targets must have the postfix -rel or -dbg)"
|
|
|
|
@-echo "sv"
|
|
|
|
@-echo "gl"
|
|
|
|
@-echo "sw"
|
|
|
|
|
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)
|
|
|
|
|