-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcomponent.mk
40 lines (28 loc) · 1.03 KB
/
component.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
COMPONENT_DEPENDS := JsonStreamingParser
COMPONENT_INCDIRS := src/include
COMPONENT_SRCDIRS := src src/Json
COMPONENT_DOXYGEN_INPUT := src/include
ifneq (,$(COMPONENT_RULE))
CONFIGDB_GEN_CMDLINE := $(PYTHON) $(COMPONENT_PATH)/tools/dbgen.py
COMPONENT_VARS := APP_CONFIGDB_DIR
APP_CONFIGDB_DIR ?= $(PROJECT_DIR)/out/ConfigDB
COMPONENT_INCDIRS += $(APP_CONFIGDB_DIR)
COMPONENT_APPCODE := $(APP_CONFIGDB_DIR)
COMPONENT_VARS += CONFIGDB_SCHEMA
CONFIGDB_SCHEMA := $(wildcard *.cfgdb)
CONFIGDB_FILES := $(patsubst %.cfgdb,$(APP_CONFIGDB_DIR)/%.h,$(CONFIGDB_SCHEMA))
CONFIGDB_FILES := $(CONFIGDB_FILES) $(CONFIGDB_FILES:.h=.cpp)
COMPONENT_PREREQUISITES := $(CONFIGDB_FILES)
$(CONFIGDB_FILES): $(CONFIGDB_SCHEMA)
$(MAKE) configdb-build
.PHONY: configdb-build
configdb-build: $(CONFIGDB_SCHEMA)
$(vecho) "CFGDB $^"
$(Q) $(CONFIGDB_GEN_CMDLINE) --outdir $(APP_CONFIGDB_DIR) $^
.PHONY: configdb-rebuild
configdb-rebuild: configdb-clean configdb-build
.PHONY: configdb-clean
configdb-clean:
$(Q) rm -f $(CONFIGDB_FILES)
clean: configdb-clean
endif