-
Notifications
You must be signed in to change notification settings - Fork 7
/
libhelloworld_jni.target.mk
121 lines (90 loc) · 2.79 KB
/
libhelloworld_jni.target.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# This file is generated by gyp; do not edit.
include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE := libhelloworld_jni
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_TARGET_ARCH := $(TARGET_$(GYP_VAR_PREFIX)ARCH)
LOCAL_SDK_VERSION := 19
gyp_intermediate_dir := $(call local-intermediates-dir,,$(GYP_VAR_PREFIX))
gyp_shared_intermediate_dir := $(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))
# Make sure our deps are built first.
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,STATIC_LIBRARIES,djinni_jni,,,$(GYP_VAR_PREFIX))/djinni_jni.a
GYP_GENERATED_OUTPUTS :=
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
LOCAL_GENERATED_SOURCES :=
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
deps/djinni/support-lib/jni/djinni_main.cpp \
generated-src/jni/NativeHelloWorld.cpp \
src/hello_world_impl.cpp
# Flags passed to both C and C++ files.
MY_CFLAGS_Debug := \
-gdwarf-2 \
-Werror \
-Wall \
-Wextra \
-Wno-missing-field-initializers \
-g \
-O0 \
-DDEBUG=1
MY_DEFS_Debug := \
'-DDEBUG=1'
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(LOCAL_PATH)/generated-src/jni \
$(LOCAL_PATH)/generated-src/cpp \
$(LOCAL_PATH)/src \
$(LOCAL_PATH)/deps/djinni/support-lib/jni
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Debug := \
-std=c++11 \
-frtti \
-fexceptions \
-Wno-literal-suffix
# Flags passed to both C and C++ files.
MY_CFLAGS_Release := \
-gdwarf-2 \
-Werror \
-Wall \
-Wextra \
-Wno-missing-field-initializers \
-Os \
-fomit-frame-pointer \
-fdata-sections \
-ffunction-sections \
-DNDEBUG=1
MY_DEFS_Release := \
'-DNDEBUG=1'
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(LOCAL_PATH)/generated-src/jni \
$(LOCAL_PATH)/generated-src/cpp \
$(LOCAL_PATH)/src \
$(LOCAL_PATH)/deps/djinni/support-lib/jni
# Flags passed to only C++ (and not C) files.
LOCAL_CPPFLAGS_Release := \
-std=c++11 \
-frtti \
-fexceptions \
-Wno-literal-suffix
LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
### Rules for final target.
LOCAL_LDFLAGS_Debug := \
-llog \
-Wl,--build-id,--gc-sections,--exclude-libs,ALL
LOCAL_LDFLAGS_Release := \
-llog \
-Wl,--build-id,--gc-sections,--exclude-libs,ALL
LOCAL_GYP_LIBS :=
LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) $(LOCAL_GYP_LIBS)
LOCAL_STATIC_LIBRARIES := \
djinni_jni
# Enable grouping to fix circular references
LOCAL_GROUP_STATIC_LIBRARIES := true
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)