summaryrefslogtreecommitdiffstats
path: root/camera/android-api.mk
blob: 3b4e1f6d506204930284133c0fcdfa636a800635 (plain)
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

# Makefile variables and C/C++ macros to recognize API level
ANDROID_API_MM_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 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 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_MM_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