1 ##### DP_MAKE_TARGET autodetection and arch specific variables #####
16 CMD_MKDIR=$(CMD_UNIXMKDIR)
19 TARGETS_DEBUG=sv-debug cl-debug sdl-debug
20 TARGETS_PROFILE=sv-profile cl-profile sdl-profile
21 TARGETS_RELEASE=sv-release cl-release sdl-release
22 TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile
23 TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz
25 ###### Optional features #####
27 .if $(DP_CDDA) == "enabled"
28 OBJ_SDLCD=$(OBJ_CD_COMMON) cd_sdl.o
29 OBJ_BSDCD=$(OBJ_CD_COMMON) cd_bsd.o
31 OBJ_SDLCD=$(OBJ_CD_COMMON) $(OBJ_NOCD)
32 OBJ_BSDCD=$(OBJ_CD_COMMON) $(OBJ_NOCD)
36 UNIX_X11LIBPATH=/usr/X11R6/lib
39 .if $(DP_MAKE_TARGET) == "bsd"
42 .if $(DP_ARCH) == "FreeBSD"
53 LDFLAGS_CL=$(LDFLAGS_BSDCL)
54 LDFLAGS_SV=$(LDFLAGS_BSDSV)
55 LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
57 SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
58 SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
59 SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
63 EXE_SDL=$(EXE_UNIXSDL)
64 EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
65 EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
66 EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
68 # set these to "" if you want to use dynamic loading instead
70 CFLAGS_LIBZ=-DLINK_TO_ZLIB
74 CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
78 ODE_CONFIG?=ode-config
79 LIB_ODE=`$(ODE_CONFIG) --libs`
80 CFLAGS_ODE=`$(ODE_CONFIG) --cflags` -DUSEODE -DLINK_TO_LIBODE
83 # most distros do not have d0_blind_id package, dlopen will used by default
84 # LIB_CRYPTO=-ld0_blind_id
85 # CFLAGS_CRYPTO=-DLINK_TO_CRYPTO
86 # LIB_CRYPTO_RIJNDAEL=-ld0_rijndael
87 # CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_CRYPTO_RIJNDAEL
91 CFLAGS_CRYPTO_RIJNDAEL=
96 ##### Sound configuration #####
99 DP_SOUND_API=$(DEFAULT_SNDAPI)
103 .if $(DP_SOUND_API) == "NULL"
104 OBJ_SOUND=$(OBJ_SND_NULL)
105 LIB_SOUND=$(LIB_SND_NULL)
108 # OSS: Open Sound System
109 .if $(DP_SOUND_API) == "OSS"
110 OBJ_SOUND=$(OBJ_SND_OSS)
111 LIB_SOUND=$(LIB_SND_OSS)
114 # BSD: BSD / Sun audio API
115 .if $(DP_SOUND_API) == "BSD"
116 OBJ_SOUND=$(OBJ_SND_BSD)
117 LIB_SOUND=$(LIB_SND_BSD)
121 ##### Extra CFLAGS #####
125 CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
131 .ifdef DP_PRELOAD_DEPENDENCIES
132 LDFLAGS_CL+=$(LDFLAGS_UNIXCL_PRELOAD)
133 LDFLAGS_SV+=$(LDFLAGS_UNIXSV_PRELOAD)
134 LDFLAGS_SDL+=$(LDFLAGS_UNIXSDL_PRELOAD)
135 CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
139 ##### BSD Make specific definitions #####
141 MAKE:=$(MAKE) -f BSDmakefile
143 DO_LD=$(CC) -o ../../../$@ $> $(LDFLAGS)
146 ##### Definitions shared by all makefiles #####
147 .include "makefile.inc"