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

Subversion Repositories zipcpu

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

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
#               Gisselquist Tecnology, LLC
16
#
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
CXX     := g++
40
FLAGS   := -Wall -Og -g
41
ZASM    := ../../sw/zasm
42 39 dgisselq
RTLD    := ../../rtl
43
INCS    := -I$(RTLD)/obj_dir/ -I$(RTLD) -I/usr/share/verilator/include -I../../sw/zasm
44 2 dgisselq
SOURCES := zippy_tb.cpp memsim.cpp twoc.cpp $(ZASM)/zopcodes.cpp $(ZASM)/zparser.cpp
45
RAWLIB  := /usr/share/verilator/include/verilated.cpp ../../rtl/obj_dir/Vzipsystem__ALL.a
46
LIBS    := $(RAWLIB) -lncurses
47 27 dgisselq
TESTF   := ../../sw/zasm/z.out
48 43 dgisselq
DHRYSTONEF := ../asm/zipdhry.z
49 2 dgisselq
 
50 36 dgisselq
zippy_tb: $(SOURCES) $(RAWLIB) $(ZASM)/zopcodes.h $(ZASM)/zparser.h testb.h
51 39 dgisselq
zippy_tb: $(RTLD)/cpudefs.h
52 2 dgisselq
        $(CXX) $(FLAGS) $(INCS) $(SOURCES) $(LIBS) -o $@
53
 
54 58 dgisselq
pdump: pdump.cpp $(ZASM)/zopcodes.cpp $(ZASM)/zparser.cpp
55
pdump: $(ZASM)/zopcodes.h $(ZASM)/zparser.h testb.h twoc.cpp
56
        $(CXX) $(FLAGS) $(INCS) pdump.cpp $(ZASM)/zopcodes.cpp $(ZASM)/zparser.cpp twoc.cpp -o $@
57
 
58 36 dgisselq
.PHONY: stest
59
stest: zippy_tb
60
        ./zippy_tb -s $(TESTF)
61
 
62
.PHONY: itest
63 27 dgisselq
itest: zippy_tb
64
        ./zippy_tb $(TESTF)
65
 
66 36 dgisselq
.PHONY: test
67
test: zippy_tb stest
68 27 dgisselq
        ./zippy_tb -a $(TESTF)
69 36 dgisselq
 
70 43 dgisselq
.PHONY: dhrystone
71
dhrystone: zippy_tb
72
        ./zippy_tb -a $(DHRYSTONEF)
73
 
74 36 dgisselq
.PHONY: clean
75
clean:
76
        rm ./zippy_tb

powered by: WebSVN 2.1.0

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