Makefile: Make it easier to build files in other directories
Generally, most things (except .fst files) are independent of directory. Fix up the few exceptions.
This commit is contained in:
parent
dfd3d1f3b6
commit
8c0836406e
5
Makefile
5
Makefile
|
@ -18,10 +18,11 @@ FORCE:
|
|||
log:
|
||||
mkdir $@
|
||||
|
||||
INCDIRS := rtl
|
||||
LIBDIRS := rtl lib/verilog-lfsr/rtl
|
||||
%.synth.json: %.v | log
|
||||
$(SYNTH) -q -E $@.d -b json -o $@ -l log/$(*F).synth \
|
||||
-p "read_verilog -sv $<" \
|
||||
-p "read_verilog $(addprefix -I ,$(INCDIRS)) -sv $<" \
|
||||
-p "hierarchy $(addprefix -libdir ,$(LIBDIRS) $(<D))" \
|
||||
-p "synth_ice40 -top $(*F)"
|
||||
|
||||
|
@ -86,7 +87,7 @@ PNR_RETRIES := 10
|
|||
done; \
|
||||
exit 1
|
||||
|
||||
%.bin: rtl/%.asc
|
||||
%.bin: %.asc
|
||||
$(ICEPACK) $< $@
|
||||
|
||||
-include $(wildcard rtl/*.d)
|
||||
|
|
Loading…
Reference in New Issue