Skip to content

Commit

Permalink
softusb: simplify test makefile
Browse files Browse the repository at this point in the history
Use pattern rules for common targets. This way future test benches won't
have to touch the Makefile anymore.

Signed-off-by: Michael Walle <michael@walle.cc>
  • Loading branch information
mwalle authored and Sebastien Bourdeauducq committed Apr 19, 2012
1 parent a424d6f commit bad625a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cores/softusb/test/Makefile
Original file line number Original file line Diff line number Diff line change
@@ -1,16 +1,16 @@
MMDIR?=../../.. MMDIR?=../../..
SOURCES=tb_softusb.v $(wildcard ../rtl/*.v) SOURCES=$(wildcard ../rtl/*.v)


all: sim all: sim


sim: trx.rom sim: trx.rom
cver $(SOURCES) cver tb_softusb.v $(SOURCES)


isim: runsim trx.rom isim: runsim trx.rom
./runsim ./runsim


runsim: $(SOURCES) runsim: tb_softusb.v $(SOURCES)
iverilog -o runsim $(SOURCES) iverilog -o runsim tb_softusb.v $(SOURCES)


trx.elf: trx.S trx.elf: trx.S
avr-gcc -o trx.elf -mmcu=avr2 -Os trx.S -nostdlib avr-gcc -o trx.elf -mmcu=avr2 -Os trx.S -nostdlib
Expand All @@ -30,13 +30,13 @@ fibc.elf: fibc.c fibc_crt.S
sim-navre: fib.rom fibc.rom sim-navre: fib.rom fibc.rom
cver ../rtl/softusb_navre.v tb_navre.v cver ../rtl/softusb_navre.v tb_navre.v


isim-sie: runsim-sie isim-%: runsim-%
./runsim-sie ./$<


runsim-sie: ../rtl/softusb_tx.v ../rtl/softusb_rx.v tb_sie.v runsim-%: tb_%.v $(SOURCES)
iverilog -o runsim-sie ../rtl/softusb_tx.v ../rtl/softusb_rx.v tb_sie.v iverilog -o $@ $(SOURCES) $<


clean: clean:
rm -f verilog.log trx.elf trx.bin trx.rom fib.elf fib.bin fib.rom fibc.elf fibc.bin fibc.rom runsim softusb.vcd softusb_sie.vcd runsim-sie rm -f verilog.log trx.elf trx.bin trx.rom fib.elf fib.bin fib.rom fibc.elf fibc.bin fibc.rom runsim runsim-* *.vcd


.PHONY: clean sim sim-navre .PHONY: clean sim sim-navre

0 comments on commit bad625a

Please sign in to comment.