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

Subversion Repositories qspiflash

[/] [qspiflash/] [trunk/] [bench/] [cpp/] [Makefile] - Blame information for rev 13

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

Line No. Rev Author Line
1 12 dgisselq
################################################################################
2
##
3
## Filename:    Makefile
4
##
5
## Project:     Wishbone Controlled Quad SPI Flash Controller
6
##
7
## Purpose:     This makefile coordinates the build of the extended quad spi
8
##              flash controller (not the normal quad spi flash controller also
9
##      in this directory).
10
##
11
## Creator:     Dan Gisselquist, Ph.D.
12
##              Gisselquist Technology, LLC
13
##
14
################################################################################
15
##
16
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
17
##
18
## This program is free software (firmware): you can redistribute it and/or
19
## modify it under the terms of  the GNU General Public License as published
20
## by the Free Software Foundation, either version 3 of the License, or (at
21
## your option) any later version.
22
##
23
## This program is distributed in the hope that it will be useful, but WITHOUT
24
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
25
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
26
## for more details.
27
##
28
## You should have received a copy of the GNU General Public License along
29
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
30
## target there if the PDF file isn't present.)  If not, see
31
##  for a copy.
32
##
33
## License:     GPL, v3, as defined and found on www.gnu.org,
34
##              http://www.gnu.org/licenses/gpl.html
35
##
36
##
37
################################################################################
38
##
39
##
40
CXX     := g++
41
FLAGS   := -Wall -Og -g
42
OBJDIR  := obj-pc
43
RTLD    := ../../rtl
44 13 dgisselq
VERILATOR_ROOT   ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
45
VROOT   := $(VERILATOR_ROOT)
46
INCS    := -I$(RTLD)/obj_dir/ -I$(RTLD) -I$(VROOT)/include
47 12 dgisselq
SOURCES := eqspiflashsim.cpp eqspiflash_tb.cpp
48
VOBJDR  := $(RTLD)/obj_dir
49 13 dgisselq
VLIB    := $(VROOT)/include/verilated.cpp
50 12 dgisselq
SIMSRCS := enetctrlsim.cpp eqspiflashsim.cpp
51
all:    $(OBJDIR)/ eqspiflash_tb pretest
52
 
53
$(OBJDIR)/:
54
        @bash -c "if [ ! -e $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi"
55
 
56
$(OBJDIR)/%.o: %.cpp
57
        $(CXX) $(FLAGS) -c $^ -o $@
58
 
59
eqspiflash_tb: eqspiflash_tb.cpp $(OBJDIR)/eqspiflashsim.o $(VOBJDR)/Veqspiflash__ALL.a
60
        $(CXX) $(FLAGS) $(INCS) $^ $(VOBJDR)/Veqspiflash__ALL.a $(VLIB) -o $@
61
 
62
.PHONY: pretest
63
pretest: eqspiflash_tb
64
        @echo "The test bench has been created.  Type make test, and look at"
65
        @echo "the end of its output to see if it (still) works."
66
 
67
.PHONY: test
68
test: eqspiflash_tb
69
        ./eqspiflash_tb
70
 
71
.PHONY: clean
72
clean:
73
        rm ./eqspiflash_tb

powered by: WebSVN 2.1.0

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