summaryrefslogtreecommitdiffstats
path: root/tools/sim/Makefile
blob: b6f2786b541c1a55461724934562d3d16734bd37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
library      = tools
top          = image_pkg

#rtl_files    = ../rtl/*.vhd
rtl_tb_files = ../rtl_tb/fio_pkg.vhd ../rtl_tb/*.vhd
vhdlfiles    = $(rtl_tb_files) $(rtl_files)


all: lib compile

remake: lib Makefile.$(library)

Makefile.$(library): $(vhdlfiles) $(library)
	vcom -quiet -2008 -work $(library) $(vhdlfiles)
	vmake $(library) > Makefile.$(library)
	# patch winpath -> cygpath
	sed -e 's/\(C:.*\)/$$(shell cygpath --unix "\1" | sed "s\/ \/\\\\\\\\ \/g" )/g' -i Makefile.$(library)


compile:
	make -f Makefile.$(library)

simulate:
	vsim -gui $(library).$(top) -do run.do


clean:
	rm -rf tools
	rm -f Makefile.$(library)


# default patterns

lib:    $(library)

$(library):
	vlib $(library)

OpenPOWER on IntegriCloud