X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=8a4d57a50ffe3a14823f5e93325d7ad27ebb0192;hb=2babf3518e258cc3d6649f6e34a267e83dffd7d9;hp=6e43abcfe5f3e18aa34b921790c9132e07e1a62d;hpb=2edc89c4fd3fa57de4ea0f48da74659ab8de1b1b;p=picodrive.git diff --git a/Makefile.libretro b/Makefile.libretro index 6e43abc..8a4d57a 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -36,6 +36,7 @@ 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 @@ -49,8 +50,9 @@ endif ifeq ($(arch),ppc) CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DFAMEC_NO_GOTOS endif -OSXVER = `sw_vers -productVersion | cut -c 4` -ifneq ($(OSXVER),9) + 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) @@ -58,14 +60,19 @@ else ifeq ($(platform), ios) SHARED := -dynamiclib APPLE := 1 +ifeq ($(IOSSDK),) + IOSSDK := $(shell xcrun -sdk iphoneos -show-sdk-path) +endif + 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 -OSXVER = `sw_vers -productVersion | cut -c 4` -ifneq ($(OSXVER),9) + 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 @@ -236,7 +243,9 @@ asm_mix = 1 endif CFLAGS += -fPIC -LDLIBS += -lm +ifeq ($(findstring Haiku,$(shell uname -a)),) + LDLIBS += -lm +endif SHARED ?= -shared LDFLAGS += $(SHARED)