CFLAGS += -I. -DINLINE=inline
ifndef DEBUG
CFLAGS += -O2 -DNDEBUG -ffunction-sections
-ifeq ($(findstring clang,$(CC)),)
+ifneq ($(APPLE),1)
LDFLAGS += -Wl,--gc-sections
endif
endif
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
+ arch = intel
+ifeq ($(shell uname -p),powerpc)
+ arch = ppc
+endif
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
SHARED := -shared
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
- SHARED := -dynamiclib -mmacosx-version-min=10.6
+ SHARED := -dynamiclib
+ APPLE := 1
+
+ arch = intel
+ifeq ($(shell uname -p),powerpc)
+ arch = ppc
+endif
+
+ifeq ($(arch),ppc)
+else
+ SHARED += -mmacosx-version-min=10.6
+endif
else ifeq ($(platform), ios)
TARGET := $(TARGET_NAME)_libretro_ios.dylib
SHARED := -dynamiclib
+ APPLE := 1
CC = clang -arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=5.0
CXX = clang++ -arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=5.0