Skip to content

Commit 472ccfb

Browse files
committed
feat: build and simulate all for better
1 parent 5cf87a6 commit 472ccfb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,31 @@ build-all:
3232
@for subdir in $(SUBDIRS); do \
3333
$(MAKE) -C $$subdir build; \
3434
done
35+
@for source in $(BETTER_SOURCES); do \
36+
dir="$$(dirname $$source)/test"; \
37+
module_name="$$(basename $$source .v)"; \
38+
echo "Processing $$source in $$dir"; \
39+
if [ ! -f "$$source" ]; then \
40+
echo "Error: Verilog source file $$source not found" >&2; \
41+
continue; \
42+
fi; \
43+
$(MAKE) -C $$dir TOPLEVEL=$$module_name VERILOG_SOURCES=$$source build; \
44+
done
3545

3646
simulate-all:
3747
@for subdir in $(SUBDIRS); do \
3848
$(MAKE) -C $$subdir simulate; \
3949
done
50+
@for source in $(BETTER_SOURCES); do \
51+
dir="$$(dirname $$source)/test"; \
52+
module_name="$$(basename $$source .v)"; \
53+
echo "Processing $$source in $$dir"; \
54+
if [ ! -f "$$source" ]; then \
55+
echo "Error: Verilog source file $$source not found" >&2; \
56+
continue; \
57+
fi; \
58+
$(MAKE) -C $$dir TOPLEVEL=$$module_name VERILOG_SOURCES=$$source simulate; \
59+
done
4060

4161
build-simulate-all:
4262
$(MAKE) build-all;

0 commit comments

Comments
 (0)