X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=jni%2FAndroid.mk;h=bf81476cdd5a2ea2df51c6a01bec38bf18cd6e51;hb=cbf31d2c254c956a0b497e3021610ce3a5ff0748;hp=511bf77f76d0f376b9dcacbfe9ed1d99364eff9e;hpb=0a91c6e9029e87029b4e7993145f4d05608be34d;p=picodrive.git diff --git a/jni/Android.mk b/jni/Android.mk index 511bf77..bf81476 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -2,12 +2,16 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -ifeq ($(NEON_BUILD)$(TARGET_ARCH_ABI),1armeabi-v7a) - LOCAL_MODULE := retro_picodrive-neon -else - LOCAL_MODULE := retro_picodrive +GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +ifneq ($(GIT_VERSION)," unknown") + LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" endif +#fix stupid change in ndk r11 that breaks compiling even when the exe would run fine +LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true + +LOCAL_MODULE := retro + R := ../ FR := $(LOCAL_PATH)/$(R) @@ -52,6 +56,9 @@ else use_sh2mame = 1 endif +# PD is currently not strict aliasing safe +LOCAL_CFLAGS += -fno-strict-aliasing + # sources SRCS_COMMON := DEFINES := @@ -59,7 +66,8 @@ ARCH := $(TARGET_ARCH) include $(R)platform/common/common.mak LOCAL_SRC_FILES += $(SRCS_COMMON) -LOCAL_SRC_FILES += $(R)platform/libretro.c +LOCAL_SRC_FILES += $(R)platform/libretro/libretro.c +LOCAL_SRC_FILES += $(R)platform/common/mp3.c LOCAL_SRC_FILES += $(R)platform/common/mp3_dummy.c # zlib/unzip @@ -70,10 +78,11 @@ LOCAL_SRC_FILES += $(R)zlib/gzio.c $(R)zlib/inffast.c $(R)zlib/inflate.c \ LOCAL_SRC_FILES += $(R)unzip/unzip.c $(R)unzip/unzip_stream.c -LOCAL_C_INCLUDES += $(R) $(R)platform/linux +LOCAL_C_INCLUDES += $(R) +# note: don't use -O3, causes some NDKs run out of memory while compiling FAME +LOCAL_CFLAGS += -Wall -O2 -ffast-math -DNDEBUG -DINLINE=inline LOCAL_CFLAGS += $(addprefix -D,$(DEFINES)) -LOCAL_CFLAGS += -Wall -O3 -ffast-math -DNDEBUG LOCAL_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY)