Android.mk 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. LOCAL_PATH := $(call my-dir)
  2. include $(CLEAR_VARS)
  3. GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)"
  4. ifneq ($(GIT_VERSION)," unknown")
  5. LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
  6. endif
  7. LOCAL_MODULE := retro
  8. R := ../
  9. FR := $(LOCAL_PATH)/$(R)
  10. use_cyclone = 0
  11. use_fame = 0
  12. use_musashi = 0
  13. use_drz80 = 0
  14. use_cz80 = 0
  15. use_sh2drc = 0
  16. use_svpdrc = 0
  17. asm_memory = 0
  18. asm_render = 0
  19. asm_ym2612 = 0
  20. asm_misc = 0
  21. asm_cdmemory = 0
  22. asm_mix = 0
  23. asm_32xdraw = 0
  24. asm_32xmemory = 0
  25. ifeq ($(TARGET_ARCH),arm)
  26. LOCAL_ARM_MODE := arm
  27. ifeq ($(NEON_BUILD),1)
  28. LOCAL_ARM_NEON := true
  29. endif
  30. # use_cyclone = 1
  31. # use_drz80 = 1
  32. use_sh2drc = 1
  33. # use_svpdrc = 1
  34. # asm_memory = 1
  35. # asm_render = 1
  36. # asm_ym2612 = 1
  37. # asm_misc = 1
  38. # asm_cdmemory = 1
  39. # asm_mix = 1
  40. # asm_32xdraw = 1
  41. # asm_32xmemory = 1
  42. # for armeabi to build...
  43. CYCLONE_CONFIG = cyclone_config_armv4.h
  44. $(cleantarget)::
  45. $(MAKE) -C $(FR)cpu/cyclone/ clean
  46. else
  47. use_fame = 1
  48. use_cz80 = 1
  49. endif
  50. # PD is currently not strict aliasing safe
  51. LOCAL_CFLAGS += -fno-strict-aliasing
  52. # sources
  53. SRCS_COMMON :=
  54. DEFINES :=
  55. ARCH := $(TARGET_ARCH)
  56. include $(R)platform/common/common.mak
  57. LOCAL_SRC_FILES += $(SRCS_COMMON)
  58. LOCAL_SRC_FILES += $(R)platform/libretro/libretro.c
  59. LOCAL_SRC_FILES += $(R)platform/common/mp3_sync.c
  60. LOCAL_SRC_FILES += $(R)platform/common/mp3.c
  61. LOCAL_SRC_FILES += $(R)platform/common/mp3_dummy.c
  62. # zlib/unzip
  63. LOCAL_SRC_FILES += $(R)zlib/gzio.c $(R)zlib/inffast.c $(R)zlib/inflate.c \
  64. $(R)zlib/inftrees.c $(R)zlib/trees.c $(R)zlib/deflate.c \
  65. $(R)zlib/crc32.c $(R)zlib/adler32.c $(R)zlib/zutil.c \
  66. $(R)zlib/compress.c $(R)zlib/uncompr.c
  67. LOCAL_SRC_FILES += $(R)unzip/unzip.c
  68. LOCAL_C_INCLUDES += $(R)
  69. # note: don't use -O3, causes some NDKs run out of memory while compiling FAME
  70. LOCAL_CFLAGS += -Wall -O2 -ffast-math -DNDEBUG
  71. LOCAL_CFLAGS += $(addprefix -D,$(DEFINES))
  72. LOCAL_LDLIBS := -llog
  73. ifneq ($(filter armeabi%, $(TARGET_ARCH_ABI)),)
  74. $(CORE_DIR)/pico/pico_int_offs.h:
  75. cp $(CORE_DIR)/tools/offsets/generic-ilp32-offsets.h $@
  76. .PHONY: $(CORE_DIR)/pico/pico_int_offs.h
  77. $(filter %.S,$(SRCS_COMMON)): $(CORE_DIR)/pico/pico_int_offs.h
  78. endif
  79. include $(BUILD_SHARED_LIBRARY)