diff options
author | Daniel Levin <dendy@ti.com> | 2012-07-17 19:28:46 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-07-25 09:15:58 -0500 |
commit | a697b9ee46373ec5f1a122acb68ad49478f8e08f (patch) | |
tree | 9426322bdf2a3b677b3f77041b89a272ebdc57c0 /android-api.mk | |
parent | d672634b78d241fc168118b2ffbd14fb1cb6399a (diff) | |
download | hardware_ti_omap4-a697b9ee46373ec5f1a122acb68ad49478f8e08f.zip hardware_ti_omap4-a697b9ee46373ec5f1a122acb68ad49478f8e08f.tar.gz hardware_ti_omap4-a697b9ee46373ec5f1a122acb68ad49478f8e08f.tar.bz2 |
Recognize current pastry
Added android-api.mk with Makefile variables and C/C++ macros to
recognise current pastry: ANDROID_API_<PASTRY>_OR_LATER
Makefile cariables should be cleared after using by calling function:
clear-android-api-vars
Currently ICS (4.0.x, API 14/15) and JB (4.1.x, API 16) pastries
are supported.
Change-Id: Id3e1ba425dbbab506c15de370a4fd30d1fc5f330
Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'android-api.mk')
-rw-r--r-- | android-api.mk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/android-api.mk b/android-api.mk new file mode 100644 index 0000000..e253b2a --- /dev/null +++ b/android-api.mk @@ -0,0 +1,21 @@ + +# Makefile variables and C/C++ macros to recognize API level +ANDROID_API_JB_OR_LATER := +ANDROID_API_ICS_OR_LATER := +ANDROID_API_CFLAGS := + +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_JB_OR_LATER:=) \ +$(eval ANDROID_API_ICS_OR_LATER:=) \ +$(eval ANDROID_API_CFLAGS:=) \ +$(eval clear-android-api-vars:=) +endef |