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

Subversion Repositories zipcpu

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

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 2 dgisselq
 
49 36 dgisselq
zippy_tb: $(SOURCES) $(RAWLIB) $(ZASM)/zopcodes.h $(ZASM)/zparser.h testb.h
50 39 dgisselq
zippy_tb: $(RTLD)/cpudefs.h
51 2 dgisselq
        $(CXX) $(FLAGS) $(INCS) $(SOURCES) $(LIBS) -o $@
52
 
53 36 dgisselq
.PHONY: stest
54
stest: zippy_tb
55
        ./zippy_tb -s $(TESTF)
56
 
57
.PHONY: itest
58 27 dgisselq
itest: zippy_tb
59
        ./zippy_tb $(TESTF)
60
 
61 36 dgisselq
.PHONY: test
62
test: zippy_tb stest
63 27 dgisselq
        ./zippy_tb -a $(TESTF)
64 36 dgisselq
 
65
.PHONY: clean
66
clean:
67
        rm ./zippy_tb

powered by: WebSVN 2.1.0

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