CORE: Fix some Quartus II warnings
[yari.git] / shared / Makefile
blobb53a4a5732c2f9e48424df56a733d404dc1f0bdc
1 # XXX Needs a proper multi-level build system
3 include config.mk
5 # export these variables for the BUILD-xxx scripts
6 export YARI_XTOOLS_TARGET
7 export PREFIX
8 export YARI_XTOOLS_SUDO
9 export YARI_XTOOLS_BUILDDIR
10 export PATH
11 export MAKE_OPTION
14 # No suffix or path!!
15 TESTPROG=testall
16 #TESTPROG=testicache
17 #TESTPROG=testeret
19 VERB=--verb
21 usage:
22 @echo Usage:
23 @echo ' make install-tools -- Install compiler, libraries, and simulator'
24 @echo ' make isasim -- run a software simulation of the test program'
25 @echo ' make rtlsim -- run a simulated the RTL on the test program'
26 @echo Make variables:
27 @echo "TESTPROG -- the program to run. Default is $(TESTPROG)"
28 @echo "VERB -- Options for the simulator. Default is $(VERB)."
30 install-gdb:
31 cd tools; ./BUILD-gdb.sh
33 install-sdl:
34 $(MAKE) -C SDL-1.2 install
36 install-binutils: $(PREFIX)/bin/$(YARI_XTOOLS_TARGET)-as
37 cd tools; ./BUILD-binutils.sh
39 install-gcc: $(PREFIX)/bin/$(YARI_XTOOLS_TARGET)-gcc
40 cd tools; ./BUILD-gcc.sh
42 install-newlib: $(PREFIX)/$(YARI_XTOOLS_TARGET)/lib/yari.ld
43 cd tools; ./BUILD-newlib.sh
45 install-yarisim:
46 $(MAKE) -C yarisim install
48 install-tools: install-yarisim install-binutils install-gcc install-newlib install-gdb install-sdl
50 isasim:
51 $(MAKE) -C testcases $(TESTPROG)-prom.mips
52 $(MAKE) -C yarisim FLAGS=$(VERB) TESTPROG=../testcases/$(TESTPROG)-prom.mips run
54 rtlsim:
55 $(MAKE) -C testcases PROG=$(TESTPROG) promote
56 $(MAKE) -C rtl/target/Icarus simulate
58 cosim:
59 $(MAKE) -C testcases PROG=$(TESTPROG) $(TESTPROG)-prom.mips promote
60 $(MAKE) -C rtl/target/Icarus simulate | \
61 $(MAKE) -C yarisim FLAGS="--cosim $(VERB)" TESTPROG=../testcases/$(TESTPROG)-prom.mips run
64 clean:
65 -$(MAKE) -C yarisim clean
66 -$(MAKE) -C testcases clean
67 -$(MAKE) -C gdbstub clean
68 -$(MAKE) -C firmware clean
69 -$(MAKE) -C rtl/target/Icarus clean
71 realclean:
72 -find . -name \*~|xargs rm
73 -$(MAKE) -C yarisim realclean
74 -$(MAKE) -C testcases realclean
75 -$(MAKE) -C gdbstub realclean
76 -$(MAKE) -C firmware realclean
77 -$(MAKE) -C rtl/target/Icarus realclean
79 tabcheck:
80 @grep --perl '\t' `find . -name \*.v` || echo All ok