forked from CyanogenMod/android_hardware_ti_omap4
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathandroid-api.mk
81 lines (78 loc) · 2.81 KB
/
android-api.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
# Makefile variables and C/C++ macros to recognize API level
ANDROID_API_P_OR_LATER :=
ANDROID_API_O_MR1_OR_LATER :=
ANDROID_API_O_OR_LATER :=
ANDROID_API_N_MR1_OR_LATER :=
ANDROID_API_N_OR_LATER :=
ANDROID_API_MM_OR_LATER :=
ANDROID_API_LP_MR1_OR_LATER :=
ANDROID_API_LP_OR_LATER :=
ANDROID_API_KK_OR_LATER :=
ANDROID_API_JB_MR1_OR_LATER :=
ANDROID_API_JB_OR_LATER :=
ANDROID_API_ICS_OR_LATER :=
ANDROID_API_CFLAGS :=
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28 || echo 1),)
ANDROID_API_P_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_P_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27 || echo 1),)
ANDROID_API_O_MR1_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_O_MR1_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 || echo 1),)
ANDROID_API_O_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_O_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 25 || echo 1),)
ANDROID_API_N_MR1_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_N_MR1_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24 || echo 1),)
ANDROID_API_N_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_N_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23 || echo 1),)
ANDROID_API_MM_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_MM_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 22 || echo 1),)
ANDROID_API_LP_MR1_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_LP_MR1_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 20 || echo 1),)
ANDROID_API_LP_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_LP_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 19 || echo 1),)
ANDROID_API_KK_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_KK_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 17 || echo 1),)
ANDROID_API_JB_MR1_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_JB_MR1_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 16 || echo 1),)
ANDROID_API_JB_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_JB_OR_LATER
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 14 || echo 1),)
ANDROID_API_ICS_OR_LATER := true
ANDROID_API_CFLAGS += -DANDROID_API_ICS_OR_LATER
endif
define clear-android-api-vars
$(eval ANDROID_API_P_OR_LATER:=) \
$(eval ANDROID_API_O_MR1_OR_LATER:=) \
$(eval ANDROID_API_O_OR_LATER:=) \
$(eval ANDROID_API_N_MR1_OR_LATER:=) \
$(eval ANDROID_API_N_OR_LATER:=) \
$(eval ANDROID_API_MM_OR_LATER:=) \
$(eval ANDROID_API_LP_MR1_OR_LATER:=) \
$(eval ANDROID_API_LP_OR_LATER:=) \
$(eval ANDROID_API_KK_OR_LATER:=) \
$(eval ANDROID_API_JB_MR1_OR_LATER:=) \
$(eval ANDROID_API_JB_OR_LATER:=) \
$(eval ANDROID_API_ICS_OR_LATER:=) \
$(eval ANDROID_API_CFLAGS:=) \
$(eval clear-android-api-vars:=)
endef