mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +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
|
OPTIMIZEVM += -arch x86_64 -mfpmath=sse
|
||||||
endif
|
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
|
BASE_CFLAGS += -fno-strict-aliasing -DMACOS_X -fno-common -pipe
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
ifeq ($(USE_OPENAL),1)
|
||||||
|
@ -466,8 +482,6 @@ ifeq ($(PLATFORM),darwin)
|
||||||
|
|
||||||
NOTSHLIBCFLAGS=-mdynamic-no-pic
|
NOTSHLIBCFLAGS=-mdynamic-no-pic
|
||||||
|
|
||||||
TOOLS_CFLAGS += -DMACOS_X
|
|
||||||
|
|
||||||
else # ifeq darwin
|
else # ifeq darwin
|
||||||
|
|
||||||
|
|
||||||
|
@ -835,6 +849,14 @@ endif #NetBSD
|
||||||
endif #IRIX
|
endif #IRIX
|
||||||
endif #SunOS
|
endif #SunOS
|
||||||
|
|
||||||
|
ifndef CC
|
||||||
|
CC=gcc
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef RANLIB
|
||||||
|
RANLIB=gcc
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(HAVE_VM_COMPILED),true)
|
ifneq ($(HAVE_VM_COMPILED),true)
|
||||||
BASE_CFLAGS += -DNO_VM_COMPILED
|
BASE_CFLAGS += -DNO_VM_COMPILED
|
||||||
BUILD_GAME_QVM=0
|
BUILD_GAME_QVM=0
|
||||||
|
@ -1969,7 +1991,7 @@ ifneq ($(strip $(LIBSDLMAIN)),)
|
||||||
ifneq ($(strip $(LIBSDLMAINSRC)),)
|
ifneq ($(strip $(LIBSDLMAINSRC)),)
|
||||||
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
|
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
ranlib $@
|
$(RANLIB) $@
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue