1 |
7 |
dgisselq |
############################################################################/
|
2 |
|
|
##
|
3 |
|
|
## Filename: Makefile
|
4 |
|
|
##
|
5 |
|
|
## Project: A Wishbone Controlled Real--time Clock Core
|
6 |
|
|
##
|
7 |
|
|
## Purpose: This is the Makefile to build the verilator test bench code
|
8 |
|
|
## from the RTL code. The TB code in the bench/cpp directory
|
9 |
|
|
## will then reference the library results from this file.
|
10 |
|
|
## To build the verilator libraries, just type 'make' on a line
|
11 |
|
|
## by itself.
|
12 |
|
|
##
|
13 |
|
|
## Creator: Dan Gisselquist, Ph.D.
|
14 |
|
|
## Gisselquist Tecnology, LLC
|
15 |
|
|
##
|
16 |
|
|
##########################################################################/
|
17 |
|
|
##
|
18 |
|
|
## Copyright (C) 2015, Gisselquist Technology, LLC
|
19 |
|
|
##
|
20 |
|
|
## This program is free software (firmware): you can redistribute it and/or
|
21 |
|
|
## modify it under the terms of the GNU General Public License as published
|
22 |
|
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
23 |
|
|
## your option) any later version.
|
24 |
|
|
##
|
25 |
|
|
## This program is distributed in the hope that it will be useful, but WITHOUT
|
26 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
27 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
28 |
|
|
## for more details.
|
29 |
|
|
##
|
30 |
|
|
## You should have received a copy of the GNU General Public License along
|
31 |
|
|
## with this program. (It's in the $(ROOT)/doc directory, run make with no
|
32 |
|
|
## target there if the PDF file isn't present.) If not, see
|
33 |
|
|
## for a copy.
|
34 |
|
|
##
|
35 |
|
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
36 |
|
|
## http:##www.gnu.org/licenses/gpl.html
|
37 |
|
|
##
|
38 |
|
|
##
|
39 |
|
|
##########################################################################/
|
40 |
|
|
##
|
41 |
|
|
##
|
42 |
|
|
# This is really simple ...
|
43 |
|
|
all: rtcdate rtcclock rtclight rtcgps
|
44 |
|
|
OBJDR := ./obj_dir
|
45 |
|
|
BENCHD := ../bench/cpp
|
46 |
|
|
|
47 |
|
|
.PHONY: rtcclock
|
48 |
|
|
rtcclock: $(OBJDR)/Vrtcclock__ALL.a
|
49 |
|
|
$(OBJDR)/Vrtcclock.cpp $(OBJDR)/Vrtcclock.h: rtcclock.v
|
50 |
|
|
verilator -cc rtcclock.v
|
51 |
|
|
$(OBJDR)/Vrtcclock__ALL.a: $(OBJDR)/Vrtcclock.h
|
52 |
|
|
$(OBJDR)/Vrtcclock__ALL.a: $(OBJDR)/Vrtcclock.cpp
|
53 |
|
|
cd $(OBJDR)/; make -f Vrtcclock.mk
|
54 |
|
|
|
55 |
|
|
.PHONY: rtcdate
|
56 |
|
|
rtcdate: $(OBJDR)/Vrtcdate__ALL.a
|
57 |
|
|
$(OBJDR)/Vrtcdate.cpp $(OBJDR)/Vrtcdate.h: rtcdate.v
|
58 |
|
|
verilator -cc rtcdate.v
|
59 |
|
|
$(OBJDR)/Vrtcdate__ALL.a: $(OBJDR)/Vrtcdate.h
|
60 |
|
|
$(OBJDR)/Vrtcdate__ALL.a: $(OBJDR)/Vrtcdate.cpp
|
61 |
|
|
cd $(OBJDR)/; make -f Vrtcdate.mk
|
62 |
|
|
|
63 |
|
|
.PHONY: rtclight
|
64 |
|
|
rtclight: $(OBJDR)/Vrtclight__ALL.a
|
65 |
|
|
$(OBJDR)/Vrtclight.cpp $(OBJDR)/Vrtclight.h: rtclight.v
|
66 |
|
|
verilator -cc rtclight.v
|
67 |
|
|
$(OBJDR)/Vrtclight__ALL.a: $(OBJDR)/Vrtclight.h
|
68 |
|
|
$(OBJDR)/Vrtclight__ALL.a: $(OBJDR)/Vrtclight.cpp
|
69 |
|
|
cd $(OBJDR)/; make -f Vrtclight.mk
|
70 |
|
|
|
71 |
|
|
.PHONY: rtcgps
|
72 |
|
|
rtcgps: $(OBJDR)/Vrtcgps__ALL.a
|
73 |
|
|
$(OBJDR)/Vrtcgps.cpp $(OBJDR)/Vrtcgps.h: rtcgps.v
|
74 |
|
|
verilator -cc rtcgps.v
|
75 |
|
|
$(OBJDR)/Vrtcgps__ALL.a: $(OBJDR)/Vrtcgps.h
|
76 |
|
|
$(OBJDR)/Vrtcgps__ALL.a: $(OBJDR)/Vrtcgps.cpp
|
77 |
|
|
cd $(OBJDR)/; make -f Vrtcgps.mk
|
78 |
|
|
|
79 |
|
|
.PHONY: clean
|
80 |
|
|
clean:
|
81 |
|
|
rm -rf $(OBJDR)
|
82 |
|
|
|