1 |
5 |
dgisselq |
################################################################################
|
2 |
|
|
##
|
3 |
|
|
## Filename: Makefile
|
4 |
|
|
##
|
5 |
|
|
## Project: OpenArty, an entirely open SoC based upon the Arty platform
|
6 |
|
|
##
|
7 |
|
|
## Purpose: A master project makefile. It tries to build all targets
|
8 |
|
|
## within the project, mostly by directing subdirectory makes.
|
9 |
|
|
##
|
10 |
|
|
##
|
11 |
|
|
## Creator: Dan Gisselquist, Ph.D.
|
12 |
|
|
## Gisselquist Technology, LLC
|
13 |
|
|
##
|
14 |
|
|
################################################################################
|
15 |
|
|
##
|
16 |
|
|
## Copyright (C) 2015, Gisselquist Technology, LLC
|
17 |
|
|
##
|
18 |
|
|
## This program is free software (firmware): you can redistribute it and/or
|
19 |
|
|
## modify it under the terms of the GNU General Public License as published
|
20 |
|
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
21 |
|
|
## your option) any later version.
|
22 |
|
|
##
|
23 |
|
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
24 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
25 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
26 |
|
|
## for more details.
|
27 |
|
|
##
|
28 |
|
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
29 |
|
|
## http:##www.gnu.org/licenses/gpl.html
|
30 |
|
|
##
|
31 |
|
|
##
|
32 |
|
|
################################################################################
|
33 |
|
|
##
|
34 |
|
|
##
|
35 |
|
|
.PHONY: all
|
36 |
|
|
all: archive datestamp
|
37 |
|
|
# all: verilated sw bench bit
|
38 |
|
|
#
|
39 |
|
|
# Could also depend upon load, if desired, but not necessary
|
40 |
|
|
BENCH := `find bench -name Makefile` `find bench -name "*.cpp"` `find bench -name "*.h"`
|
41 |
|
|
RTL := `find rtl -name "*.v"` `find rtl -name Makefile`
|
42 |
|
|
NOTES := `find . -name "*.txt"` `find . -name "*.html"`
|
43 |
|
|
SW := `find sw -name "*.cpp"` `find sw -name "*.h"` \
|
44 |
|
|
`find sw -name "*.sh"` `find sw -name "*.py"` \
|
45 |
|
|
`find sw -name "*.pl"` `find sw -name Makefile`
|
46 |
|
|
DEVSW := `find sw-board -name "*.cpp"` `find sw-board -name "*.h"` \
|
47 |
|
|
`find sw-board -name Makefile`
|
48 |
|
|
PROJ :=
|
49 |
|
|
BIN := `find xilinx -name "*.bit"`
|
50 |
|
|
CONSTRAINTS := arty.xdc
|
51 |
|
|
YYMMDD:=`date +%Y%m%d`
|
52 |
|
|
|
53 |
|
|
.PHONY: datestamp
|
54 |
|
|
datestamp:
|
55 |
|
|
@bash -c 'if [ ! -e $(YYMMDD)-build.v ]; then rm 20??????-build.v; perl mkdatev.pl > $(YYMMDD)-build.v; rm -f rtl/builddate.v; fi'
|
56 |
|
|
@bash -c 'if [ ! -e rtl/builddate.v ]; then cd rtl; cp ../$(YYMMDD)-build.v builddate.v; fi'
|
57 |
|
|
|
58 |
|
|
.PHONY: archive
|
59 |
|
|
archive:
|
60 |
|
|
tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
|
61 |
|
|
|
62 |
|
|
.PHONY: verilated
|
63 |
|
|
verilated:
|
64 |
|
|
cd rtl ; $(MAKE) --no-print-directory
|
65 |
|
|
|
66 |
|
|
.PHONY: rtl
|
67 |
|
|
rtl: verilated
|
68 |
|
|
|
69 |
|
|
# .PHONY: bench
|
70 |
|
|
# bench:
|
71 |
|
|
# cd bench ; $(MAKE) --no-print-directory
|
72 |
|
|
|
73 |
|
|
# .PHONY: sw
|
74 |
|
|
# sw:
|
75 |
|
|
# cd sw ; $(MAKE) --no-print-directory
|
76 |
|
|
|
77 |
|
|
# .PHONY: bit
|
78 |
|
|
# bit:
|
79 |
|
|
# cd xilinx ; $(MAKE) --no-print-directory xula.bit
|
80 |
|
|
|