]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - BSDmakefile
Build in subdirs
[xonotic/darkplaces.git] / BSDmakefile
index 28106df6c7cff170c0cdc214c122e366a01ffdee..74496edcb1c9917d2bb776c694fe64a04d882c9f 100644 (file)
@@ -7,9 +7,23 @@ DP_MAKE_TARGET=bsd
 .endif
 DP_ARCH != uname
 
-# Command used to delete files
+
+# Makefile name
+MAKEFILE=BSDmakefile
+
+# Commands
 CMD_RM=$(CMD_UNIXRM)
+CMD_CP=$(CMD_UNIXCP)
+CMD_MKDIR=$(CMD_UNIXMKDIR)
+
+# 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
@@ -42,10 +56,38 @@ EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ)
 EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
 EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
 
-# libjpeg dependency (set these to "" if you want to use dynamic loading instead)
+# 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=
+
+# modplug
+# now ogg is mostly used, modplug is required rarely, keep it dlopen by default
+# LIB_SND_MODPLUG=-lmodplug
+# CFLAGS_SND_MODPLUG=-DLINK_TO_LIBMODPLUG
+LIB_SND_MODPLUG=
+CFLAGS_SND_MODPLUG=
+
 .endif
 
 
@@ -96,7 +138,7 @@ CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD)
 
 MAKE:=$(MAKE) -f BSDmakefile
 
-DO_LD=$(CC) -o $@ $> $(LDFLAGS)
+DO_LD=$(CC) -o ../../../$@ $> $(LDFLAGS)
 
 
 ##### Definitions shared by all makefiles #####