forked from cross-rs/cross
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAndroid.mk
More file actions
101 lines (81 loc) · 2.34 KB
/
Android.mk
File metadata and controls
101 lines (81 loc) · 2.34 KB
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
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := config.c
LOCAL_MODULE := config
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS := -Werror
include $(BUILD_HOST_EXECUTABLE)
LOCAL_PATH := $(call my-dir)
# -----------------------------------------------------------------------------
# Benchmarks.
# -----------------------------------------------------------------------------
test_tags := tests
benchmark_c_flags := \
-Wall -Wextra \
-Werror \
-fno-builtin \
benchmark_src_files := \
benchmark_main.cc \
bench.cc
# Build benchmarks.
include $(CLEAR_VARS)
LOCAL_MODULE := benchmarks
LOCAL_MODULE_TAGS := tests
LOCAL_CFLAGS += $(benchmark_c_flags)
LOCAL_SHARED_LIBRARIES += libm libdl
LOCAL_SRC_FILES := $(benchmark_src_files)
# -----------------------------------------------------------------------------
# Unit tests.
# -----------------------------------------------------------------------------
test_c_flags := \
-g \
-Wall \
-Werror
##################################
# test executable
LOCAL_MODULE := module
LOCAL_SRC_FILES := src.c
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS := $(test_c_flags)
LOCAL_MODULE_RELATIVE_PATH := config-tests
# Unit tests.
# =========================================================
include $(CLEAR_VARS)
LOCAL_MODULE := init_tests
LOCAL_SRC_FILES := \
init_parser_test.cc \
property_service_test.cc \
service_test.cc \
util_test.cc \
##################################
# test executable
LOCAL_MODULE := module
LOCAL_SRC_FILES := src.c
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS := $(test_c_flags)
LOCAL_MODULE_RELATIVE_PATH := config-tests
LOCAL_SHARED_LIBRARIES += \
libcutils \
libbase \
LOCAL_STATIC_LIBRARIES := libinit
LOCAL_SANITIZE := integer
LOCAL_CLANG := true
LOCAL_CPPFLAGS := -Wall -Wextra -Werror
include $(BUILD_NATIVE_TEST)
# Other section.
# =========================================================
include $(call all-makefiles-under,$(LOCAL_PATH))
# =============================================================================
# Unit tests.
# =============================================================================
test_c_flags := \
-g \
-Wall \
-Werror
##################################
# test executable
LOCAL_MODULE := mod2
LOCAL_SRC_FILES := mod.c
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_CFLAGS := $(test_c_flags)
LOCAL_MODULE_RELATIVE_PATH := mod2-tests