diff --git a/Makefile b/Makefile index d7a01dfe..7a4e1301 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS += -Wall -ggdb -falign-functions=2 CFLAGS += -I. -DINLINE=inline ifndef DEBUG CFLAGS += -O2 -DNDEBUG -ffunction-sections -ifeq ($(findstring clang,$(CC)),) +ifneq ($(APPLE),1) LDFLAGS += -Wl,--gc-sections endif endif diff --git a/Makefile.libretro b/Makefile.libretro index 76795050..fdb268bc 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -8,6 +8,10 @@ else ifneq ($(findstring MINGW,$(shell uname -a)),) 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 @@ -34,10 +38,22 @@ ifeq ($(platform), unix) 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