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

Subversion Repositories wbuart32

[/] [wbuart32/] [trunk/] [rtl/] [Makefile] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dgisselq
################################################################################
2
##
3
## Filename:    Makefile
4
##
5
## Project:     wbuart32, a full featured UART with simulator
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
## Targets:     The default target, all, builds the target test, which includes
12
##              the libraries necessary for Verilator testing.
13
##
14
## Creator:     Dan Gisselquist, Ph.D.
15
##              Gisselquist Technology, LLC
16
##
17
################################################################################
18
##
19 26 dgisselq
## Copyright (C) 2015-2019, Gisselquist Technology, LLC
20 2 dgisselq
##
21
## This program is free software (firmware): you can redistribute it and/or
22
## modify it under the terms of  the GNU General Public License as published
23
## by the Free Software Foundation, either version 3 of the License, or (at
24
## your option) any later version.
25
##
26
## This program is distributed in the hope that it will be useful, but WITHOUT
27
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
28
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
29
## for more details.
30
##
31
## You should have received a copy of the GNU General Public License along
32
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
33
## target there if the PDF file isn't present.)  If not, see
34
##  for a copy.
35
##
36
## License:     GPL, v3, as defined and found on www.gnu.org,
37
##              http://www.gnu.org/licenses/gpl.html
38
##
39
################################################################################
40
##
41
##
42 26 dgisselq
all:    test tags
43 2 dgisselq
YYMMDD=`date +%Y%m%d`
44
CXX   := g++
45
FBDIR := .
46
VDIRFB:= $(FBDIR)/obj_dir
47 18 dgisselq
VERILATOR := verilator
48 2 dgisselq
 
49
.PHONY: test
50
test: $(VDIRFB)/Vtxuart__ALL.a
51
test: $(VDIRFB)/Vrxuart__ALL.a
52 5 dgisselq
test: $(VDIRFB)/Vwbuart__ALL.a
53 15 dgisselq
test: $(VDIRFB)/Vtxuartlite__ALL.a
54
test: $(VDIRFB)/Vrxuartlite__ALL.a
55 2 dgisselq
 
56 26 dgisselq
$(VDIRFB)/Vrxuart__ALL.a:     $(VDIRFB)/Vrxuart.cpp
57
$(VDIRFB)/Vtxuart__ALL.a:     $(VDIRFB)/Vtxuart.cpp
58
$(VDIRFB)/Vrxuartlite__ALL.a: $(VDIRFB)/Vrxuartlite.cpp
59
$(VDIRFB)/Vtxuartlite__ALL.a: $(VDIRFB)/Vtxuartlite.cpp
60
$(VDIRFB)/Vwbuart__ALL.a:     $(VDIRFB)/Vwbuart.cpp
61 2 dgisselq
 
62 26 dgisselq
$(VDIRFB)/V%.mk:  $(VDIRFB)/%.h
63
$(VDIRFB)/V%.h:   $(VDIRFB)/%.cpp
64
$(VDIRFB)/V%.cpp: $(FBDIR)/%.v
65
        $(VERILATOR) --trace -MMD -Wall -cc $*.v
66 15 dgisselq
 
67 2 dgisselq
$(VDIRFB)/V%__ALL.a: $(VDIRFB)/V%.mk
68
        cd $(VDIRFB); make -f V$*.mk
69
 
70 26 dgisselq
tags: $(wildcard *.v)
71
        ctags *.v
72
 
73 2 dgisselq
.PHONY: clean
74
clean:
75 26 dgisselq
        rm -rf tags $(VDIRFB)/
76 2 dgisselq
 
77 26 dgisselq
DEPS := $(wildcard $(VDIRFB)/*.d)
78
 
79
ifneq ($(MAKECMDGOALS),clean)
80
ifneq ($(DEPS),)
81
include $(DEPS)
82
endif
83
endif

powered by: WebSVN 2.1.0

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