patch from div0 to make universal-binary builds of darkplaces possible on Mac OS X
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 13 Jun 2006 09:15:36 +0000 (09:15 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 13 Jun 2006 09:15:36 +0000 (09:15 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6475 d7cf8633-e32d-0410-b094-e92efae38249

BSDmakefile
makefile
makefile.inc

index 6d86a29..1f8bad7 100644 (file)
@@ -7,6 +7,7 @@ DP_MAKE_TARGET=bsd
 .endif
 DP_ARCH != uname
 
+CFLAGS_MAKEDEP=-MD
 
 # Command used to delete files
 CMD_RM=$(CMD_UNIXRM)
index e563564..ba1b76e 100644 (file)
--- a/makefile
+++ b/makefile
@@ -26,6 +26,8 @@ endif  # ifneq ($(filter %BSD,$(DP_ARCH)),)
 endif  # ifdef windir
 endif  # ifndef DP_MAKE_TARGET
 
+CFLAGS_MAKEDEP=-MD
+
 # If we're not on compiling for Win32, we need additional information
 ifneq ($(DP_MAKE_TARGET), mingw)
        DP_ARCH:=$(shell uname)
@@ -88,6 +90,10 @@ ifeq ($(DP_MAKE_TARGET), macosx)
        EXE_CLNEXUIZ=$(EXE_MACOSXCLNEXUIZ)
        EXE_SVNEXUIZ=$(EXE_UNIXSVNEXUIZ)
        EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
+
+       ifeq ($(word 2, $(filter -arch, $(CC))), -arch)
+               CFLAGS_MAKEDEP=
+       endif
 endif
 
 # SunOS configuration (Solaris)
index efc5cdc..86b608c 100644 (file)
@@ -137,7 +137,7 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o $(OBJ_SND_COMMON) snd_sdl.o cd_sdl.o $(
 
 # Compilation
 # CFLAGS_COMMON=-MD -Wall -Werror
-CFLAGS_COMMON=-MD -Wall -Wsign-compare
+CFLAGS_COMMON=$(CFLAGS_MAKEDEP) -Wall -Wsign-compare
 CFLAGS_DEBUG=-ggdb
 CFLAGS_PROFILE=-g -pg -ggdb
 CFLAGS_RELEASE=