blob: 23fdf620e29ce17d2caa45a05dfdf2e8632a0779 [file] [log] [blame]
Ahmed Ghazy72e52c62020-10-26 16:44:41 +02001BLOCKS = chip_io user_project_wrapper digital_pll mgmt_core
2CONFIG = $(foreach block,$(BLOCKS), ./$(block)/config.tcl)
3CLEAN = $(foreach block,$(BLOCKS), clean-$(block))
4
5all: $(BLOCKS)
6
7$(CONFIG) :
8 @echo "Missing $@. Please create a configuration for that design"
9 @exit 1
10
11$(BLOCKS) : % : ./%/config.tcl FORCE
12ifeq ($(OPENLANE_ROOT),)
13 @echo "Please export OPENLANE_ROOT"
14 @exit 1
15endif
16 @echo "###############################################"
17 @sleep 1
18 if [[ -f ./$*/interactive.tcl ]]; then\
19 ${OPENLANE_ROOT}/flow.tcl -it -file ./$*/interactive.tcl;\
20 else\
21 ${OPENLANE_ROOT}/flow.tcl -design ./$* -save_path .. -save -tag $* -overwrite;\
22 fi
23
24FORCE:
25
26clean:
27 @echo "Use clean_all to clean everything :)"
28
29clean_all: $(CLEAN)
30
31$(CLEAN): clean-% :
32 rm -rf runs/$*
33 rm -rf ../gds/$**
34 rm -rf ../mag/$**
35 rm -rf ../lef/$**