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