Line 56... |
Line 56... |
## 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
|
Line 72... |
Line 72... |
YYMMDD=`date +%Y%m%d`
|
YYMMDD=`date +%Y%m%d`
|
CXX := g++
|
CXX := g++
|
FBDIR := .
|
FBDIR := .
|
VDIRFB:= $(FBDIR)/obj_dir
|
VDIRFB:= $(FBDIR)/obj_dir
|
RTLDR := ../../rtl
|
RTLDR := ../../rtl
|
|
VERILATOR := verilator
|
|
VFLAGS := -Wall --MMD --trace -y ../../rtl -cc
|
|
|
.PHONY: test testline testhello speechfifo
|
.PHONY: test testline testhello speechfifo
|
test: testline testhello speechfifo
|
test: testline testhello speechfifo
|
testline: $(VDIRFB)/Vlinetest__ALL.a
|
testline: $(VDIRFB)/Vlinetest__ALL.a
|
testhello: $(VDIRFB)/Vhelloworld__ALL.a
|
testhello: $(VDIRFB)/Vhelloworld__ALL.a
|
Line 97... |
Line 99... |
$(VDIRFB)/Vspeechfifo__ALL.a: $(VDIRFB)/Vspeechfifo.h $(VDIRFB)/Vspeechfifo.cpp
|
$(VDIRFB)/Vspeechfifo__ALL.a: $(VDIRFB)/Vspeechfifo.h $(VDIRFB)/Vspeechfifo.cpp
|
$(VDIRFB)/Vspeechfifo__ALL.a: $(VDIRFB)/Vspeechfifo.mk
|
$(VDIRFB)/Vspeechfifo__ALL.a: $(VDIRFB)/Vspeechfifo.mk
|
$(SPEECHVFILES): speechfifo.v $(SPEECHSRCS)
|
$(SPEECHVFILES): speechfifo.v $(SPEECHSRCS)
|
|
|
$(VDIRFB)/V%.cpp $(VDIRFB)/V%.h $(VDIRFB)/V%.mk: $(FBDIR)/%.v
|
$(VDIRFB)/V%.cpp $(VDIRFB)/V%.h $(VDIRFB)/V%.mk: $(FBDIR)/%.v
|
verilator --trace -cc -y ../../rtl $*.v
|
$(VERILATOR) $(VFLAGS) $*.v
|
|
|
$(VDIRFB)/V%__ALL.a: $(VDIRFB)/V%.mk
|
$(VDIRFB)/V%__ALL.a: $(VDIRFB)/V%.mk
|
cd $(VDIRFB); make -f V$*.mk
|
cd $(VDIRFB); make -f V$*.mk
|
|
|
.PHONY: clean
|
.PHONY: clean
|
Line 109... |
Line 111... |
rm -rf $(VDIRFB)/*.mk
|
rm -rf $(VDIRFB)/*.mk
|
rm -rf $(VDIRFB)/*.cpp
|
rm -rf $(VDIRFB)/*.cpp
|
rm -rf $(VDIRFB)/*.h
|
rm -rf $(VDIRFB)/*.h
|
rm -rf $(VDIRFB)/
|
rm -rf $(VDIRFB)/
|
|
|
|
DIRS := $(wildcard $(VDIRFB)/*.d)
|
|
ifneq ($(DIRS),)
|
|
-include $(DIRS)
|
|
endif
|