diff options
author | David 'Digit' Turner <digit@android.com> | 2011-02-09 16:01:53 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-02-09 16:07:39 +0100 |
commit | ba313e080f0be3061b458075e8e66fc5ff700e3c (patch) | |
tree | d48e79485c37ce4d526f0f810d1f1d614b50be24 /android/build/definitions.make | |
parent | c6375cb970388a3d4f691350fecdfd528eb334df (diff) | |
download | external_qemu-ba313e080f0be3061b458075e8e66fc5ff700e3c.zip external_qemu-ba313e080f0be3061b458075e8e66fc5ff700e3c.tar.gz external_qemu-ba313e080f0be3061b458075e8e66fc5ff700e3c.tar.bz2 |
android-configure.sh: Fix --cc=<compiler> option.
+ Fix LOCAL_GENERATED_SOURCES handling
+ Fix missing library dependencies for executables
+ Move generated library files to objs/libs/ (instead of objs/)
Change-Id: If3ebaa7ae856efa9bd3ff9e2c199389989db7f71
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 |