summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorWouter van Oortmerssen <wvo@google.com>2016-01-06 17:48:19 -0800
committerWouter van Oortmerssen <wvo@google.com>2016-01-06 17:48:19 -0800
commit514d274a4550b07c85ae8ee8a9321ccfe79b18d0 (patch)
tree5eb39f486afc8ff65c31562d6c7ce5699a389d9a /android
parent6beafd14e09664d526e78c7c945f8f0c40f6de75 (diff)
downloadflatbuffers-514d274a4550b07c85ae8ee8a9321ccfe79b18d0.tar.gz
flatbuffers-514d274a4550b07c85ae8ee8a9321ccfe79b18d0.tar.bz2
flatbuffers-514d274a4550b07c85ae8ee8a9321ccfe79b18d0.zip
Added android static library target for text parsing/generation etc.
Change-Id: If24e3eea90cef2a0d6a9d98fb503d2e3ec34ceed Tested: on Linux.
Diffstat (limited to 'android')
-rwxr-xr-xandroid/jni/Android.mk21
1 files changed, 14 insertions, 7 deletions
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 1d89d886..905fbe91 100755
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -19,26 +19,33 @@ LOCAL_PATH := $(call my-dir)/../..
include $(LOCAL_PATH)/android/jni/include.mk
LOCAL_PATH := $(call realpath-portable,$(LOCAL_PATH))
-# Empty static library so that other projects can include FlatBuffers as a
-# module.
+# Empty static library so that other projects can include just the basic
+# FlatBuffers headers as a module.
include $(CLEAR_VARS)
LOCAL_MODULE := flatbuffers
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_CPPFLAGS := -std=c++11 -fexceptions -Wall -Wno-literal-suffix
include $(BUILD_STATIC_LIBRARY)
+# static library that additionally includes text parsing/generation/reflection
+# for projects that want richer functionality.
+include $(CLEAR_VARS)
+LOCAL_MODULE := flatbuffers_extra
+LOCAL_SRC_FILES := src/idl_parser.cpp \
+ src/idl_gen_text.cpp \
+ src/reflection.cpp
+LOCAL_STATIC_LIBRARIES := flatbuffers
+include $(BUILD_STATIC_LIBRARY)
+
# FlatBuffers test
include $(CLEAR_VARS)
LOCAL_MODULE := FlatBufferTest
LOCAL_SRC_FILES := android/jni/main.cpp \
tests/test.cpp \
- src/idl_parser.cpp \
- src/idl_gen_text.cpp \
src/idl_gen_fbs.cpp \
- src/idl_gen_general.cpp \
- src/reflection.cpp
+ src/idl_gen_general.cpp
LOCAL_LDLIBS := -llog -landroid
-LOCAL_STATIC_LIBRARIES := android_native_app_glue flatbuffers
+LOCAL_STATIC_LIBRARIES := android_native_app_glue flatbuffers_extra
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)