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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [Makefile] - Diff between revs 11 and 34

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 11 Rev 34
##############################################################################//
##############################################################################//
##
##
## Filename:    Makefile
## Filename:    Makefile
##
##
## Project:     CMod S6 System on a Chip, ZipCPU demonstration project
## Project:     CMod S6 System on a Chip, ZipCPU demonstration project
##
##
## Purpose:     An initial attempt at a master project makefile.  Does not
## Purpose:     An initial attempt at a master project makefile.  Does not
##              yet support subdirectory recursion, so it currently does
##              yet support subdirectory recursion, so it currently does
##      little more than make a tar file or a date stamp.
##      little more than make a tar file or a date stamp.
##
##
## Creator:     Dan Gisselquist, Ph.D.
## Creator:     Dan Gisselquist, Ph.D.
##              Gisselquist Technology, LLC
##              Gisselquist Technology, LLC
##
##
##############################################################################//
##############################################################################//
##
##
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
## Copyright (C) 2015-2016, Gisselquist Technology, LLC
##
##
## This program is free software (firmware): you can redistribute it and/or
## This program is free software (firmware): you can redistribute it and/or
## modify it under the terms of  the GNU General Public License as published
## modify it under the terms of  the GNU General Public License as published
## by the Free Software Foundation, either version 3 of the License, or (at
## by the Free Software Foundation, either version 3 of the License, or (at
## your option) any later version.
## your option) any later version.
##
##
## This program is distributed in the hope that it will be useful, but WITHOUT
## This program is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## for more details.
## for more details.
##
##
## You should have received a copy of the GNU General Public License along
## You should have received a copy of the GNU General Public License along
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
## target there if the PDF file isn't present.)  If not, see
## target there if the PDF file isn't present.)  If not, see
##  for a copy.
##  for a copy.
##
##
## License:     GPL, v3, as defined and found on www.gnu.org,
## License:     GPL, v3, as defined and found on www.gnu.org,
##              http://www.gnu.org/licenses/gpl.html
##              http://www.gnu.org/licenses/gpl.html
##
##
##
##
##############################################################################//
##############################################################################//
##
##
##
##
.PHONY: all
.PHONY: all
all:    datestamp archive rtl sw
all:    datestamp archive rtl sw
# BENCH := `find bench -name Makefile` `find bench -name "*.cpp"` `find bench -name "*.h"`
# BENCH := `find bench -name Makefile` `find bench -name "*.cpp"` `find bench -name "*.h"`
BENCH :=
BENCH :=
RTL   := `find rtl -name "*.v"` `find rtl -name Makefile`
RTL   := `find rtl -name "*.v"` `find rtl -name Makefile`
NOTES := `find . -name "*.txt"` `find . -name "*.html"`
NOTES := `find . -name "*.txt"` `find . -name "*.html"`
SW    := `find sw -name "*.cpp"` `find sw -name "*.h"`  \
SW    := `find sw -name "*.cpp"` `find sw -name "*.h"`  \
        `find sw -name "*.sh"` `find sw -name "*.py"`   \
        `find sw -name "*.c"` `find sw -name "*.sh"`    \
        `find sw -name "*.pl"` `find sw -name Makefile`
        `find sw -name "*.pl"` `find sw -name Makefile`
# PROJ  := xilinx/xula.prj xilinx/xula.xise xilinx/xula.xst     \
# PROJ  := xilinx/xula.prj xilinx/xula.xise xilinx/xula.xst     \
#       xilinx/xula.ut xilinx/Makefile
#       xilinx/xula.ut xilinx/Makefile
PROJ    :=
PROJ    :=
BIN     := `find xilinx -name "*.bit"`
BIN     := `find xilinx -name "*.bit"`
CONSTRAINTS := cmod.ucf
CONSTRAINTS := cmod.ucf
YYMMDD  := `date +%Y%m%d`
YYMMDD  := `date +%Y%m%d`
.PHONY: datestamp
.PHONY: datestamp
datestamp:
datestamp:
        @bash -c 'if [ ! -e $(YYMMDD)-build.v ]; then rm 20??????-build.v; perl mkdatev.pl > $(YYMMDD)-build.v; rm -f rtl/builddate.v; fi'
        @bash -c 'if [ ! -e $(YYMMDD)-build.v ]; then rm 20??????-build.v; perl mkdatev.pl > $(YYMMDD)-build.v; rm -f rtl/builddate.v; fi'
        @bash -c 'if [ ! -e rtl/builddate.v ]; then cd rtl; cp ../$(YYMMDD)-build.v builddate.v; fi'
        @bash -c 'if [ ! -e rtl/builddate.v ]; then cd rtl; cp ../$(YYMMDD)-build.v builddate.v; fi'
.PHONY: rtl
.PHONY: rtl
rtl:
rtl:
        @make --no-print-directory -C rtl
        @make --no-print-directory -C rtl
.PHONY: sw
.PHONY: sw
sw:
sw:
        @make --no-print-directory -C sw
        @make --no-print-directory -C sw
.PHONY: doc
.PHONY: doc
doc:
doc:
        @make --no-print-directory -C doc
        @make --no-print-directory -C doc
.PHONY: bench
.PHONY: bench
bench: rtl
bench: rtl
        @make --no-print-directory -C bench/cpp
        @make --no-print-directory -C bench/cpp
.PHONY: archive
.PHONY: archive
archive:
archive:
        tar --transform s,^,$(YYMMDD)-s6/, -chjf $(YYMMDD)-s6.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
        tar --transform s,^,$(YYMMDD)-s6/, -chjf $(YYMMDD)-s6.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
# .PHONY: bit
# .PHONY: bit
# bit:
# bit:
#       make --no-print-directory -C xilinx toplevel.bit
#       make --no-print-directory -C xilinx toplevel.bit
axload:
axload:
        djtgcfg enum
        djtgcfg enum
        djtgcfg init -d CmodS6
        djtgcfg init -d CmodS6
        djtgcfg prog  -d CmodS6 -i 0 -f xilinx/alttop.bit
        djtgcfg prog  -d CmodS6 -i 0 -f xilinx/alttop.bit
# Might also be able to do a ...
# Might also be able to do a ...
#   djtgcfg erase -d CmodS6 -i 0
#   djtgcfg erase -d CmodS6 -i 0
# but I can't speak to whether it would be useful or not.
# but I can't speak to whether it would be useful or not.
xload:
xload:
        djtgcfg init -d CmodS6
        djtgcfg init -d CmodS6
        djtgcfg prog -d CmodS6 -i 0 -f xilinx/toplevel.bit
        djtgcfg prog -d CmodS6 -i 0 -f xilinx/toplevel.bit
 
 

powered by: WebSVN 2.1.0

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