forked from CyanogenMod/android_hardware_ti_omap4
-
Notifications
You must be signed in to change notification settings - Fork 3
/
android-api.mk
39 lines (36 loc) · 1.28 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
# Makefile variables and C/C++ macros to recognize API level
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 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_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