fixed some issues with how D3D=1 worked in the makefile
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 19 Aug 2010 17:34:47 +0000 (17:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 19 Aug 2010 17:34:47 +0000 (17:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10406 d7cf8633-e32d-0410-b094-e92efae38249

makefile
makefile.inc

index e3b6957..8a5bda6 100644 (file)
--- a/makefile
+++ b/makefile
@@ -163,8 +163,10 @@ ifeq ($(WIN32RELEASE), 1)
 #      TARGET=i686-pc-mingw32
 #      CC=$(TARGET)-g++
 #      WINDRES=$(TARGET)-windres
-       CPUOPTIMIZATIONS+=-march=i686 -DUSE_WSPIAPI_H
-       LDFLAGS_WINCOMMON+=-Wl,--large-address-aware
+       CPUOPTIMIZATIONS=-march=i686 -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math -DUSE_WSPIAPI_H
+       LDFLAGS_WINCOMMON=-Wl,--large-address-aware
+else
+       LDFLAGS_WINCOMMON=
 endif
 
 ifeq ($(WIN64RELEASE), 1)
@@ -174,12 +176,13 @@ ifeq ($(WIN64RELEASE), 1)
 endif
 
 ifeq ($(D3D), 1)
-       CPUOPTIMIZATIONS+=-DSUPPORTD3D -DSUPPORTDIRECTX
+       CFLAGS_D3D=-DSUPPORTD3D -DSUPPORTDIRECTX
        CFLAGS_WARNINGS=-Wall
-       LDFLAGS_WINCOMMON=-ld3d9
+       LDFLAGS_D3D=-ld3d9
 else
+       CFLAGS_D3D=
        CFLAGS_WARNINGS=-Wall -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
-       LDFLAGS_WINCOMMON=
+       LDFLAGS_D3D=
 endif
 
 
index 4f47858..b5a31da 100644 (file)
@@ -182,7 +182,7 @@ CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
 LIB_JPEG=-ljpeg
 
 # Compilation
-CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_CG) $(CFLAGS_WARNINGS) $(CFLAGS_LIBJPEG)
+CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_CG) $(CFLAGS_WARNINGS) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D)
 CFLAGS_DEBUG=-ggdb
 CFLAGS_PROFILE=-g -pg -ggdb -fprofile-arcs
 CFLAGS_RELEASE=
@@ -295,7 +295,7 @@ OBJ_WGL= builddate.c sys_win.o vid_wgl.o $(OBJ_SND_WIN) $(OBJ_WINCD) $(OBJ_COMMO
 
 # Link
 # see LDFLAGS_WINCOMMON in makefile
-LDFLAGS_WINCL=$(LDFLAGS_WINCOMMON) -mwindows -lwinmm -luser32 -lgdi32 -ldxguid -ldinput -lcomctl32 -lws2_32 $(LIB_JPEG)
+LDFLAGS_WINCL=$(LDFLAGS_WINCOMMON) -mwindows -lwinmm -luser32 -lgdi32 -ldxguid -ldinput -lcomctl32 -lws2_32 $(LDFLAGS_D3D) $(LIB_JPEG)
 LDFLAGS_WINSV=$(LDFLAGS_WINCOMMON) -mconsole -lwinmm -lws2_32 $(LIB_JPEG)
 LDFLAGS_WINSDL=$(LDFLAGS_WINCOMMON) $(SDLCONFIG_LIBS) $(LIB_SND_MODPLUG) -lwinmm -lws2_32 $(LIB_JPEG)
 EXE_WINCL=darkplaces.exe