From 5cd97263ce3d2fe446fa2d5856c4401326094714 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 14 Apr 2014 07:24:58 +0200 Subject: [PATCH] (OSX PPC) Improve upon some build rules --- Makefile | 2 +- Makefile.libretro | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) 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 -- 2.39.5