From 6c9df1cc025dcc9ecc06d55cc5a81f214705d850 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sun, 31 Oct 2021 16:38:27 -0700 Subject: [PATCH] Add Makefiles in example/ to easily rebuild all examples --- examples/Makefile | 11 +++++++++++ examples/enums/Makefile | 11 +++++++++++ examples/hierarchical_regfiles/Makefile | 11 +++++++++++ examples/interrupt_hierarchy/Makefile | 11 +++++++++++ examples/simple_rw_reg/Makefile | 11 +++++++++++ 5 files changed, 55 insertions(+) create mode 100644 examples/Makefile create mode 100644 examples/enums/Makefile create mode 100644 examples/hierarchical_regfiles/Makefile create mode 100644 examples/interrupt_hierarchy/Makefile create mode 100644 examples/simple_rw_reg/Makefile diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..a04fea1 --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,11 @@ +ALL_DIRS = $(shell ls -d */) + +.PHONY: clean $(ALL_DIRS) + +default: $(ALL_DIRS) + +$(ALL_DIRS): + make -C $@ + +clean: + rm -rf */srdl2sv_out diff --git a/examples/enums/Makefile b/examples/enums/Makefile new file mode 100644 index 0000000..4fe6835 --- /dev/null +++ b/examples/enums/Makefile @@ -0,0 +1,11 @@ +RTL_TARGETS = $(subst .rdl,.sv,srdl2sv_out/$(shell ls *.rdl)) + +.PHONY: clean + +default: $(RTL_TARGETS) + +srdl2sv_out/%.sv: %.rdl + srdl2sv $? --out-dir $(shell dirname $@) --stdout-logging INFO + +clean: + rm -rf srdl2sv_out diff --git a/examples/hierarchical_regfiles/Makefile b/examples/hierarchical_regfiles/Makefile new file mode 100644 index 0000000..4fe6835 --- /dev/null +++ b/examples/hierarchical_regfiles/Makefile @@ -0,0 +1,11 @@ +RTL_TARGETS = $(subst .rdl,.sv,srdl2sv_out/$(shell ls *.rdl)) + +.PHONY: clean + +default: $(RTL_TARGETS) + +srdl2sv_out/%.sv: %.rdl + srdl2sv $? --out-dir $(shell dirname $@) --stdout-logging INFO + +clean: + rm -rf srdl2sv_out diff --git a/examples/interrupt_hierarchy/Makefile b/examples/interrupt_hierarchy/Makefile new file mode 100644 index 0000000..4fe6835 --- /dev/null +++ b/examples/interrupt_hierarchy/Makefile @@ -0,0 +1,11 @@ +RTL_TARGETS = $(subst .rdl,.sv,srdl2sv_out/$(shell ls *.rdl)) + +.PHONY: clean + +default: $(RTL_TARGETS) + +srdl2sv_out/%.sv: %.rdl + srdl2sv $? --out-dir $(shell dirname $@) --stdout-logging INFO + +clean: + rm -rf srdl2sv_out diff --git a/examples/simple_rw_reg/Makefile b/examples/simple_rw_reg/Makefile new file mode 100644 index 0000000..4fe6835 --- /dev/null +++ b/examples/simple_rw_reg/Makefile @@ -0,0 +1,11 @@ +RTL_TARGETS = $(subst .rdl,.sv,srdl2sv_out/$(shell ls *.rdl)) + +.PHONY: clean + +default: $(RTL_TARGETS) + +srdl2sv_out/%.sv: %.rdl + srdl2sv $? --out-dir $(shell dirname $@) --stdout-logging INFO + +clean: + rm -rf srdl2sv_out