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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [bench/] [cpp/] [Makefile] - Blame information for rev 86

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:      Zip CPU -- a small, lightweight, RISC CPU soft core
6
#
7
# Purpose:      This makefile builds the final verilator simulation of the
8
#               zipsystem.  Specifically, it builds the final C++ portion
9
#               of the simulator, and thus the final simulator executable.
10
#
11
#               This simulator depends upon the ncurses library.
12
#
13
#
14
# Creator:      Dan Gisselquist, Ph.D.
15 69 dgisselq
#               Gisselquist Technology, LLC
16 2 dgisselq
#
17
################################################################################
18
#
19
# Copyright (C) 2015, Gisselquist Technology, LLC
20
#
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
# License:      GPL, v3, as defined and found on www.gnu.org,
32
#               http://www.gnu.org/licenses/gpl.html
33
#
34
#
35
################################################################################
36
#
37
all: zippy_tb
38
 
39 69 dgisselq
CXX     := g++
40
FLAGS   := -Wall -Og -g
41 76 dgisselq
ZASM    := ../../sw/zasm
42 69 dgisselq
RTLD    := ../../rtl
43
INCS    := -I$(RTLD)/obj_dir/ -I$(RTLD) -I/usr/share/verilator/include -I$(ZASM)
44 2 dgisselq
SOURCES := zippy_tb.cpp memsim.cpp twoc.cpp $(ZASM)/zopcodes.cpp $(ZASM)/zparser.cpp
45 69 dgisselq
VLIB    := /usr/share/verilator/include/verilated.cpp
46
RAWLIB  := $(VLIB) $(RTLD)/obj_dir/Vzipsystem__ALL.a
47
LIBS    := $(RAWLIB) -lncurses
48
TESTF   := $(ZASM)/z.out
49 43 dgisselq
DHRYSTONEF := ../asm/zipdhry.z
50 2 dgisselq
 
51 36 dgisselq
zippy_tb: $(SOURCES) $(RAWLIB) $(ZASM)/zopcodes.h $(ZASM)/zparser.h testb.h
52 39 dgisselq
zippy_tb: $(RTLD)/cpudefs.h
53 2 dgisselq
        $(CXX) $(FLAGS) $(INCS) $(SOURCES) $(LIBS) -o $@
54
 
55 69 dgisselq
div_tb: div_tb.cpp twoc.cpp $(VLIB) $(RTLD)/obj_dir/Vdiv__ALL.a testb.h
56
        $(CXX) $(FLAGS) $(INCS) div_tb.cpp twoc.cpp $(VLIB) $(RTLD)/obj_dir/Vdiv__ALL.a -o $@
57
 
58 58 dgisselq
pdump: pdump.cpp $(ZASM)/zopcodes.cpp $(ZASM)/zparser.cpp
59
pdump: $(ZASM)/zopcodes.h $(ZASM)/zparser.h testb.h twoc.cpp
60
        $(CXX) $(FLAGS) $(INCS) pdump.cpp $(ZASM)/zopcodes.cpp $(ZASM)/zparser.cpp twoc.cpp -o $@
61
 
62 36 dgisselq
.PHONY: stest
63
stest: zippy_tb
64
        ./zippy_tb -s $(TESTF)
65
 
66
.PHONY: itest
67 27 dgisselq
itest: zippy_tb
68
        ./zippy_tb $(TESTF)
69
 
70 36 dgisselq
.PHONY: test
71
test: zippy_tb stest
72 27 dgisselq
        ./zippy_tb -a $(TESTF)
73 36 dgisselq
 
74 43 dgisselq
.PHONY: dhrystone
75
dhrystone: zippy_tb
76
        ./zippy_tb -a $(DHRYSTONEF)
77
 
78 36 dgisselq
.PHONY: clean
79
clean:
80 76 dgisselq
        rm ./zippy_tb pdump div_tb

powered by: WebSVN 2.1.0

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