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

Subversion Repositories wbuart32

[/] [wbuart32/] [trunk/] [bench/] [cpp/] [Makefile] - Blame information for rev 2

Go to most recent revision | 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:
8
##
9
## Creator:     Dan Gisselquist, Ph.D.
10
##              Gisselquist Technology, LLC
11
##
12
################################################################################
13
##
14
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
15
##
16
## This program is free software (firmware): you can redistribute it and/or
17
## modify it under the terms of  the GNU General Public License as published
18
## by the Free Software Foundation, either version 3 of the License, or (at
19
## your option) any later version.
20
##
21
## This program is distributed in the hope that it will be useful, but WITHOUT
22
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
23
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
## for more details.
25
##
26
## You should have received a copy of the GNU General Public License along
27
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
28
## target there if the PDF file isn't present.)  If not, see
29
##  for a copy.
30
##
31
## License:     GPL, v3, as defined and found on www.gnu.org,
32
##              http://www.gnu.org/licenses/gpl.html
33
##
34
##
35
################################################################################
36
##
37
##
38
CXX     := g++
39
FLAGS   := -Wall -Og -g
40
OBJDIR  := obj-pc
41
RTLD    := ../verilog
42
INCS    := -I$(RTLD)/obj_dir/ -I/usr/share/verilator/include
43
SOURCES := linetest.cpp
44
VOBJDR  := $(RTLD)/obj_dir
45
VLIB    := /usr/share/verilator/include/verilated.cpp
46
SIMSRCS := linetest.cpp uartsim.cpp
47
SIMOBJ := $(subst .cpp,.o,$(SIMSRCS))
48
SIMOBJS:= $(addprefix $(OBJDIR)/,$(SIMOBJ))
49
all:    $(OBJDIR)/ linetest
50
 
51
$(OBJDIR)/:
52
        @bash -c "if [ ! -e $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi"
53
 
54
$(OBJDIR)/uartsim.o: uartsim.cpp uartsim.h
55
 
56
$(OBJDIR)/%.o: %.cpp
57
        $(CXX) $(FLAGS) $(INCS) -c $< -o $@
58
 
59
linetest: $(OBJDIR)/linetest.o $(OBJDIR)/uartsim.o $(VOBJDR)/Vlinetest__ALL.a
60
        $(CXX) $(FLAGS) $(INCS) $^ $(VLIB) -o $@
61
 
62
.PHONY: clean
63
clean:
64
        rm ./linetest
65
        rm $(OBJDIR)/
66
 

powered by: WebSVN 2.1.0

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