X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=8a4d57a50ffe3a14823f5e93325d7ad27ebb0192;hb=a1f2e1b1537146ec7b72b1e9d5d5cd4d8dd6f06e;hp=128e5f3eff57c3ff6f6f00d5b1f7a73af90cc153;hpb=0877c7ddb63971f4344e392b14fbbb6f9371c290;p=picodrive.git diff --git a/Makefile.libretro b/Makefile.libretro index 128e5f3..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,13 +219,15 @@ 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++ CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__ endif +CFLAGS += -DNO_ZLIB + ifeq ($(NO_MMAP),1) CFLAGS += -DNO_MMAP endif @@ -208,7 +243,9 @@ asm_mix = 1 endif CFLAGS += -fPIC -LDLIBS += -lm +ifeq ($(findstring Haiku,$(shell uname -a)),) + LDLIBS += -lm +endif SHARED ?= -shared LDFLAGS += $(SHARED)