diff options
Diffstat (limited to 'android/build/definitions.make')
-rw-r--r-- | android/build/definitions.make | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/android/build/definitions.make b/android/build/definitions.make index e190cdd..ab9a34d 100644 --- a/android/build/definitions.make +++ b/android/build/definitions.make @@ -22,7 +22,7 @@ hide := @ else define pretty endef -hide := +hide := endif define my-dir @@ -31,7 +31,7 @@ endef # return the directory containing the intermediate files for a given # kind of executable -# $1 = type (EXECUTABLES or STATIC_LIBRARIES) +# $1 = type (EXECUTABLES or STATIC_LIBRARIES) # $2 = module name # $3 = ignored # @@ -41,7 +41,7 @@ endef # Generate the full path of a given static library define library-path -$(OBJS_DIR)/$(1).a +$(OBJS_DIR)/libs/$(1).a endef define executable-path @@ -92,7 +92,7 @@ endef # define compile-objc-source SRC:=$(1) -OBJ:=$$(LOCAL_OBJS_DIR)/$$(SRC:%.m=%.o) +OBJ:=$$(LOCAL_OBJS_DIR)/$$(notdir $$(SRC:%.m=%.o)) LOCAL_OBJECTS += $$(OBJ) DEPENDENCY_DIRS += $$(dir $$(OBJ)) $$(OBJ): PRIVATE_CFLAGS := $$(CFLAGS) $$(LOCAL_CFLAGS) -I$$(LOCAL_PATH) -I$$(OBJS_DIR) @@ -108,6 +108,26 @@ $$(OBJ): $$(SRC_PATH)/$$(SRC) $(hide) $$(BUILD_SYSTEM)/mkdeps.sh $$(PRIVATE_OBJ) $$(PRIVATE_OBJ).d.tmp $$(PRIVATE_OBJ).d endef +# Compile a generated C source files# +# +define compile-generated-c-source +SRC:=$(1) +OBJ:=$$(LOCAL_OBJS_DIR)/$$(notdir $$(SRC:%.c=%.o)) +LOCAL_OBJECTS += $$(OBJ) +DEPENDENCY_DIRS += $$(dir $$(OBJ)) +$$(OBJ): PRIVATE_CFLAGS := $$(CFLAGS) $$(LOCAL_CFLAGS) -I$$(LOCAL_PATH) -I$$(OBJS_DIR) +$$(OBJ): PRIVATE_CC := $$(LOCAL_CC) +$$(OBJ): PRIVATE_OBJ := $$(OBJ) +$$(OBJ): PRIVATE_MODULE := $$(LOCAL_MODULE) +$$(OBJ): PRIVATE_SRC := $$(SRC) +$$(OBJ): PRIVATE_SRC0 := $$(SRC) +$$(OBJ): $$(SRC) + @mkdir -p $$(dir $$(PRIVATE_OBJ)) + @echo "Compile: $$(PRIVATE_MODULE) <= $$(PRIVATE_SRC0)" + $(hide) $$(PRIVATE_CC) $$(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 + # Install a file # define install-target |