libretro: Split update_controller_port_device()
[pcsx_rearmed.git] / jni / Android.mk
CommitLineData
b2058a5b
TK
1LOCAL_PATH := $(call my-dir)
2
3include $(CLEAR_VARS)
4
5APP_DIR := ../../src
6
829ebbca 7#fix stupid change in ndk r11 that breaks compiling even when the exe would run fine
8LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true
9
b2058a5b
TK
10ifneq ($(TARGET_ARCH_ABI),armeabi-v7a)
11 NO_NEON_BUILD := 1
12else
13 NO_NEON_BUILD := $(NO_NEON)
14endif
15
16ifeq ($(NO_NEON_BUILD)$(TARGET_ARCH_ABI),1armeabi-v7a)
17 LOCAL_MODULE := retro-noneon
18else
19 LOCAL_MODULE := retro
20endif
21
22ifeq ($(TARGET_ARCH),arm)
23 LOCAL_ARM_MODE := arm
24
b2058a5b
TK
25 LOCAL_CFLAGS += -DANDROID_ARM
26
27 LOCAL_SRC_FILES += ../libpcsxcore/gte_arm.S
28
29 # dynarec
30 LOCAL_SRC_FILES += ../libpcsxcore/new_dynarec/new_dynarec.c ../libpcsxcore/new_dynarec/linkage_arm.S ../libpcsxcore/new_dynarec/emu_if.c ../libpcsxcore/new_dynarec/pcsxmem.c
31
32 # spu
33 LOCAL_SRC_FILES += ../plugins/dfsound/arm_utils.S
34
c82f907a 35 # misc
36
b2058a5b
TK
37 ifeq ($(NO_NEON_BUILD),1)
38 # gpu
39 LOCAL_CFLAGS += -DREARMED
c82f907a 40 LOCAL_SRC_FILES += ../plugins/gpu_unai/gpulib_if.cpp ../plugins/gpu_unai/gpu_arm.s
d57557c0 41 LOCAL_SRC_FILES += ../frontend/cspace_arm.S
b2058a5b
TK
42 else
43 LOCAL_ARM_NEON := true
44 LOCAL_CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
8ac2c35b 45 LOCAL_SRC_FILES += ../libpcsxcore/gte_neon.S ../frontend/cspace_neon.S
b2058a5b
TK
46
47 # gpu
48 LOCAL_SRC_FILES += ../plugins/gpu_neon/psx_gpu_if.c ../plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S
49 endif
50endif
51
52ifeq ($(TARGET_ARCH),x86)
53 LOCAL_CFLAGS += -DANDROID_X86
54endif
55
56ifeq ($(TARGET_ARCH),mips)
57 LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
58endif
59
60ifneq ($(TARGET_ARCH),arm)
61 # gpu
62 LOCAL_CFLAGS += -DREARMED
c82f907a 63 LOCAL_SRC_FILES += ../plugins/gpu_unai/gpulib_if.cpp
b2058a5b
TK
64endif
65
66$(shell cd "$(LOCAL_PATH)" && ((git describe || echo) | sed -e 's/.*/#define REV "\0"/' > ../frontend/revision.h_))
67$(shell cd "$(LOCAL_PATH)" && (diff -q ../frontend/revision.h_ ../frontend/revision.h > /dev/null 2>&1 || cp ../frontend/revision.h_ ../frontend/revision.h))
68$(shell cd "$(LOCAL_PATH)" && (rm ../frontend/revision.h_))
69
70LOCAL_SRC_FILES += ../libpcsxcore/cdriso.c ../libpcsxcore/cdrom.c ../libpcsxcore/cheat.c ../libpcsxcore/debug.c \
71 ../libpcsxcore/decode_xa.c ../libpcsxcore/disr3000a.c ../libpcsxcore/mdec.c \
72 ../libpcsxcore/misc.c ../libpcsxcore/plugins.c ../libpcsxcore/ppf.c ../libpcsxcore/psxbios.c \
73 ../libpcsxcore/psxcommon.c ../libpcsxcore/psxcounters.c ../libpcsxcore/psxdma.c ../libpcsxcore/psxhle.c \
74 ../libpcsxcore/psxhw.c ../libpcsxcore/psxinterpreter.c ../libpcsxcore/psxmem.c ../libpcsxcore/r3000a.c \
75 ../libpcsxcore/sio.c ../libpcsxcore/socket.c ../libpcsxcore/spu.c
76LOCAL_SRC_FILES += ../libpcsxcore/gte.c ../libpcsxcore/gte_nf.c ../libpcsxcore/gte_divider.c
77
78# spu
79LOCAL_SRC_FILES += ../plugins/dfsound/dma.c ../plugins/dfsound/freeze.c \
80 ../plugins/dfsound/registers.c ../plugins/dfsound/spu.c \
81 ../plugins/dfsound/out.c ../plugins/dfsound/nullsnd.c
82
83# builtin gpu
84LOCAL_SRC_FILES += ../plugins/gpulib/gpu.c ../plugins/gpulib/vout_pl.c
85
86# cdrcimg
87LOCAL_SRC_FILES += ../plugins/cdrcimg/cdrcimg.c
88
89# dfinput
90LOCAL_SRC_FILES += ../plugins/dfinput/main.c ../plugins/dfinput/pad.c ../plugins/dfinput/guncon.c
91
a1a232ad 92# misc
c82f907a 93LOCAL_SRC_FILES += ../frontend/main.c ../frontend/plugin.c ../frontend/cspace.c
b2058a5b
TK
94
95# libretro
96LOCAL_SRC_FILES += ../frontend/libretro.c
97
46aa5b98 98LOCAL_CFLAGS += -O3 -ffast-math -funroll-loops -DNDEBUG -D_FILE_OFFSET_BITS=64 -DHAVE_LIBRETRO -DNO_FRONTEND -DFRONTEND_SUPPORTS_RGB565
da710571 99LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
b2058a5b
TK
100LOCAL_LDLIBS := -lz -llog
101
102include $(BUILD_SHARED_LIBRARY)