diff options
| author | uvok | 2025-12-25 11:06:45 +0100 |
|---|---|---|
| committer | uvok | 2025-12-25 11:06:45 +0100 |
| commit | 4ad7c9ae43a73c233c35f6382736e5bb9258f821 (patch) | |
| tree | f372f98b1ef9770d6fe09c4e5f73526dabaf8f4b /Makefile | |
| parent | 65ba8e4c07b25f218b905819b989b5d23d92f723 (diff) | |
makefile: Finally fix makefiles?
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -38,19 +38,19 @@ clean: synth: $(PROGRAM).json -deps: $(DEPS) +deps: $(PROGRAM).dep ## Patterns # synthesize -# re-synth if deps change (and create in the first place) -%.json: %.v %.dep +%.json: %.v + gawk 'match($$0, /`include "(.*)"/, ary) {print "$*.json:", ary[1]}' $< > $*.dep yosys -p "read_verilog $<; synth_gowin -top $* -json $@" $(YOSYS_OPTS) # because yosys -E is buggy, or behaves differently than expected, # use gawk to force-create deps. %.dep: %.v - gawk 'match($$0, /`include "(.*)"/, ary) {print FILENAME, ":", ary[1]}' $< > $@ + gawk 'match($$0, /`include "(.*)"/, ary) {print "$*.json:", ary[1]}' $< > $@ # place and route? %.pnr.json: %.json $(CST) @@ -74,3 +74,4 @@ deps: $(DEPS) ## inter-file dependencies -include $(DEPS) +-include $($(wildcard *.fs:.fs=.dep) |
