refactor libexif into libexif and libexif_jni
- In PDK case, jni part is built only when java is supported
- both libexif and libexif_jni no longer belong to user tag
Bug: 6623618
Change-Id: I33a1f19654eb0ffb97733a4a59b9bad5938d2e91
diff --git a/Android.mk b/Android.mk
index 4754738..8933df8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,12 +15,14 @@
#
LOCAL_PATH := $(my-dir)
+#########################################
+# non-jni part
+
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:= \
- main.c \
exif.c \
gpsinfo.c \
iptc.c \
@@ -31,8 +33,32 @@
LOCAL_MODULE := libexif
LOCAL_SHARED_LIBRARIES := \
- libnativehelper \
libcutils \
libutils
include $(BUILD_SHARED_LIBRARY)
+
+#########################################
+# jni part
+
+# allow jni build if java is supported, necessary for PDK
+ifneq ($(TARGET_BUILD_JAVA_SUPPORT_LEVEL),)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES:= \
+ main.c
+
+LOCAL_MODULE := libexif_jni
+
+LOCAL_SHARED_LIBRARIES := \
+ libnativehelper \
+ libcutils \
+ libutils \
+ libexif
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif # JAVA_SUPPORT