From 5103cb2d679e5e1c2548a82b80a1f396ef5acef8 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 20 Aug 2010 12:50:53 +0000 Subject: [PATCH] migrate the libjpeg options to per-target scripting, and default the libjpeg linking off on Mac OS X because we have to provide our own in the .app git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10409 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=f8972947255e78d99a3497c8dcb2531c6be217a2 --- makefile | 21 +++++++++++++++++++++ makefile.inc | 4 ---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index 43b062be..fb24c260 100644 --- 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 ##### diff --git a/makefile.inc b/makefile.inc index b5a31da7..4dead01d 100644 --- a/makefile.inc +++ b/makefile.inc @@ -177,10 +177,6 @@ OBJ_SV= builddate.c sys_linux.o vid_null.o $(OBJ_SND_NULL) $(OBJ_NOCD) $(OBJ_COM OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o $(OBJ_SND_COMMON) snd_sdl.o cd_sdl.o $(OBJ_COMMON) -# libjpeg dependency (set these to "" if you want to use dynamic loading instead) -CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG -LIB_JPEG=-ljpeg - # Compilation CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_CG) $(CFLAGS_WARNINGS) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) CFLAGS_DEBUG=-ggdb -- 2.39.2