Skip to content

Commit 50718e2

Browse files
authored
Merge pull request #74 from foss-for-synopsys-dwc-arc-processors/gen_rules
disable code generator rules by default
2 parents f8510df + ff048f1 commit 50718e2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/make/makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
TOOLCHAIN = mwdt
1111
TCF_FILE ?= ../../hw/em9d.tcf
1212

13+
# Make rules for code generation are default disabled to avoid
14+
# dependency to python when re-generation is not needed
15+
GEN_RULES ?= OFF
16+
1317
# Directories and files
1418
SRC_ROOT = ../src
1519
SRC_DIRS = ../src/helpers/src \
@@ -78,6 +82,8 @@ clean:
7882
-@$(RM) $(call fix_platform_path,$(LIBRARY_DIR)/$(OUT_NAME).a)
7983

8084

85+
ifeq ($(GEN_RULES),ON)
86+
8187
$(filter $(CONVOLUTION_SRC_FOLDER)/mli_krn_conv2d_chw_%, $(GEN_FILES)): $(CONVOLUTION_SRC_FOLDER)/mli_krn_conv2d_chw_%.cc : mli_krn_conv2d_gen.py mli_krn_conv2d_func_body.txt filetemplate.txt
8288
@echo [generate] $@
8389
cd $(GEN_DIR) && python $< $*
@@ -98,5 +104,6 @@ $(GEN_FILES_HEADERS): $(GEN_HEADER_FOLDER)/%_spec_api.h : %_gen.py header_filete
98104
@echo [generate] $@
99105
cd $(GEN_DIR) && python $< header
100106

101-
102107
gen: $(GEN_FILES) $(GEN_FILES_HEADERS)
108+
109+
endif

0 commit comments

Comments
 (0)