summaryrefslogtreecommitdiff
path: root/android/jni/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'android/jni/Android.mk')
-rwxr-xr-xandroid/jni/Android.mk25
1 files changed, 17 insertions, 8 deletions
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 47f2a87b..01e1141c 100755
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -16,16 +16,25 @@
LOCAL_PATH := $(call my-dir)
+# Empty static library so that other projects can include FlatBuffers 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)
-LOCAL_MODULE := FlatBufferTest
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../include
-LOCAL_SRC_FILES := main.cpp ../../tests/test.cpp ../../src/idl_parser.cpp ../../src/idl_gen_text.cpp ../../src/idl_gen_fbs.cpp
-LOCAL_LDLIBS := -llog -landroid
-LOCAL_STATIC_LIBRARIES := android_native_app_glue
-LOCAL_ARM_MODE:=arm
-LOCAL_CPPFLAGS += -std=c++11 -fexceptions -Wall -Wno-literal-suffix
-
+# FlatBuffers test
+include $(CLEAR_VARS)
+LOCAL_MODULE := FlatBufferTest
+LOCAL_SRC_FILES := main.cpp \
+ ../../tests/test.cpp \
+ ../../src/idl_parser.cpp \
+ ../../src/idl_gen_text.cpp \
+ ../../src/idl_gen_fbs.cpp
+LOCAL_LDLIBS := -llog -landroid
+LOCAL_STATIC_LIBRARIES := android_native_app_glue flatbuffers
+LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/native_app_glue)