mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix compiling on older macOS
ranlib errors on older macOS because of arm64 arch in code/libs/macosx/- libSDL2main.a. Use lipo to extract the library for the specific arch that is being linked.
This commit is contained in:
parent
75ae9119e6
commit
9543cf24df
1 changed files with 9 additions and 0 deletions
9
Makefile
9
Makefile
|
@ -525,6 +525,7 @@ ifeq ($(PLATFORM),darwin)
|
|||
|
||||
CC=$(MACOSX_ARCH)-apple-darwin$(DARWIN)-cc
|
||||
RANLIB=$(MACOSX_ARCH)-apple-darwin$(DARWIN)-ranlib
|
||||
LIPO=$(MACOSX_ARCH)-apple-darwin$(DARWIN)-lipo
|
||||
|
||||
ifeq ($(call bin_path, $(CC)),)
|
||||
$(error Unable to find osxcross $(CC))
|
||||
|
@ -532,6 +533,10 @@ ifeq ($(PLATFORM),darwin)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifndef LIPO
|
||||
LIPO=lipo
|
||||
endif
|
||||
|
||||
BASE_CFLAGS += -fno-strict-aliasing -fno-common -pipe
|
||||
|
||||
ifeq ($(USE_OPENAL),1)
|
||||
|
@ -2275,7 +2280,11 @@ endif
|
|||
ifneq ($(strip $(LIBSDLMAIN)),)
|
||||
ifneq ($(strip $(LIBSDLMAINSRC)),)
|
||||
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
|
||||
ifeq ($(PLATFORM),darwin)
|
||||
$(LIPO) -extract $(MACOSX_ARCH) $< -o $@
|
||||
else
|
||||
cp $< $@
|
||||
endif
|
||||
$(RANLIB) $@
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue