forked from RSDKModding/RSDKv3-Decompilation
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Android.mk
105 lines (72 loc) · 2.92 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
LOCAL_PATH := $(call my-dir)
OGG_DIR := dependencies/android/libogg
VORBIS_DIR := dependencies/android/libvorbis
THEORA_DIR := dependencies/android/libtheora
OGG_INCLUDES := $(LOCAL_PATH)/$(OGG_DIR)/include
VORBIS_INCLUDES := $(LOCAL_PATH)/$(VORBIS_DIR)/include \
$(LOCAL_PATH)/$(VORBIS_DIR)/lib
THEORA_INCLUDES := $(LOCAL_PATH)/$(THEORA_DIR)/include \
$(LOCAL_PATH)/$(THEORA_DIR)/lib
######################################################################
# OGG
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libogg
LOCAL_CFLAGS := -ffast-math -fsigned-char -O2 -fPIC -DPIC \
-DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_
LOCAL_C_INCLUDES := $(OGG_INCLUDES)
WILDCARD_SETUP := \
$(wildcard $(LOCAL_PATH)/$(OGG_DIR)/src/*.c)
LOCAL_SRC_FILES := \
$(subst jni/src/, , $(WILDCARD_SETUP))
include $(BUILD_STATIC_LIBRARY)
######################################################################
# VORBIS
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libvorbis
LOCAL_CFLAGS := -ffast-math -fsigned-char -O2 -fPIC -DPIC \
-DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_
LOCAL_C_INCLUDES := $(OGG_INCLUDES) $(VORBIS_INCLUDES)
WILDCARD_SETUP := \
$(wildcard $(LOCAL_PATH)/$(VORBIS_DIR)/lib/*.c)
FILTERED := $(filter-out $(LOCAL_PATH)/$(VORBIS_DIR)/lib/psytune.c, $(WILDCARD_SETUP))
LOCAL_SRC_FILES := \
$(subst jni/src/, , $(FILTERED))
include $(BUILD_STATIC_LIBRARY)
######################################################################
# THEORA
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_MODULE := libtheora
LOCAL_CFLAGS := -ffast-math -fsigned-char -O2 -fPIC -DPIC \
-DBYTE_ORDER=LITTLE_ENDIAN -D_ARM_ASSEM_
LOCAL_C_INCLUDES := $(OGG_INCLUDES) $(THEORA_INCLUDES)
WILDCARD_SETUP := \
$(wildcard $(LOCAL_PATH)/$(THEORA_DIR)/lib/*.c)
LOCAL_SRC_FILES := \
$(subst jni/src/, , $(WILDCARD_SETUP))
include $(BUILD_STATIC_LIBRARY)
######################################################################
include $(CLEAR_VARS)
LOCAL_MODULE := main
SDL_PATH := ../SDL
LOCAL_CFLAGS := -fexceptions
LOCAL_CPPFLAGS := -std=c++17
APP_CPPFLAGS := -std=c++17
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/$(SDL_PATH)/include \
$(LOCAL_PATH)/dependencies/all \
$(LOCAL_PATH)/$(VORBIS_DIR)/include \
$(LOCAL_PATH)/$(OGG_DIR)/include \
$(LOCAL_PATH)/$(THEORA_DIR)/include \
$(LOCAL_PATH)/dependencies/all/theoraplay \
$(LOCAL_PATH)/dependencies/all/tinyxml2 \
WILDCARD_SETUP := \
$(wildcard $(LOCAL_PATH)/dependencies/all/theoraplay/*.c) \
$(wildcard $(LOCAL_PATH)/dependencies/all/tinyxml2/*.cpp) \
$(wildcard $(LOCAL_PATH)/RSDKv3/*.cpp)
LOCAL_SRC_FILES := $(subst jni/src/, , $(WILDCARD_SETUP))
LOCAL_LDLIBS := -lGLESv1_CM -llog
LOCAL_SHARED_LIBRARIES := SDL2 libogg libvorbis libtheora
include $(BUILD_SHARED_LIBRARY)