X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=makefile;h=fb24c260b7740c0293c7d9cc0065d7410c5b6222;hb=f8972947255e78d99a3497c8dcb2531c6be217a2;hp=184029d9e625d4edd1a8b4baa2ed4b5016c424bb;hpb=9af5c9a87d7cddc6268fe5a13f6805ab242e38d8;p=xonotic%2Fdarkplaces.git diff --git a/makefile b/makefile index 184029d9..fb24c260 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,7 @@ ifndef DP_MAKE_TARGET # Win32 -ifdef windir +ifdef WINDIR DP_MAKE_TARGET=mingw else @@ -71,6 +71,10 @@ ifeq ($(DP_MAKE_TARGET), linux) EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ) EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ) EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ) + + # libjpeg dependency (set these to "" if you want to use dynamic loading instead) + CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG + LIB_JPEG=-ljpeg endif # Mac OS X configuration @@ -100,6 +104,11 @@ ifeq ($(DP_MAKE_TARGET), macosx) ifeq ($(word 2, $(filter -arch, $(CC))), -arch) CFLAGS_MAKEDEP= endif + + # libjpeg dependency (set these to "" if you want to use dynamic loading instead) + # we don't currently link to libjpeg on Mac because the OS does not have an easy way to load libjpeg and we provide our own in the .app + CFLAGS_LIBJPEG= + LIB_JPEG= endif # SunOS configuration (Solaris) @@ -127,6 +136,10 @@ ifeq ($(DP_MAKE_TARGET), sunos) EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ) EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ) EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ) + + # libjpeg dependency (set these to "" if you want to use dynamic loading instead) + CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG + LIB_JPEG=-ljpeg endif # BSD configuration @@ -156,9 +169,40 @@ endif EXE_CLNEXUIZ=$(EXE_UNIXCLNEXUIZ) EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ) EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ) + + # libjpeg dependency (set these to "" if you want to use dynamic loading instead) + CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG + LIB_JPEG=-ljpeg endif # Win32 configuration +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 -DUSE_WSPIAPI_H + LDFLAGS_WINCOMMON=-Wl,--large-address-aware +else + LDFLAGS_WINCOMMON= +endif + +ifeq ($(WIN64RELEASE), 1) +# TARGET=x86_64-pc-mingw32 +# CC=$(TARGET)-g++ +# WINDRES=$(TARGET)-windres +endif + +ifeq ($(D3D), 1) + CFLAGS_D3D=-DSUPPORTD3D -DSUPPORTDIRECTX + CFLAGS_WARNINGS=-Wall + LDFLAGS_D3D=-ld3d9 +else + CFLAGS_D3D= + CFLAGS_WARNINGS=-Wall -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement + LDFLAGS_D3D= +endif + + ifeq ($(DP_MAKE_TARGET), mingw) DEFAULT_SNDAPI=WIN OBJ_CD=$(OBJ_WINCD) @@ -181,11 +225,10 @@ ifeq ($(DP_MAKE_TARGET), mingw) EXE_CLNEXUIZ=$(EXE_WINCLNEXUIZ) EXE_SVNEXUIZ=$(EXE_WINSVNEXUIZ) EXE_SDLNEXUIZ=$(EXE_WINSDLNEXUIZ) -endif -ifeq ($(WIN32RELEASE), 1) - CPUOPTIMIZATIONS=-march=i686 - CFLAGS_RELEASE="-DSUPPORTDIRECTX -DUSE_WSPIAPI_H" + # libjpeg dependency (set these to "" if you want to use dynamic loading instead) + CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG + LIB_JPEG=-ljpeg endif ##### Sound configuration ##### @@ -256,14 +299,6 @@ 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)