blob: 810b2adf77ff8bcc3989538920ef324d1af45907 [file] [log] [blame]
Colin Cross8469d802014-02-13 17:17:01 -08001generated_sources := $(local-generated-sources-dir)
Wink Savilleee836ae2012-09-25 05:49:13 -07002
Laurent FERT07249f02014-09-17 17:51:41 +02003# Allow external configuration file
4ifneq (,$(BOARD_CUSTOM_BT_CONFIG))
5SRC := $(BOARD_CUSTOM_BT_CONFIG)
6else
Wink Savilleee836ae2012-09-25 05:49:13 -07007SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix .txt,$(basename $(TARGET_DEVICE))))
Laurent FERT07249f02014-09-17 17:51:41 +02008endif
Wink Savilleee836ae2012-09-25 05:49:13 -07009ifeq (,$(wildcard $(SRC)))
10# configuration file does not exist. Use default one
11SRC := $(call my-dir)/include/vnd_generic.txt
12endif
Colin Cross8469d802014-02-13 17:17:01 -080013GEN := $(generated_sources)/vnd_buildcfg.h
Sridhar Vashist5a4ce452016-09-13 16:35:43 -050014TOOL := $(call my-dir)/gen-buildcfg.sh
Wink Savilleee836ae2012-09-25 05:49:13 -070015
16$(GEN): PRIVATE_PATH := $(call my-dir)
17$(GEN): PRIVATE_CUSTOM_TOOL = $(TOOL) $< $@
18$(GEN): $(SRC) $(TOOL)
19 $(transform-generated-source)
20
21LOCAL_GENERATED_SOURCES += $(GEN)