1 |
8 |
dgisselq |
################################################################################
|
2 |
|
|
##
|
3 |
|
|
## Filename: Makefile
|
4 |
|
|
##
|
5 |
|
|
## Project: Pipelined Wishbone to AXI converter
|
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 |
|
|
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT| head -1 | sed -e " s/^.*=\s*//"')
|
43 |
|
|
INCS := -I$(RTLD)/obj_dir/ -I$(VROOT)/include
|
44 |
|
|
SOURCES := # testset.cpp
|
45 |
|
|
VOBJDR := $(RTLD)/obj_dir
|
46 |
|
|
VLIB := $(VROOT)/include/verilated.cpp
|
47 |
|
|
SIMSRCS := aximemsim.cpp # testset.cpp
|
48 |
|
|
SIMOBJ := $(subst .cpp,.o,$(SIMSRCS))
|
49 |
|
|
SIMOBJS:= $(addprefix $(OBJDIR)/,$(SIMOBJ))
|
50 |
|
|
all: $(OBJDIR)/ testset
|
51 |
|
|
|
52 |
|
|
$(OBJDIR)/:
|
53 |
|
|
@bash -c "if [ ! -e $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi"
|
54 |
|
|
|
55 |
|
|
$(OBJDIR)/aximemsim.o: aximemsim.cpp aximemsim.h
|
56 |
|
|
|
57 |
|
|
$(OBJDIR)/%.o: %.cpp
|
58 |
|
|
$(CXX) $(FLAGS) $(INCS) -c $< -o $@
|
59 |
|
|
|
60 |
|
|
# testset: $(OBJDIR)/testset.o $(OBJDIR)/aximemsim.o $(VOBJDR)/Vtestset__ALL.a
|
61 |
|
|
# $(CXX) $(FLAGS) $(INCS) $^ $(VLIB) -o $@
|
62 |
|
|
.PHONY: testset
|
63 |
|
|
testset:
|
64 |
|
|
@echo
|
65 |
|
|
@echo "I seem to have lost the testset.cpp file that this test suite"
|
66 |
|
|
@echo "was based off of. Hence, the suite is incomplete."
|
67 |
|
|
@echo
|
68 |
|
|
|
69 |
|
|
.PHONY: clean
|
70 |
|
|
clean:
|
71 |
|
|
rm -rf $(OBJDIR)/
|
72 |
|
|
# rm -f ./testset
|
73 |
|
|
|