(OSX) Add universal rules

This commit is contained in:
twinaphex 2015-11-02 14:35:24 +01:00
parent 88dd644046
commit 59fb6a652e

View File

@ -26,6 +26,14 @@ endif
TARGET_NAME := gambatte TARGET_NAME := gambatte
ifeq ($(ARCHFLAGS),)
ifeq ($(archs),ppc)
ARCHFLAGS = -arch ppc -arch ppc64
else
ARCHFLAGS = -arch i386 -arch x86_64
endif
endif
# Unix # Unix
ifeq ($(platform), unix) ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so TARGET := $(TARGET_NAME)_libretro.so
@ -248,6 +256,14 @@ include $(THEOS_MAKE_PATH)/library.mk
else else
all: $(TARGET) all: $(TARGET)
ifeq ($(platform), osx)
ifndef ($(NOUNIVERSAL))
CFLAGS += $(ARCHFLAGS)
CXXFLAGS += $(ARCHFLAGS)
LFLAGS += $(ARCHFLAGS)
endif
endif
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
ifeq ($(STATIC_LINKING), 1) ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJS) $(AR) rcs $@ $(OBJS)