mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Cross compiling for OS X
This commit is contained in:
parent
01efc26654
commit
352cd151e0
1 changed files with 25 additions and 3 deletions
28
Makefile
28
Makefile
|
@ -425,6 +425,22 @@ ifeq ($(PLATFORM),darwin)
|
|||
OPTIMIZEVM += -arch x86_64 -mfpmath=sse
|
||||
endif
|
||||
|
||||
ifeq ($(CROSS_COMPILING),1)
|
||||
ifeq ($(ARCH),ppc)
|
||||
CC=powerpc-apple-darwin10-gcc
|
||||
RANLIB=powerpc-apple-darwin10-ranlib
|
||||
else
|
||||
ifeq ($(ARCH),x86)
|
||||
CC=i686-apple-darwin10-gcc
|
||||
RANLIB=i686-apple-darwin10-ranlib
|
||||
else
|
||||
$(error Architecture $(ARCH) is not supported when cross compiling)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
TOOLS_CFLAGS += -DMACOS_X
|
||||
endif
|
||||
|
||||
BASE_CFLAGS += -fno-strict-aliasing -DMACOS_X -fno-common -pipe
|
||||
|
||||
ifeq ($(USE_OPENAL),1)
|
||||
|
@ -466,8 +482,6 @@ ifeq ($(PLATFORM),darwin)
|
|||
|
||||
NOTSHLIBCFLAGS=-mdynamic-no-pic
|
||||
|
||||
TOOLS_CFLAGS += -DMACOS_X
|
||||
|
||||
else # ifeq darwin
|
||||
|
||||
|
||||
|
@ -835,6 +849,14 @@ endif #NetBSD
|
|||
endif #IRIX
|
||||
endif #SunOS
|
||||
|
||||
ifndef CC
|
||||
CC=gcc
|
||||
endif
|
||||
|
||||
ifndef RANLIB
|
||||
RANLIB=gcc
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_VM_COMPILED),true)
|
||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||
BUILD_GAME_QVM=0
|
||||
|
@ -1969,7 +1991,7 @@ ifneq ($(strip $(LIBSDLMAIN)),)
|
|||
ifneq ($(strip $(LIBSDLMAINSRC)),)
|
||||
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
|
||||
cp $< $@
|
||||
ranlib $@
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue