]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - makefile.bsd
fix a memory leak in one error case in LoadTGA and clean up things a little
[xonotic/darkplaces.git] / makefile.bsd
index 04821ddb67a9aacc18c11bd4b69e219c325b343f..af0228e83a1edc070a95b123c77209694928e9a7 100644 (file)
@@ -5,19 +5,23 @@
 DP_MAKE_TARGET=bsd
 
 .endif
+DP_ARCH != uname
 
 
 # Command used to delete files
 CMD_RM=$(CMD_UNIXRM)
 
-# FIXME: should support lib64 based on uname -m output
 UNIX_X11LIBPATH=-L/usr/X11R6/lib
 
 # BSD configuration
 .if $(DP_MAKE_TARGET) == "bsd"
 
-OBJ_SOUND=$(OBJ_BSDSOUND)
-LIB_SOUND=$(LIB_BSDSOUND)
+# FreeBSD uses OSS
+.if $(DP_ARCH) == "FreeBSD"
+DEFAULT_SNDAPI=OSS
+.else
+DEFAULT_SNDAPI=BSD
+.endif
 OBJ_CD=$(OBJ_BSDCD)
 
 OBJ_CL=$(OBJ_GLX)
@@ -32,6 +36,31 @@ EXE_SDL=$(EXE_UNIXSDL)
 .endif
 
 
+##### Sound configuration #####
+
+.ifndef DP_SOUND_API
+DP_SOUND_API=$(DEFAULT_SNDAPI)
+.endif
+
+# NULL: no sound
+.if $(DP_SOUND_API) == "NULL"
+OBJ_SOUND=$(OBJ_SND_NULL)
+LIB_SOUND=$(LIB_SND_NULL)
+.endif
+
+# OSS: Open Sound System
+.if $(DP_SOUND_API) == "OSS"
+OBJ_SOUND=$(OBJ_SND_OSS)
+LIB_SOUND=$(LIB_SND_OSS)
+.endif
+
+# BSD: BSD / Sun audio API
+.if $(DP_SOUND_API) == "BSD"
+OBJ_SOUND=$(OBJ_SND_BSD)
+LIB_SOUND=$(LIB_SND_BSD)
+.endif
+
+
 ##### BSD Make specific definitions #####
 
 MAKE:=$(MAKE) -f makefile.bsd