X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=8a4d57a50ffe3a14823f5e93325d7ad27ebb0192;hb=c771b2384e0a9b5687a4160421120bb661c1ee2e;hp=7679505009ff754c2ae1c08ac89cffefb81aaeaf;hpb=4835077e00c2cf7e3dba7bf7801c6aafd9d00dbe;p=picodrive.git diff --git a/Makefile.libretro b/Makefile.libretro index 7679505..8a4d57a 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 @@ -32,19 +36,48 @@ asm_mix = 0 ifeq ($(platform), unix) TARGET := $(TARGET_NAME)_libretro.so SHARED := -shared + DONT_COMPILE_IN_ZLIB = 1 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) + CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DFAMEC_NO_GOTOS +endif + OSXVER = `sw_vers -productVersion | cut -d. -f 2` + OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` +ifeq ($(OSX_LT_MAVERICKS),"YES") + SHARED += -mmacosx-version-min=10.5 +endif else ifeq ($(platform), ios) TARGET := $(TARGET_NAME)_libretro_ios.dylib SHARED := -dynamiclib + APPLE := 1 + +ifeq ($(IOSSDK),) + IOSSDK := $(shell xcrun -sdk iphoneos -show-sdk-path) +endif - CC = clang -arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=5.0 - CXX = clang++ -arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=5.0 - CC_AS = perl ./tools/gas-preprocessor.pl $(CC) -miphoneos-version-min=5.0 + CC = clang -arch armv7 -isysroot $(IOSSDK) + CXX = clang++ -arch armv7 -isysroot $(IOSSDK) + CC_AS = perl ./tools/gas-preprocessor.pl $(CC) CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon - CFLAGS += -DIOS -miphoneos-version-min=5.0 + CFLAGS += -DIOS + OSXVER = `sw_vers -productVersion | cut -d. -f 2` + OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` +ifeq ($(OSX_LT_MAVERICKS),"YES") + CC += -miphoneos-version-min=5.0 + CXX += -miphoneos-version-min=5.0 + CC_AS += -miphoneos-version-min=5.0 + CFLAGS += -miphoneos-version-min=5.0 +endif ARCH := arm @@ -186,7 +219,7 @@ ifneq (,$(findstring armasm,$(platform))) endif ARCH = arm else - TARGET := $(TARGET_NAME)_retro.dll + TARGET := $(TARGET_NAME)_libretro.dll CC = gcc LD_FLAGS := -fPIC SHARED := -shared -static-libgcc -static-libstdc++ @@ -210,7 +243,9 @@ asm_mix = 1 endif CFLAGS += -fPIC -LDLIBS += -lm +ifeq ($(findstring Haiku,$(shell uname -a)),) + LDLIBS += -lm +endif SHARED ?= -shared LDFLAGS += $(SHARED)