summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorJon Simantov <jsimantov@google.com>2015-06-30 10:15:58 -0700
committerWouter van Oortmerssen <wvo@google.com>2015-07-01 11:46:19 -0700
commit185b9f9792b9a101effc5b2827eff9f757cf4fd8 (patch)
treeb0c2648eb8f56cb1af2807e5927c6447371d6b1e /android
parent21765bea2e1b93393985c173a1b9e26693e09433 (diff)
downloadflatbuffers-185b9f9792b9a101effc5b2827eff9f757cf4fd8.tar.gz
flatbuffers-185b9f9792b9a101effc5b2827eff9f757cf4fd8.tar.bz2
flatbuffers-185b9f9792b9a101effc5b2827eff9f757cf4fd8.zip
Allow customization of flatc cmdline arguments on Android.
On Android builds, set FLATBUFFERS_FLATC_ARGS to change the arguments passed to the flatc cmdline. Do this in your Android makefile where you include the flatbuffers include.mk (before or after). For example FLATBUFFERS_FLATC_ARGS=--gen-mutable The default value is --gen-includes although since that is deprecated we could just make the default value blank. Change-Id: I79fb35f50c3e21bbef18ad40ad3559cb026ffe8e
Diffstat (limited to 'android')
-rw-r--r--android/jni/include.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/android/jni/include.mk b/android/jni/include.mk
index 5c16db98..45edf9d1 100644
--- a/android/jni/include.mk
+++ b/android/jni/include.mk
@@ -66,6 +66,8 @@ FLATBUFFERS_FLATC_PATH?=$(FLATBUFFERS_CMAKELISTS_DIR)
FLATBUFFERS_FLATC := $(FLATBUFFERS_FLATC_PATH)/Debug/flatc
endif
+FLATBUFFERS_FLATC_ARGS?=--gen-includes
+
# Search for cmake.
CMAKE_ROOT := $(realpath $(LOCAL_PATH)/../../../../../../prebuilts/cmake)
ifeq (,$(CMAKE))
@@ -149,7 +151,7 @@ $(eval \
$(call flatbuffers_fbs_to_h,$(2),$(3),$(1)): $(1) $(flatc_target)
$(call host-echo-build-step,generic,Generate) \
$(subst $(LOCAL_PATH)/,,$(call flatbuffers_fbs_to_h,$(2),$(3),$(1)))
- $(hide) $$(FLATBUFFERS_FLATC) --gen-includes \
+ $(hide) $$(FLATBUFFERS_FLATC) $(FLATBUFFERS_FLATC_ARGS) \
$(foreach include,$(4),-I $(include)) -o $$(dir $$@) -c $$<)
endef