Line 1... |
Line 1... |
################################################################################
|
################################################################################
|
##
|
##
|
## Filename:
|
## Filename: Makefile
|
##
|
##
|
## Project: XuLA2 board
|
## Project: XuLA2 board
|
##
|
##
|
## Purpose:
|
## Purpose: A master project makefile. It tries to build all targets
|
|
## within the project, mostly by directing subdirectory makes.
|
##
|
##
|
##
|
##
|
## Creator: Dan Gisselquist, Ph.D.
|
## Creator: Dan Gisselquist, Ph.D.
|
## Gisselquist Technology, LLC
|
## Gisselquist Technology, LLC
|
##
|
##
|
Line 30... |
Line 31... |
##
|
##
|
################################################################################
|
################################################################################
|
##
|
##
|
##
|
##
|
.PHONY: all
|
.PHONY: all
|
all: datestamp verilated bit sw
|
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" \
|
|
`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 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; ln -fs ../$(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: verilated
|
.PHONY: verilated
|
verilated:
|
verilated:
|
cd rtl ; $(MAKE) --no-print-directory
|
cd rtl ; $(MAKE) --no-print-directory
|
|
|
|
.PHONY: bench
|
|
bench:
|
|
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
|