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

Subversion Repositories xulalx25soc

[/] [xulalx25soc/] [trunk/] [Makefile] - Diff between revs 79 and 106

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

Rev 79 Rev 106
################################################################################
################################################################################
##
##
## Filename:    Makefile
## Filename:    Makefile
##
##
## Project:     XuLA2 board
## Project:     XuLA2 board
##
##
## Purpose:     A master project makefile.  It tries to build all targets
## Purpose:     A master project makefile.  It tries to build all targets
##              within the project, mostly by directing subdirectory makes.
##              within the project, mostly by directing subdirectory makes.
##
##
##
##
## Creator:     Dan Gisselquist, Ph.D.
## Creator:     Dan Gisselquist, Ph.D.
##              Gisselquist Technology, LLC
##              Gisselquist Technology, LLC
##
##
################################################################################
################################################################################
##
##
## Copyright (C) 2015, Gisselquist Technology, LLC
## Copyright (C) 2015, 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.
##
##
## 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 verilated sw bench bit
all:    datestamp verilated sw bench bit
# Could also depend upon load, if desired, but not necessary
# Could also depend upon load, if desired, but not necessary
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"`
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 "*.sh"` `find sw -name "*.py"`   \
        `find sw -name "*.pl"` `find sw -name Makefile`
        `find sw -name "*.pl"` `find sw -name Makefile`
DEVSW := `find sw-board -name "*.cpp"` `find sw-board -name "*.h" \
DEVSW := `find sw-board -name "*.cpp"` `find sw-board -name "*.h" \
        `find sw-board -name Makefile`
        `find sw-board -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
BIN  := `find xilinx -name "*.bit"`
BIN  := `find xilinx -name "*.bit"`
CONSTRAINTS := xula.ucf
CONSTRAINTS := xula.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 xilinx/mkdatev.pl > $(YYMMDD)-build.v; rm -f rtl/builddate.v; fi'
        @bash -c 'if [ ! -e $(YYMMDD)-build.v ]; then rm 20??????-build.v; perl xilinx/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: archive
.PHONY: archive
archive:
archive:
        tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
        tar --transform s,^,$(YYMMDD)-xula/, -chjf $(YYMMDD)-xula.tjz $(BENCH) $(SW) $(RTL) $(NOTES) $(PROJ) $(BIN) $(CONSTRAINTS)
 
 
 
.PHONY: rtl
 
rtl: verilated
.PHONY: verilated
.PHONY: verilated
verilated:
verilated:
        cd rtl ; $(MAKE) --no-print-directory
        cd rtl ; $(MAKE) --no-print-directory
.PHONY: bench
.PHONY: bench
bench:
bench:
        cd bench ; $(MAKE) --no-print-directory
        cd bench ; $(MAKE) --no-print-directory
.PHONY: sw
.PHONY: sw
sw:
sw:
        cd sw ; $(MAKE) --no-print-directory
        cd sw ; $(MAKE) --no-print-directory
.PHONY: bit
.PHONY: bit
bit:
bit:
        cd xilinx ; $(MAKE) --no-print-directory xula.bit
        cd xilinx ; $(MAKE) --no-print-directory xula.bit
.PHONY: load
.PHONY: load
load:   bit
load:   bit
        xsload -b xula2-lx25 --fpga xilinx/xula.bit
        xsload -b xula2-lx25 --fpga xilinx/xula.bit
.PHONY: xload
.PHONY: xload
xload:
xload:
        xsload -b xula2-lx25 --fpga xilinx/toplevel.bit
        xsload -b xula2-lx25 --fpga xilinx/toplevel.bit
.PHONY: timing
.PHONY: timing
timing:
timing:
        cd xilinx ; $(MAKE) --no-print-directory timing
        cd xilinx ; $(MAKE) --no-print-directory timing
 
 

powered by: WebSVN 2.1.0

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