Colin Cross | 8469d80 | 2014-02-13 17:17:01 -0800 | [diff] [blame] | 1 | generated_sources := $(local-generated-sources-dir) |
Wink Saville | ee836ae | 2012-09-25 05:49:13 -0700 | [diff] [blame] | 2 | |
Laurent FERT | 07249f0 | 2014-09-17 17:51:41 +0200 | [diff] [blame] | 3 | # Allow external configuration file |
| 4 | ifneq (,$(BOARD_CUSTOM_BT_CONFIG)) |
| 5 | SRC := $(BOARD_CUSTOM_BT_CONFIG) |
| 6 | else |
Wink Saville | ee836ae | 2012-09-25 05:49:13 -0700 | [diff] [blame] | 7 | SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) |
Laurent FERT | 07249f0 | 2014-09-17 17:51:41 +0200 | [diff] [blame] | 8 | endif |
Wink Saville | ee836ae | 2012-09-25 05:49:13 -0700 | [diff] [blame] | 9 | ifeq (,$(wildcard $(SRC))) |
| 10 | # configuration file does not exist. Use default one |
| 11 | SRC := $(call my-dir)/include/vnd_generic.txt |
| 12 | endif |
Colin Cross | 8469d80 | 2014-02-13 17:17:01 -0800 | [diff] [blame] | 13 | GEN := $(generated_sources)/vnd_buildcfg.h |
Sridhar Vashist | 5a4ce45 | 2016-09-13 16:35:43 -0500 | [diff] [blame] | 14 | TOOL := $(call my-dir)/gen-buildcfg.sh |
Wink Saville | ee836ae | 2012-09-25 05:49:13 -0700 | [diff] [blame] | 15 | |
| 16 | $(GEN): PRIVATE_PATH := $(call my-dir) |
| 17 | $(GEN): PRIVATE_CUSTOM_TOOL = $(TOOL) $< $@ |
| 18 | $(GEN): $(SRC) $(TOOL) |
| 19 | $(transform-generated-source) |
| 20 | |
| 21 | LOCAL_GENERATED_SOURCES += $(GEN) |