Refine NegCon analog response
[pcsx_rearmed.git] / jni / Android.mk
CommitLineData
b2058a5b
TK
1LOCAL_PATH := $(call my-dir)
2
77668f25
AK
3$(shell cd "$(LOCAL_PATH)" && ((git describe || echo) | sed -e 's/.*/#define REV "\0"/' > ../frontend/revision.h_))
4$(shell cd "$(LOCAL_PATH)" && (diff -q ../frontend/revision.h_ ../frontend/revision.h > /dev/null 2>&1 || cp ../frontend/revision.h_ ../frontend/revision.h))
5$(shell cd "$(LOCAL_PATH)" && (rm ../frontend/revision.h_))
b2058a5b 6
77668f25
AK
7ROOT_DIR := $(LOCAL_PATH)/..
8CORE_DIR := $(ROOT_DIR)/libpcsxcore
9SPU_DIR := $(ROOT_DIR)/plugins/dfsound
10GPU_DIR := $(ROOT_DIR)/plugins/gpulib
11CDR_DIR := $(ROOT_DIR)/plugins/cdrcimg
12INPUT_DIR := $(ROOT_DIR)/plugins/dfinput
13FRONTEND_DIR := $(ROOT_DIR)/frontend
14NEON_DIR := $(ROOT_DIR)/plugins/gpu_neon
15UNAI_DIR := $(ROOT_DIR)/plugins/gpu_unai
16DYNAREC_DIR := $(ROOT_DIR)/libpcsxcore/new_dynarec
17
18# core
19SOURCES_C := $(CORE_DIR)/cdriso.c \
20 $(CORE_DIR)/cdrom.c \
21 $(CORE_DIR)/cheat.c \
22 $(CORE_DIR)/debug.c \
23 $(CORE_DIR)/decode_xa.c \
24 $(CORE_DIR)/disr3000a.c \
25 $(CORE_DIR)/mdec.c \
26 $(CORE_DIR)/misc.c \
27 $(CORE_DIR)/plugins.c \
28 $(CORE_DIR)/ppf.c \
29 $(CORE_DIR)/psxbios.c \
30 $(CORE_DIR)/psxcommon.c \
31 $(CORE_DIR)/psxcounters.c \
32 $(CORE_DIR)/psxdma.c \
33 $(CORE_DIR)/psxhle.c \
34 $(CORE_DIR)/psxhw.c \
35 $(CORE_DIR)/psxinterpreter.c \
36 $(CORE_DIR)/psxmem.c \
37 $(CORE_DIR)/r3000a.c \
38 $(CORE_DIR)/sio.c \
39 $(CORE_DIR)/socket.c \
40 $(CORE_DIR)/spu.c \
41 $(CORE_DIR)/gte.c \
42 $(CORE_DIR)/gte_nf.c \
43 $(CORE_DIR)/gte_divider.c
b2058a5b 44
77668f25
AK
45# spu
46SOURCES_C += $(SPU_DIR)/dma.c \
47 $(SPU_DIR)/freeze.c \
48 $(SPU_DIR)/registers.c \
49 $(SPU_DIR)/spu.c \
50 $(SPU_DIR)/out.c \
51 $(SPU_DIR)/nullsnd.c
b2058a5b 52
77668f25
AK
53# gpu
54SOURCES_C += $(GPU_DIR)/gpu.c \
55 $(GPU_DIR)/vout_pl.c
b2058a5b 56
77668f25
AK
57# cdrcimg
58SOURCES_C += $(CDR_DIR)/cdrcimg.c
b2058a5b 59
77668f25
AK
60# dfinput
61SOURCES_C += $(INPUT_DIR)/main.c \
62 $(INPUT_DIR)/pad.c \
63 $(INPUT_DIR)/guncon.c
b2058a5b 64
77668f25
AK
65# frontend
66SOURCES_C += $(FRONTEND_DIR)/main.c \
67 $(FRONTEND_DIR)/plugin.c \
68 $(FRONTEND_DIR)/cspace.c \
69 $(FRONTEND_DIR)/libretro.c
b2058a5b 70
77668f25
AK
71# dynarec
72SOURCES_C += $(DYNAREC_DIR)/backends/psx/emu_if.c
c82f907a 73
661e95f6 74COREFLAGS := -ffast-math -funroll-loops -DHAVE_LIBRETRO -DNO_FRONTEND -DFRONTEND_SUPPORTS_RGB565 -DANDROID -DREARMED
b2058a5b 75
77668f25
AK
76ifeq ($(TARGET_ARCH),arm)
77 SOURCES_ASM := $(CORE_DIR)/gte_arm.S \
78 $(SPU_DIR)/arm_utils.S \
79 $(DYNAREC_DIR)/arm/linkage_arm.S
80 SOURCES_C += $(DYNAREC_DIR)/new_dynarec.c \
81 $(DYNAREC_DIR)/backends/psx/pcsxmem.c
82else
83 COREFLAGS += -DDRC_DISABLE
84 SOURCES_ASM :=
b2058a5b
TK
85endif
86
77668f25
AK
87ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
88 COREFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
89 SOURCES_ASM += $(CORE_DIR)/gte_neon.S \
90 $(NEON_DIR)/psx_gpu/psx_gpu_arm_neon.S \
91 $(FRONTEND_DIR)/cspace_neon.S
92 SOURCES_C += $(NEON_DIR)/psx_gpu_if.c
93else ifeq ($(TARGET_ARCH_ABI),armeabi)
94 SOURCES_ASM += $(UNAI_DIR)/gpu_arm.s \
95 $(FRONTEND_DIR)/cspace_arm.S
96 SOURCES_C += $(UNAI_DIR)/gpulib_if.cpp
97else
98 SOURCES_C += $(UNAI_DIR)/gpulib_if.cpp
b2058a5b
TK
99endif
100
77668f25
AK
101GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
102ifneq ($(GIT_VERSION)," unknown")
103 COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
b2058a5b
TK
104endif
105
77668f25
AK
106include $(CLEAR_VARS)
107LOCAL_MODULE := retro
108LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_ASM)
109LOCAL_CFLAGS := $(COREFLAGS)
110LOCAL_C_INCLUDES := $(ROOT_DIR)/include
111LOCAL_LDFLAGS := -Wl,-version-script=$(FRONTEND_DIR)/link.T
112LOCAL_LDLIBS := -lz -llog
113LOCAL_ARM_MODE := arm
114
115ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
116 LOCAL_ARM_NEON := true
117endif
118ifeq ($(TARGET_ARCH),arm)
119 LOCAL_LDLIBS += -Wl,-no-warn-shared-textrel
b2058a5b 120endif
b2058a5b
TK
121
122include $(BUILD_SHARED_LIBRARY)