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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [Makefile] - Blame information for rev 202

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

Line No. Rev Author Line
1 28 dgisselq
################################################################################
2
#
3
# Filename:     Makefile
4
#
5
# Project:      Zip CPU -- a small, lightweight, RISC CPU soft core
6
#
7
# Purpose:      This is a grand makefile for the entire project.  It will
8
#               build the assembler, and a Verilog testbench, and then
9
#               even test the CPU via that test bench.
10
#
11
#       Targets include:
12
#
13
#               bench   Build the CPP test bench/debugger facility.
14
#
15 158 dgisselq
#               doc     Build the ZipCPU chip specification and the GPL
16
#                       license.  These should be distributed pre-built, but
17
#                       you are welcome to rebuild them if you would like.
18
#
19 28 dgisselq
#               rtl     Run Verilator on the RTL
20
#
21 158 dgisselq
#               sw      Build the obsolete assembler, binutils, and GCC.  By
22
#                       default, this also 'install's the compiler into the
23
#                       sw/install/ subdirectory as well.
24 28 dgisselq
#
25
#               test    Run the test bench on the assembler test file.
26
#
27
#
28
# Creator:      Dan Gisselquist, Ph.D.
29 69 dgisselq
#               Gisselquist Technology, LLC
30 28 dgisselq
#
31
################################################################################
32
#
33 158 dgisselq
# Copyright (C) 2015-2016, Gisselquist Technology, LLC
34 28 dgisselq
#
35
# This program is free software (firmware): you can redistribute it and/or
36
# modify it under the terms of  the GNU General Public License as published
37
# by the Free Software Foundation, either version 3 of the License, or (at
38
# your option) any later version.
39
#
40
# This program is distributed in the hope that it will be useful, but WITHOUT
41
# ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
42
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
43
# for more details.
44
#
45
# License:      GPL, v3, as defined and found on www.gnu.org,
46
#               http://www.gnu.org/licenses/gpl.html
47
#
48
#
49
################################################################################
50
#
51
.PHONY: all
52 158 dgisselq
all: rtl sw
53 28 dgisselq
 
54 202 dgisselq
MAKE := make    # Was `which make`
55
SUBMAKE := $(MAKE) --no-print-directory
56 49 dgisselq
 
57 36 dgisselq
.PHONY: doc
58
doc:
59 202 dgisselq
        @echo "Building docs"; cd doc;
60
        +@$(SUBMAKE) --directory=doc/
61 36 dgisselq
 
62 28 dgisselq
.PHONY: rtl
63
rtl:
64 202 dgisselq
        @echo "Building rtl for Verilator";
65
        +@$(SUBMAKE) --directory=rtl/
66 28 dgisselq
 
67
.PHONY: sw
68
sw:
69 202 dgisselq
        @echo "Building toolchain";
70
        +@$(SUBMAKE) --directory=sw/
71 28 dgisselq
 
72 202 dgisselq
.PHONY: sim
73
sim:    cppsim vsim
74 28 dgisselq
 
75 202 dgisselq
cppsim:
76
        @echo "Building in C++ simulator";
77
        +@$(SUBMAKE) --directory=sim/cpp
78 28 dgisselq
 
79 202 dgisselq
vsim: rtl
80
        @echo "Building Verilator simulator";
81
        +@$(SUBMAKE) --directory=sim/verilator
82
 
83
clean:
84
        +@$(SUBMAKE) --directory=rtl
85
        +@$(SUBMAKE) --directory=sw
86
        +@$(SUBMAKE) --directory=sim/cpp
87
        +@$(SUBMAKE) --directory=sim/verilator
88
        +@$(SUBMAKE) --directory=bench/asm
89
        +@$(SUBMAKE) --directory=bench/cpp
90
 
91
# .PHONY: bench
92
# bench: rtl sw
93
        # @echo "Building in bench/rtl"; $(SUBMAKE) --directory=bench/rtl
94
        # @echo "Building in bench/cpp"; $(SUBMAKE) --directory=bench/cpp
95
        # @echo "Building in bench/asm"; $(SUBMAKE) --directory=bench/asm
96
 
97
# .PHONY: test
98
# test: sw rtl
99
        # @echo "Building zasm test"; cd sw/zasm; $(MAKE) test --no-print-directory
100
        # @echo "Bench test"; cd bench/cpp; $(MAKE) test --no-print-directory
101
 
102
# .PHONY: dhrystone
103
# dhrystone: sw bench
104
        # @echo "Building Asm Dhrystone"; $(SUBMAKE) zipdhry.z --no-print-directory
105
        # @echo "Running Dhrystone"; cd bench/cpp; $(SUBMAKE) dhrystone --no-print-directory

powered by: WebSVN 2.1.0

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