|
1 |
| -#################################################################### |
2 |
| -# Makefile to build CAD tools in Verilog-to-Routing (VTR) Framework |
3 |
| -#################################################################### |
4 |
| - |
5 |
| -all: ODIN_II/odin_II.exe abc_with_bb_support/abc vpr/vpr |
6 |
| - |
7 |
| -ODIN_II/odin_II.exe: libvpr/libvpr_6.a |
8 |
| - cd ODIN_II && make |
9 |
| - |
10 |
| -vpr/vpr: libvpr/libvpr_6.a |
11 |
| - cd vpr && make |
12 |
| - |
13 |
| -abc_with_bb_support/abc: |
14 |
| - cd abc_with_bb_support && make |
15 |
| - |
16 |
| -libvpr/libvpr_6.a: |
17 |
| - cd libvpr && make |
18 |
| - |
19 |
| -clean: |
20 |
| - cd ODIN_II && make clean |
21 |
| - cd abc_with_bb_support && make clean |
22 |
| - cd vpr && make clean |
23 |
| - cd libvpr && make clean |
24 |
| - |
| 1 | +##################################################################### |
| 2 | +# Makefile to build CAD tools in Verilog-to-Routing (VTR) Framework # |
| 3 | +##################################################################### |
| 4 | + |
| 5 | +SUBDIRS = ODIN_II vpr abc_with_bb_support libarchfpga pcre printhandler ace2 |
| 6 | + |
| 7 | +all: notifications subdirs |
| 8 | + |
| 9 | +subdirs: $(SUBDIRS) |
| 10 | + |
| 11 | +$(SUBDIRS): |
| 12 | + @ $(MAKE) -C $@ --no-print-directory |
| 13 | + |
| 14 | +notifications: |
| 15 | +# checks if required packages are installed, and notifies the user if not |
| 16 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep exuberant-ctags -c >>/dev/null; then echo "\n\n\n\n***************************************************************\n* Required package 'ctags' not found. *\n* Type 'make packages' to install all packages, or *\n* 'sudo apt-get install exuberant-ctags' to install manually. *\n***************************************************************\n\n\n\n"; fi; fi |
| 17 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep bison -c >>/dev/null; then echo "\n\n\n\n*****************************************************\n* Required package 'bison' not found. *\n* Type 'make packages' to install all packages, or *\n* 'sudo apt-get install bison' to install manually. *\n*****************************************************\n\n\n\n"; fi; fi |
| 18 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep flex -c >>/dev/null; then echo "\n\n\n\n*****************************************************\n* Required package 'flex' not found. *\n* Type 'make packages' to install all packages, or *\n* 'sudo apt-get install flex' to install manually. *\n*****************************************************\n\n\n\n"; fi; fi |
| 19 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep g++ -c >>/dev/null; then echo "\n\n\n\n*****************************************************\n* Required package 'g++' not found. * \n* Type 'make packages' to install all packages, or *\n* 'sudo apt-get install g++' to install manually. *\n*****************************************************\n\n\n\n"; fi; fi |
| 20 | + |
| 21 | +packages: |
| 22 | +# checks if required packages are installed, and installs them if not |
| 23 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep exuberant-ctags -c >>/dev/null; then sudo apt-get install exuberant-ctags; fi; fi |
| 24 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep bison -c >>/dev/null; then sudo apt-get install bison; fi; fi |
| 25 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep flex -c >>/dev/null; then sudo apt-get install flex; fi; fi |
| 26 | + @ if cat /etc/issue | grep Ubuntu -c >>/dev/null; then if ! dpkg -l | grep g++ -c >>/dev/null; then sudo apt-get install g++; fi; fi |
| 27 | + @ cd vpr && make packages |
| 28 | + |
| 29 | +ODIN_II: libarchfpga |
| 30 | + |
| 31 | +vpr: libarchfpga |
| 32 | + |
| 33 | +libarchfpga: printhandler |
| 34 | + |
| 35 | +printhandler: pcre |
| 36 | + |
| 37 | +ace2: abc_with_bb_support |
| 38 | +clean: |
| 39 | + @ cd ODIN_II && make clean |
| 40 | + @ cd abc_with_bb_support && make clean |
| 41 | + @ cd ace2 && make clean |
| 42 | + @ cd vpr && make clean |
| 43 | + @ cd libarchfpga && make clean |
| 44 | + @ cd printhandler && make clean |
| 45 | + @ cd pcre && make clean |
| 46 | + |
| 47 | +clean_vpr: |
| 48 | + @ cd vpr && make clean |
| 49 | + |
| 50 | +.PHONY: packages subdirs $(SUBDIRS) |
0 commit comments