# 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)
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
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=
# 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