diff options
author | Andre Eisenbach <andre@broadcom.com> | 2012-04-11 13:36:27 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:16 -0700 |
commit | 87564f3972ffbb4106682f7b6e88110fbe76004f (patch) | |
tree | a3d51e612f4f352502567c704cfd65729ecd1828 /vendor/libvendor | |
parent | 15ccfa97c678c45b05cc226d51287fb59a4f8b29 (diff) | |
download | external_bluetooth_bluedroid-87564f3972ffbb4106682f7b6e88110fbe76004f.zip external_bluetooth_bluedroid-87564f3972ffbb4106682f7b6e88110fbe76004f.tar.gz external_bluetooth_bluedroid-87564f3972ffbb4106682f7b6e88110fbe76004f.tar.bz2 |
Move build configuration files to output directory
Build configuration files (buildcfg.h and vnd_buildcfg.h) are now
automatically generated on demand in the intermediate output
directories for each platform.
In addition, buth buildcfg.h and vnd_buildcfg.h files are
now generated using a common script.
Change-Id: I3580701f32f1993750588d15bd529c6ee337031b
Diffstat (limited to 'vendor/libvendor')
-rw-r--r-- | vendor/libvendor/Android.mk | 16 | ||||
-rw-r--r-- | vendor/libvendor/vnd_buildcfg.mk | 12 |
2 files changed, 15 insertions, 13 deletions
diff --git a/vendor/libvendor/Android.mk b/vendor/libvendor/Android.mk index 808990d..7d68356 100644 --- a/vendor/libvendor/Android.mk +++ b/vendor/libvendor/Android.mk @@ -2,19 +2,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -vnd_targetfile = $(LOCAL_PATH)/include/$(addprefix vnd_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) -vnd_cfgfile = $(LOCAL_PATH)/include/vnd_buildcfg.h - -vnd_build_cfg = $(shell if [ -f $(vnd_cfgfile) ] && [ `stat -c %Y $(vnd_targetfile)` -lt `stat -c %Y $(vnd_cfgfile)` ]; then echo 0; else echo 1; fi) - -ifeq ($(vnd_build_cfg),1) -$(info "Creating $(vnd_cfgfile) from $(vnd_targetfile)") -$(shell echo "#ifndef VND_BUILDCFG_H" > $(vnd_cfgfile)) -$(shell echo "#define VND_BUILDCFG_H" >> $(vnd_cfgfile)) -$(shell sed -e '/^#/d' -e '/^$$/d' -e '/# Makefile only$$/d' -e 's/^/#define /' -e 's/=/ /' $(vnd_targetfile) >> $(vnd_cfgfile)) -$(shell echo "#endif" >> $(vnd_cfgfile)) -endif - LOCAL_SRC_FILES := \ src/bt_vendor_brcm.c \ src/hci_h4.c \ @@ -33,5 +20,8 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE := libbt-vendor LOCAL_MODULE_TAGS := eng +LOCAL_MODULE_CLASS := SHARED_LIBRARIES + +include $(LOCAL_PATH)/vnd_buildcfg.mk include $(BUILD_SHARED_LIBRARY) diff --git a/vendor/libvendor/vnd_buildcfg.mk b/vendor/libvendor/vnd_buildcfg.mk new file mode 100644 index 0000000..ea4b0e5 --- /dev/null +++ b/vendor/libvendor/vnd_buildcfg.mk @@ -0,0 +1,12 @@ +intermediates := $(local-intermediates-dir) + +SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) +GEN := $(intermediates)/vnd_buildcfg.h +TOOL := $(call my-dir)/../../tools/gen-buildcfg.sh + +$(GEN): PRIVATE_PATH := $(call my-dir) +$(GEN): PRIVATE_CUSTOM_TOOL = $(TOOL) $< $@ +$(GEN): $(SRC) $(TOOL) + $(transform-generated-source) + +LOCAL_GENERATED_SOURCES += $(GEN) |