OpenCores
URL https://opencores.org/ocsvn/openarty/openarty/trunk

Subversion Repositories openarty

[/] [openarty/] [trunk/] [rtl/] [Makefile] - Blame information for rev 59

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 50 dgisselq
################################################################################
2 3 dgisselq
##
3
## Filename:    Makefile
4
##
5
## Project:     OpenArty, an entirely open SoC based upon the Arty platform
6
##
7
## Purpose:     To direct the Verilator build of the SoC sources.  The result
8
##              is C++ code (built by Verilator), that is then built (herein)
9
##      into a library.
10
##
11
##
12
## Creator:     Dan Gisselquist, Ph.D.
13
##              Gisselquist Technology, LLC
14
##
15 50 dgisselq
################################################################################
16 3 dgisselq
##
17 50 dgisselq
## Copyright (C) 2015-2017, Gisselquist Technology, LLC
18 3 dgisselq
##
19
## This program is free software (firmware): you can redistribute it and/or
20
## modify it under the terms of  the GNU General Public License as published
21
## by the Free Software Foundation, either version 3 of the License, or (at
22
## your option) any later version.
23
##
24
## This program is distributed in the hope that it will be useful, but WITHOUT
25
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
26
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
27
## for more details.
28
##
29 50 dgisselq
## You should have received a copy of the GNU General Public License along
30
## with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
31
## target there if the PDF file isn't present.)  If not, see
32
##  for a copy.
33
##
34 3 dgisselq
## License:     GPL, v3, as defined and found on www.gnu.org,
35 50 dgisselq
##              http://www.gnu.org/licenses/gpl.html
36 3 dgisselq
##
37
##
38 50 dgisselq
################################################################################
39 3 dgisselq
##
40
##
41
all:    test
42
YYMMDD=`date +%Y%m%d`
43
CXX   := g++
44
FBDIR := .
45
VDIRFB:= $(FBDIR)/obj_dir
46
 
47
.PHONY: test
48
test: $(VDIRFB)/Veqspiflash__ALL.a
49
test: $(VDIRFB)/Venetctrl__ALL.a
50
# test: $(VDIRFB)/Vfastmaster__ALL.a
51 25 dgisselq
test: $(VDIRFB)/Vbusmaster__ALL.a
52 3 dgisselq
 
53
CPUDR := cpu
54 30 dgisselq
CPUSOURCESnD := zipcpu.v cpuops.v pfcache.v pipemem.v           \
55
                        pfcache.v idecode.v wbpriarbiter.v zipbones.v   \
56 3 dgisselq
        zipsystem.v zipcounter.v zipjiffies.v ziptimer.v                \
57 30 dgisselq
                wbdmac.v icontrol.v wbwatchdog.v busdelay.v cpudefs.v
58 3 dgisselq
CPUSOURCES := $(addprefix $(CPUDR)/,$(CPUSOURCESnD))
59
 
60
JTAGBUS := wbufifo.v wbubus.v wbucompactlines.v                         \
61
        wbucompress.v wbudecompress.v wbudeword.v wbuexec.v             \
62
        wbuidleint.v wbuinput.v wbuoutput.v wbureadcw.v wbusixchar.v    \
63
        wbutohex.v
64 30 dgisselq
PERIPHERALS:= enetctrl.v enetpackets.v fastio.v rtcdate.v rtcgps.v      \
65 12 dgisselq
        rxuart.v txuart.v eqspiflash.v lleqspi.v flash_config.v         \
66 3 dgisselq
        wbicapetwo.v sdspi.v gpsclock_tb.v gpsclock.v wboled.v lloled.v \
67 30 dgisselq
        wbscopc.v wbscope.v memdev.v addepreamble.v addemac.v addecrc.v \
68 33 dgisselq
        addepad.v rxecrc.v rxepreambl.v rxehwmac.v rxewrite.v           \
69 50 dgisselq
        rxemin.v rxeipchk.v clrled.v wbuart.v ufifo.v
70 3 dgisselq
BIGMATH:= bigadd.v bigsmpy.v bigsub.v
71
SOURCES := fastmaster.v builddate.v                                     \
72
        $(CPUSOURCES) $(JTAGBUS) $(PERIPHERALS) $(BIGMATH)
73
SLOWSRC := busmaster.v builddate.v                                      \
74
        $(CPUSOURCES) $(JTAGBUS) $(PERIPHERALS) $(BIGMATH)
75
 
76
$(VDIRFB)/Vfastmaster__ALL.a: $(VDIRFB)/Vfastmaster.h $(VDIRFB)/Vfastmaster.cpp
77
$(VDIRFB)/Vfastmaster__ALL.a: $(VDIRFB)/Vfastmaster.mk
78
$(VDIRFB)/Vfastmaster.h $(VDIRFB)/Vfastmaster.cpp $(VDIRFB)/Vfastmaster.mk: $(SOURCES)
79
 
80
$(VDIRFB)/Vbusmaster__ALL.a: $(VDIRFB)/Vbusmaster.h $(VDIRFB)/Vbusmaster.cpp
81
$(VDIRFB)/Vbusmaster__ALL.a: $(VDIRFB)/Vbusmaster.mk
82
$(VDIRFB)/Vbusmaster.h $(VDIRFB)/Vbusmaster.cpp $(VDIRFB)/Vbusmaster.mk: $(SLOWSRC)
83
 
84
$(VDIRFB)/Venetctrl.h $(VDIRFB)/Venetctrl.cpp $(VDIRFB)/Venetctrl.mk: enetctrl.v
85 12 dgisselq
$(VDIRFB)/Veqspiflash.h $(VDIRFB)/Veqspiflash.cpp $(VDIRFB)/Veqspiflash.mk: eqspiflash.v lleqspi.v
86 3 dgisselq
$(VDIRFB)/V%.cpp $(VDIRFB)/V%.h $(VDIRFB)/V%.mk: $(FBDIR)/%.v
87 50 dgisselq
        verilator -trace -cc -y $(CPUDR) $*.v
88 3 dgisselq
 
89
 
90
$(VDIRFB)/V%__ALL.a: $(VDIRFB)/V%.mk
91
        cd $(VDIRFB); make -f V$*.mk
92
 
93
.PHONY:
94
archive:
95
        tar --transform s,^,$(YYMMDD)-rtl/, -chjf $(YYMMDD)-rtl.tjz Makefile *.v cpu/*.v
96
 
97
.PHONY: clean
98
clean:
99
        rm -rf $(VDIRFB)/*.mk
100
        rm -rf $(VDIRFB)/*.cpp
101
        rm -rf $(VDIRFB)/*.h
102
        rm -rf $(VDIRFB)/
103
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.