aboutsummaryrefslogtreecommitdiffstats
path: root/android/build/definitions.make
diff options
context:
space:
mode:
Diffstat (limited to 'android/build/definitions.make')
-rw-r--r--android/build/definitions.make20
1 files changed, 20 insertions, 0 deletions
diff --git a/android/build/definitions.make b/android/build/definitions.make
index 54d1a8a..e190cdd 100644
--- a/android/build/definitions.make
+++ b/android/build/definitions.make
@@ -68,6 +68,26 @@ $$(OBJ): $$(SRC_PATH)/$$(SRC)
$(hide) $$(BUILD_SYSTEM)/mkdeps.sh $$(PRIVATE_OBJ) $$(PRIVATE_OBJ).d.tmp $$(PRIVATE_OBJ).d
endef
+# Compile a C++ source file
+#
+define compile-cxx-source
+SRC:=$(1)
+OBJ:=$$(LOCAL_OBJS_DIR)/$$(SRC:%$(LOCAL_CPP_EXTENSION)=%.o)
+LOCAL_OBJECTS += $$(OBJ)
+DEPENDENCY_DIRS += $$(dir $$(OBJ))
+$$(OBJ): PRIVATE_CFLAGS := $$(CFLAGS) $$(LOCAL_CFLAGS) -I$$(LOCAL_PATH) -I$$(OBJS_DIR)
+$$(OBJ): PRIVATE_CXX := $$(LOCAL_CC)
+$$(OBJ): PRIVATE_OBJ := $$(OBJ)
+$$(OBJ): PRIVATE_MODULE := $$(LOCAL_MODULE)
+$$(OBJ): PRIVATE_SRC := $$(SRC_PATH)/$$(SRC)
+$$(OBJ): PRIVATE_SRC0 := $$(SRC)
+$$(OBJ): $$(SRC_PATH)/$$(SRC)
+ @mkdir -p $$(dir $$(PRIVATE_OBJ))
+ @echo "Compile: $$(PRIVATE_MODULE) <= $$(PRIVATE_SRC0)"
+ $(hide) $$(PRIVATE_CXX) $$(PRIVATE_CFLAGS) -c -o $$(PRIVATE_OBJ) -MMD -MP -MF $$(PRIVATE_OBJ).d.tmp $$(PRIVATE_SRC)
+ $(hide) $$(BUILD_SYSTEM)/mkdeps.sh $$(PRIVATE_OBJ) $$(PRIVATE_OBJ).d.tmp $$(PRIVATE_OBJ).d
+endef
+
# Compile an Objective-C source file
#
define compile-objc-source