Revert "Make cdda optional, server does not need to play music" because it
[xonotic/darkplaces.git] / BSDmakefile
index 86c5d28..36f0f82 100644 (file)
@@ -8,10 +8,21 @@ DP_MAKE_TARGET=bsd
 DP_ARCH != uname
 
 
+# Makefile name
+MAKEFILE=BSDmakefile
+
 # Command used to delete files
 CMD_RM=$(CMD_UNIXRM)
 
-UNIX_X11LIBPATH=-L/usr/X11R6/lib
+# default targets
+TARGETS_DEBUG=sv-debug cl-debug sdl-debug
+TARGETS_PROFILE=sv-profile cl-profile sdl-profile
+TARGETS_RELEASE=sv-release cl-release sdl-release
+TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile
+TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz
+
+# X11 libs
+UNIX_X11LIBPATH=/usr/X11R6/lib
 
 # BSD configuration
 .if $(DP_MAKE_TARGET) == "bsd"
@@ -30,6 +41,11 @@ OBJ_ICON_NEXUIZ=
 
 LDFLAGS_CL=$(LDFLAGS_BSDCL)
 LDFLAGS_SV=$(LDFLAGS_BSDSV)
+LDFLAGS_SDL=$(LDFLAGS_BSDSDL)
+
+SDLCONFIG_CFLAGS=$(SDLCONFIG_UNIXCFLAGS) $(SDLCONFIG_UNIXCFLAGS_X11)
+SDLCONFIG_LIBS=$(SDLCONFIG_UNIXLIBS) $(SDLCONFIG_UNIXLIBS_X11)
+SDLCONFIG_STATICLIBS=$(SDLCONFIG_UNIXSTATICLIBS) $(SDLCONFIG_UNIXSTATICLIBS_X11)
 
 EXE_CL=$(EXE_UNIXCL)
 EXE_SV=$(EXE_UNIXSV)
@@ -38,6 +54,31 @@ EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
 EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
 EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
 
+# set these to "" if you want to use dynamic loading instead
+# zlib
+CFLAGS_LIBZ=-DLINK_TO_ZLIB
+LIB_Z=-lz
+
+# jpeg
+CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
+LIB_JPEG=-ljpeg
+
+# ode
+ODE_CONFIG?=ode-config
+LIB_ODE=`$(ODE_CONFIG) --libs`
+CFLAGS_ODE=`$(ODE_CONFIG) --cflags` -DUSEODE -DLINK_TO_LIBODE
+
+# d0_blind_id
+# most distros do not have d0_blind_id package, dlopen will used by default
+# LIB_CRYPTO=-ld0_blind_id
+# CFLAGS_CRYPTO=-DLINK_TO_CRYPTO
+# LIB_CRYPTO_RIJNDAEL=-ld0_rijndael
+# CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_CRYPTO_RIJNDAEL
+LIB_CRYPTO=
+CFLAGS_CRYPTO=
+LIB_CRYPTO_RIJNDAEL=
+CFLAGS_CRYPTO_RIJNDAEL=
+
 .endif
 
 
@@ -66,20 +107,30 @@ LIB_SOUND=$(LIB_SND_BSD)
 .endif
 
 
+##### Extra CFLAGS #####
+
+CFLAGS_MAKEDEP=-MD
+.ifdef DP_FS_BASEDIR
+CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
+.else
+CFLAGS_FS=
+.endif
+
+CFLAGS_PRELOAD=
+.ifdef DP_PRELOAD_DEPENDENCIES
+LDFLAGS_CL+=$(LDFLAGS_UNIXCL_PRELOAD)
+LDFLAGS_SV+=$(LDFLAGS_UNIXSV_PRELOAD)
+LDFLAGS_SDL+=$(LDFLAGS_UNIXSDL_PRELOAD)
+CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
+.endif
+
+
 ##### BSD Make specific definitions #####
 
-MAKE:=$(MAKE) -f makefile.bsd
+MAKE:=$(MAKE) -f BSDmakefile
 
 DO_LD=$(CC) -o $@ $> $(LDFLAGS)
 
 
 ##### Definitions shared by all makefiles #####
 .include "makefile.inc"
-
-
-##### Dependency files #####
-
-DEPEND_FILES != ls *.d
-.for i in $(DEPEND_FILES)
-.      include "$i"
-.endfor