X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=makefile;h=1cc5271437cc6b4b6330d2f89308c410b3a33f1c;hb=refs%2Fheads%2FColdSpirit%2Fcvar_onchange_stable;hp=e388780648e90bdc3db2aee8c8524ff3b5a0e77a;hpb=7f727de1f30b85b7f12a347b46a6537b572d3864;p=xonotic%2Fdarkplaces.git diff --git a/makefile b/makefile index e3887806..1cc52714 100644 --- a/makefile +++ b/makefile @@ -26,10 +26,24 @@ endif # ifneq ($(filter %BSD,$(DP_ARCH)),) endif # ifdef windir endif # ifndef DP_MAKE_TARGET -# If we're not on compiling for Win32, we need additional information -ifneq ($(DP_MAKE_TARGET), mingw) - DP_ARCH:=$(shell uname) +# If we're targeting an x86 CPU we want to enable DP_SSE (CFLAGS_SSE and SSE2) +ifeq ($(DP_MAKE_TARGET), mingw) + DP_SSE:=1 +else DP_MACHINE:=$(shell uname -m) + ifeq ($(DP_MACHINE),x86_64) + DP_SSE:=1 + else + ifeq ($(DP_MACHINE),i686) + DP_SSE:=1 + else + ifeq ($(DP_MACHINE),i386) + DP_SSE:=1 + else + DP_SSE:=0 + endif # ifeq ($(DP_MACHINE),i386) + endif # ifeq ($(DP_MACHINE),i686) + endif # ifeq ($(DP_MACHINE),x86_64) endif # Makefile name @@ -230,7 +244,7 @@ ifeq ($(WIN32RELEASE), 1) # TARGET=i686-pc-mingw32 # CC=$(TARGET)-g++ # WINDRES=$(TARGET)-windres - CPUOPTIMIZATIONS=-march=i686 -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math + CPUOPTIMIZATIONS=-march=pentium3 -mfpmath=sse -fno-math-errno -fno-rounding-math -fno-signaling-nans -fno-trapping-math # CPUOPTIMIZATIONS+=-DUSE_WSPIAPI_H -DSUPPORTIPV6 LDFLAGS_WINCOMMON=-Wl,--large-address-aware else @@ -402,6 +416,10 @@ ifdef DP_PRELOAD_DEPENDENCIES endif endif +CFLAGS_NET= +# Systems without IPv6 support should uncomment this: +#CFLAGS_NET+=-DNOSUPPORTIPV6 + ##### GNU Make specific definitions ##### DO_LD=$(CC) -o ../../../$@ $^ $(LDFLAGS)