]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - makefile
new cvar: mastervolume (controlling both volume and bgmvolume)
[xonotic/darkplaces.git] / makefile
index 45b2d97f666b7f08004d331141799d3bde69430f..32b30e4c28f9c4f7c9344642928c007ab642d9cc 100644 (file)
--- a/makefile
+++ b/makefile
@@ -3,7 +3,7 @@
 ifndef DP_MAKE_TARGET
 
 # Win32
-ifdef windir
+ifdef WINDIR
        DP_MAKE_TARGET=mingw
 else
 
@@ -183,6 +183,14 @@ ifeq ($(DP_MAKE_TARGET), mingw)
        EXE_SDLNEXUIZ=$(EXE_WINSDLNEXUIZ)
 endif
 
+ifeq ($(WIN32RELEASE), 1)
+       CPUOPTIMIZATIONS=-march=i686 -DSUPPORTDIRECTX -DUSE_WSPIAPI_H
+endif
+
+ifeq ($(WIN64RELEASE), 1)
+       CPUOPTIMIZATIONS=
+endif
+
 ##### Sound configuration #####
 
 ifndef DP_SOUND_API
@@ -225,10 +233,14 @@ ifeq ($(DP_SOUND_API), WIN)
        LIB_SOUND=$(LIB_SND_WIN)
 endif
 
+ifeq ($(DP_SOUND_API),3DRAS)
+       OBJ_SOUND=$(OBJ_SND_3DRAS)
+       LIB_SOUND=$(LIB_SND_3DRAS)
+endif
 
 ##### Extra CFLAGS #####
 
-CFLAGS_MAKEDEP?=-MD
+CFLAGS_MAKEDEP?=-MMD
 ifdef DP_FS_BASEDIR
        CFLAGS_FS=-DDP_FS_BASEDIR='\"$(DP_FS_BASEDIR)\"'
 else
@@ -247,6 +259,14 @@ ifdef DP_PRELOAD_DEPENDENCIES
 endif
 endif
 
+ifdef DP_LINK_TO_LIBJPEG
+       LDFLAGS_LIBJPEG?=-ljpeg
+       LDFLAGS_CL+=$(LDFLAGS_LIBJPEG)
+       LDFLAGS_SV+=$(LDFLAGS_LIBJPEG)
+       LDFLAGS_SDL+=$(LDFLAGS_LIBJPEG)
+       CFLAGS_PRELOAD+=$(CFLAGS_LIBJPEG) -DLINK_TO_LIBJPEG
+endif
+
 ##### GNU Make specific definitions #####
 
 DO_LD=$(CC) -o $@ $^ $(LDFLAGS)