diff --git a/Makefile b/Makefile index 6a88946f..9e535559 100644 --- a/Makefile +++ b/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