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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [Makefile] - Blame information for rev 51

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

Line No. Rev Author Line
1 6 dgisselq
##############################################################################//
2
##
3
## Filename:    Makefile
4
##
5
## Project:     CMod S6 System on a Chip, ZipCPU demonstration project
6
##
7
## Purpose:     An initial attempt at a master project makefile.  Does not
8
##              yet support subdirectory recursion, so it currently does
9
##      little more than make a tar file or a date stamp.
10
##
11
## Creator:     Dan Gisselquist, Ph.D.
12
##              Gisselquist Technology, LLC
13
##
14
##############################################################################//
15
##
16
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
17
##
18
## This program is free software (firmware): you can redistribute it and/or
19
## modify it under the terms of  the GNU General Public License as published
20
## by the Free Software Foundation, either version 3 of the License, or (at
21
## your option) any later version.
22
##
23
## This program is distributed in the hope that it will be useful, but WITHOUT
24
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
25
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
26
## for more details.
27
##
28
## You should have received a copy of the GNU General Public License along
29
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
30
## target there if the PDF file isn't present.)  If not, see
31
##  for a copy.
32
##
33
## License:     GPL, v3, as defined and found on www.gnu.org,
34
##              http://www.gnu.org/licenses/gpl.html
35
##
36
##
37
##############################################################################//
38
##
39
##
40 2 dgisselq
.PHONY: all
41 11 dgisselq
all:    datestamp archive rtl sw
42 2 dgisselq
BENCH :=
43 50 dgisselq
SIM := `find sim -name Makefile` `find sim -name "*.cpp"` `find sim -name "*.h"`
44 2 dgisselq
RTL   := `find rtl -name "*.v"` `find rtl -name Makefile`
45 50 dgisselq
NOTES := `find doc -name "*.txt"` `find doc -name "*.html"` `ls *.txt`
46 2 dgisselq
SW    := `find sw -name "*.cpp"` `find sw -name "*.h"`  \
47 34 dgisselq
        `find sw -name "*.c"` `find sw -name "*.sh"`    \
48 2 dgisselq
        `find sw -name "*.pl"` `find sw -name Makefile`
49
PROJ    :=
50
BIN     := `find xilinx -name "*.bit"`
51
CONSTRAINTS := cmod.ucf
52
YYMMDD  := `date +%Y%m%d`
53
 
54 6 dgisselq
.PHONY: datestamp
55
datestamp:
56 50 dgisselq
        @bash -c 'if [ ! -e $(YYMMDD)-build.v ]; then rm -f 20??????-build.v; perl mkdatev.pl > $(YYMMDD)-build.v; rm -f rtl/builddate.v; fi'
57 6 dgisselq
        @bash -c 'if [ ! -e rtl/builddate.v ]; then cd rtl; cp ../$(YYMMDD)-build.v builddate.v; fi'
58 2 dgisselq
 
59 11 dgisselq
.PHONY: rtl
60
rtl:
61
        @make --no-print-directory -C rtl
62
 
63
.PHONY: sw
64
sw:
65
        @make --no-print-directory -C sw
66
 
67
.PHONY: doc
68
doc:
69
        @make --no-print-directory -C doc
70
 
71 50 dgisselq
.PHONY: sim
72 11 dgisselq
bench: rtl
73 50 dgisselq
        @make --no-print-directory -C sim/verilator
74 11 dgisselq
 
75 50 dgisselq
.PHONY: list-archive-rtl
76
list-archive-rtl:
77
        echo $(RTL)
78
 
79
.PHONY: list-archive-sw
80
list-archive-sw:
81
        echo $(SW)
82
 
83
.PHONY: list-archive-bin
84
list-archive-bin:
85
        echo $(BIN)
86
 
87
.PHONY: list-archive-notes
88
list-archive-notes:
89
        echo $(NOTES)
90
 
91
.PHONY: list-archive-proj
92
list-archive-proj:
93
        echo $(PROJ)
94
 
95
.PHONY: list-archive
96
list-archive: list-archive-sw list-archive-rtl list-archive-notes list-archive-proj list-archive-bin
97
 
98 2 dgisselq
.PHONY: archive
99
archive:
100 50 dgisselq
        tar --transform s,^,$(YYMMDD)-s6/, -chjf $(YYMMDD)-s6.tjz $(SIM) $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
101 2 dgisselq
 
102
# .PHONY: bit
103
# bit:
104 11 dgisselq
#       make --no-print-directory -C xilinx toplevel.bit
105 2 dgisselq
 
106 6 dgisselq
axload:
107
        djtgcfg enum
108
        djtgcfg init -d CmodS6
109
        djtgcfg prog  -d CmodS6 -i 0 -f xilinx/alttop.bit
110 8 dgisselq
# Might also be able to do a ...
111
#   djtgcfg erase -d CmodS6 -i 0
112
# but I can't speak to whether it would be useful or not.
113 2 dgisselq
 
114 6 dgisselq
xload:
115 8 dgisselq
        djtgcfg init -d CmodS6
116 6 dgisselq
        djtgcfg prog -d CmodS6 -i 0 -f xilinx/toplevel.bit
117 50 dgisselq
 
118
# Fload really depends upon axload, but we'll ignore that here.
119
fload:
120
        sw/host/zipload xilinx/toplevel.bit sw/zipos/doorbell

powered by: WebSVN 2.1.0

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