]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - makefile
migrate the libjpeg options to per-target scripting, and default the
[xonotic/darkplaces.git] / makefile
index 43b062be296e37f806d644c93878ca3a769f9ad2..fb24c260b7740c0293c7d9cc0065d7410c5b6222 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
@@ -208,6 +225,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 #####