]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - makefile
split and overhauled R_Upload into two functions:
[xonotic/darkplaces.git] / makefile
index 8a5bda683833ec8bb6ce2f225ca5f9ba09f113ae..ee88a37c4dabea2a868fa31a66fc7d03b981b4ee 100644 (file)
--- a/makefile
+++ b/makefile
@@ -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,6 +169,10 @@ 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
@@ -163,7 +180,8 @@ 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
+       CPUOPTIMIZATIONS=-march=i686 -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math
+#       CPUOPTIMIZATIONS+=-DUSE_WSPIAPI_H -DSUPPORTIPV6
        LDFLAGS_WINCOMMON=-Wl,--large-address-aware
 else
        LDFLAGS_WINCOMMON=
@@ -208,6 +226,10 @@ ifeq ($(DP_MAKE_TARGET), mingw)
        EXE_CLNEXUIZ=$(EXE_WINCLNEXUIZ)
        EXE_SVNEXUIZ=$(EXE_WINSVNEXUIZ)
        EXE_SDLNEXUIZ=$(EXE_WINSDLNEXUIZ)
+
+       # libjpeg dependency (set these to "" if you want to use dynamic loading instead)
+       CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
+       LIB_JPEG=-ljpeg
 endif
 
 ##### Sound configuration #####
@@ -278,14 +300,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)