1 |
2 |
dgisselq |
################################################################################
|
2 |
|
|
##
|
3 |
|
|
## Filename: Makefile
|
4 |
|
|
##
|
5 |
|
|
## Project: SD-Card controller, using a shared SPI interface
|
6 |
|
|
##
|
7 |
|
|
## Purpose: Coordinate building the specification for this core, the
|
8 |
|
|
## Verilator Verilog check, and any bench software.
|
9 |
|
|
##
|
10 |
|
|
## Creator: Dan Gisselquist, Ph.D.
|
11 |
|
|
## Gisselquist Technology, LLC
|
12 |
|
|
##
|
13 |
|
|
################################################################################
|
14 |
|
|
##
|
15 |
|
|
## Copyright (C) 2016, Gisselquist Technology, LLC
|
16 |
|
|
##
|
17 |
|
|
## This program is free software (firmware): you can redistribute it and/or
|
18 |
|
|
## modify it under the terms of the GNU General Public License as published
|
19 |
|
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
20 |
|
|
## your option) any later version.
|
21 |
|
|
##
|
22 |
|
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
23 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
24 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
25 |
|
|
## for more details.
|
26 |
|
|
##
|
27 |
|
|
## You should have received a copy of the GNU General Public License along
|
28 |
|
|
## with this program. (It's in the $(ROOT)/doc directory, run make with no
|
29 |
|
|
## target there if the PDF file isn't present.) If not, see
|
30 |
|
|
## for a copy.
|
31 |
|
|
##
|
32 |
|
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
33 |
|
|
## http://www.gnu.org/licenses/gpl.html
|
34 |
|
|
##
|
35 |
|
|
##
|
36 |
|
|
################################################################################
|
37 |
|
|
##
|
38 |
|
|
##
|
39 |
|
|
.PHONY: all
|
40 |
|
|
all: verilated bench
|
41 |
|
|
BENCH := `find bench -name Makefile` `find bench -name "*.cpp"` `find bench -name "*.h"`
|
42 |
|
|
RTL := `find rtl -name "*.v"` `find rtl -name Makefile`
|
43 |
|
|
NOTES := # `find . -name "*.txt"` `find . -name "*.html"`
|
44 |
|
|
SW=
|
45 |
|
|
#SW := `find sw -name "*.cpp"` `find sw -name "*.h"` \
|
46 |
|
|
# `find sw -name "*.sh"` `find sw -name "*.py"` \
|
47 |
|
|
# `find sw -name "*.pl"` `find sw -name Makefile`
|
48 |
|
|
DEVSW=
|
49 |
|
|
YYMMDD:=`date +%Y%m%d`
|
50 |
|
|
|
51 |
|
|
.PHONY: archive
|
52 |
|
|
archive:
|
53 |
|
|
tar --transform s,^,$(YYMMDD)-sdspi/, -chjf $(YYMMDD)-sdspi.tjz $(BENCH) $(SW) $(RTL) $(NOTES)
|
54 |
|
|
|
55 |
|
|
.PHONY: verilated
|
56 |
|
|
verilated:
|
57 |
|
|
cd rtl ; $(MAKE) --no-print-directory
|
58 |
|
|
|
59 |
|
|
# The documents target does not get, nor should it be, made automatically. This
|
60 |
|
|
# is because the project is intended to be shipped with the documents
|
61 |
|
|
# automatically built, and I don't necessarily expect all those who download
|
62 |
|
|
# this "core" to have LaTeX distribution necessary to rebuild the specification
|
63 |
|
|
# and GPL LaTeX documents into their PDF results.
|
64 |
|
|
.PHONY: doc
|
65 |
|
|
doc:
|
66 |
|
|
cd doc ; $(MAKE) --no-print-directory
|
67 |
|
|
|
68 |
|
|
.PHONY: bench
|
69 |
|
|
bench:
|
70 |
|
|
cd bench/cpp ; $(MAKE) --no-print-directory
|
71 |
|
|
|
72 |
|
|
#.PHONY: sw
|
73 |
|
|
# sw:
|
74 |
|
|
# cd sw ; $(MAKE) --no-print-directory
|
75 |
|
|
|