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

Subversion Repositories zipcpu

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

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 49 dgisselq
MAKE := `which make`
55
 
56 36 dgisselq
.PHONY: doc
57
doc:
58 49 dgisselq
        @echo "Building docs"; cd doc; $(MAKE) --no-print-directory
59 36 dgisselq
 
60 28 dgisselq
.PHONY: rtl
61
rtl:
62 49 dgisselq
        @echo "Building rtl for Verilator"; cd rtl; $(MAKE) --no-print-directory
63 28 dgisselq
 
64
.PHONY: sw
65
sw:
66 158 dgisselq
        @echo "Building toolchain"; $(MAKE) --no-print-directory --directory=sw/
67 28 dgisselq
 
68
.PHONY: bench
69 49 dgisselq
bench:  rtl sw
70
        @echo "Building bench/cpp"; cd bench/cpp; $(MAKE) --no-print-directory
71
        @echo "Building bench/asm"; cd bench/asm; $(MAKE) --no-print-directory
72 28 dgisselq
 
73 49 dgisselq
.PHONY: test
74 28 dgisselq
test: sw rtl
75 49 dgisselq
        @echo "Building zasm test"; cd sw/zasm; $(MAKE) test --no-print-directory
76
        @echo "Bench test"; cd bench/cpp; $(MAKE) test --no-print-directory
77 28 dgisselq
 
78 49 dgisselq
.PHONY: dhrystone
79
dhrystone: sw bench
80
        @echo "Building Asm Dhrystone"; cd bench/asm; $(MAKE) zipdhry.z --no-print-directory
81
        @echo "Running Dhrystone"; cd bench/cpp; $(MAKE) dhrystone --no-print-directory

powered by: WebSVN 2.1.0

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