X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=8a4d57a50ffe3a14823f5e93325d7ad27ebb0192;hb=a1f2e1b1537146ec7b72b1e9d5d5cd4d8dd6f06e;hp=87d82723d0ace2ef41b0d6a5d1c62f8937eee759;hpb=05689b390bad4c5739500dd74e4d4c0c7388eb0c;p=picodrive.git diff --git a/Makefile.libretro b/Makefile.libretro index 87d8272..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 @@ -212,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++ @@ -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)