2006-08-26 11:35:28 +00:00
|
|
|
#*****************************************************************************
|
|
|
|
# DESCRIPTION: Verilator top level: Makefile pre-configure version
|
2008-06-10 01:25:10 +00:00
|
|
|
#
|
|
|
|
# This file is part of Verilator.
|
|
|
|
#
|
2008-04-25 12:14:27 +00:00
|
|
|
# Code available from: http://www.veripool.org/verilator
|
2008-06-10 01:25:10 +00:00
|
|
|
#
|
2006-08-26 11:35:28 +00:00
|
|
|
#*****************************************************************************
|
2008-06-10 01:25:10 +00:00
|
|
|
#
|
2018-01-02 23:05:06 +00:00
|
|
|
# Copyright 2003-2018 by Wilson Snyder. This program is free software; you can
|
2006-08-26 11:35:28 +00:00
|
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 21:07:57 +00:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
2008-06-10 01:25:10 +00:00
|
|
|
#
|
2006-08-26 11:35:28 +00:00
|
|
|
# Verilator is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2008-06-10 01:25:10 +00:00
|
|
|
#
|
2006-08-26 11:35:28 +00:00
|
|
|
#****************************************************************************/
|
|
|
|
#
|
|
|
|
# make all to compile and build Verilator.
|
|
|
|
# make install to install it.
|
|
|
|
# make TAGS to update tags tables.
|
|
|
|
#
|
|
|
|
# make clean or make mostlyclean
|
|
|
|
# Delete all files from the current directory that are normally
|
|
|
|
# created by building the program. Don't delete the files that
|
|
|
|
# record the configuration. Also preserve files that could be made
|
|
|
|
# by building, but normally aren't because the distribution comes
|
|
|
|
# with them.
|
|
|
|
#
|
|
|
|
# make distclean
|
|
|
|
# Delete all files from the current directory that are created by
|
|
|
|
# configuring or building the program. If you have unpacked the
|
|
|
|
# source and built the program without creating any other files,
|
|
|
|
# `make distclean' should leave only the files that were in the
|
|
|
|
# distribution.
|
2008-06-10 01:25:10 +00:00
|
|
|
#
|
2006-08-26 11:35:28 +00:00
|
|
|
# make maintainer-clean
|
|
|
|
# Delete everything from the current directory that can be
|
|
|
|
# reconstructed with this Makefile. This typically includes
|
|
|
|
# everything deleted by distclean, plus more: C source files
|
|
|
|
# produced by Bison, tags tables, info files, and so on.
|
|
|
|
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
HOST = @HOST@
|
|
|
|
|
2012-04-15 19:44:32 +00:00
|
|
|
DOXYGEN = doxygen
|
2006-08-26 11:35:28 +00:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
MAKEINFO = makeinfo
|
2009-11-03 14:22:47 +00:00
|
|
|
POD2TEXT = pod2text
|
2012-04-15 18:51:04 +00:00
|
|
|
POD2LATEXFIX = $(srcdir)/src/pod2latexfix
|
2006-08-26 11:35:28 +00:00
|
|
|
PERL = @PERL@
|
|
|
|
|
2008-05-07 17:46:33 +00:00
|
|
|
# Destination prefix for RPMs
|
2008-06-10 01:25:10 +00:00
|
|
|
DESTDIR =
|
2008-05-07 17:46:33 +00:00
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
#### Don't edit: You're much better using configure switches to set these
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
# Directory in which to install scripts.
|
|
|
|
bindir = @bindir@
|
|
|
|
|
2016-11-08 23:12:05 +00:00
|
|
|
# Directory in which to install manpages.
|
2006-08-26 11:35:28 +00:00
|
|
|
mandir = @mandir@
|
|
|
|
|
|
|
|
# Directory in which to install library files.
|
|
|
|
datadir = @datadir@
|
|
|
|
|
|
|
|
# Directory in which to install documentation info files.
|
|
|
|
infodir = @infodir@
|
|
|
|
|
|
|
|
# Directory in which to install package specific files
|
2008-03-18 20:26:37 +00:00
|
|
|
# Generally ${prefix}/share/verilator
|
2006-08-26 11:35:28 +00:00
|
|
|
pkgdatadir = @pkgdatadir@
|
|
|
|
|
2015-05-14 01:21:29 +00:00
|
|
|
# Directory in which to install pkgconfig file
|
|
|
|
# Generall ${prefix}/share/pkgconfig
|
|
|
|
pkgconfigdir = @pkgconfigdir@
|
|
|
|
|
2008-04-29 14:14:20 +00:00
|
|
|
# Directory in which to install data across multiple architectures
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
|
2009-06-21 17:17:12 +00:00
|
|
|
# Compile options
|
2011-10-07 10:48:40 +00:00
|
|
|
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
|
2009-06-21 17:17:12 +00:00
|
|
|
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
2011-10-07 10:48:40 +00:00
|
|
|
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
2017-10-27 01:48:45 +00:00
|
|
|
CFG_WITH_THREADED = @CFG_WITH_THREADED@
|
2011-10-07 10:48:40 +00:00
|
|
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
2009-06-21 17:17:12 +00:00
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
#### End of system configuration section. ####
|
|
|
|
######################################################################
|
|
|
|
|
2015-11-28 22:33:01 +00:00
|
|
|
.SUFFIXES:
|
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
SHELL = /bin/sh
|
|
|
|
|
2017-09-24 01:18:07 +00:00
|
|
|
SUBDIRS = src test_regress \
|
|
|
|
examples/hello_world_c examples/hello_world_sc \
|
|
|
|
examples/tracing_c examples/tracing_sc \
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2012-04-15 18:51:04 +00:00
|
|
|
INFOS = README README.html README.pdf internals.txt internals.html \
|
2015-04-27 10:47:15 +00:00
|
|
|
internals.pdf verilator.txt verilator.html verilator.pdf \
|
|
|
|
$(VL_INST_MAN_FILES)
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
# Files that can be generated, but should be up to date for a distribution.
|
2006-09-25 15:58:17 +00:00
|
|
|
DISTDEP = info Makefile
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2009-10-22 19:46:47 +00:00
|
|
|
DISTFILES_INC = $(INFOS) .gitignore Artistic COPYING COPYING.LESSER \
|
|
|
|
*.in *.ac \
|
2009-11-03 14:22:47 +00:00
|
|
|
Changes TODO \
|
2008-05-08 14:38:07 +00:00
|
|
|
MANIFEST.SKIP \
|
2017-10-14 20:01:27 +00:00
|
|
|
bin/verilator \
|
|
|
|
bin/verilator_coverage \
|
|
|
|
bin/verilator_difftree \
|
2018-07-23 00:54:28 +00:00
|
|
|
bin/verilator_gantt \
|
2017-10-14 20:01:27 +00:00
|
|
|
bin/verilator_includer \
|
|
|
|
bin/verilator_profcfunc \
|
2012-04-15 19:44:32 +00:00
|
|
|
doxygen-mainpage doxygen.config veripool-logo.png \
|
2009-11-03 14:22:47 +00:00
|
|
|
install-sh configure mkinstalldirs *.pod \
|
2009-12-03 11:55:29 +00:00
|
|
|
include/*.[chv]* \
|
2006-08-26 11:35:28 +00:00
|
|
|
include/*.in \
|
2008-05-08 14:38:07 +00:00
|
|
|
include/.*ignore \
|
2010-02-02 02:39:50 +00:00
|
|
|
include/vltstd/*.[chv]* \
|
2008-05-08 14:38:07 +00:00
|
|
|
.*attributes */.*attributes */*/.*attributes \
|
2014-04-30 02:59:38 +00:00
|
|
|
src/.*ignore src/*.in src/*.cpp src/*.[chly] \
|
|
|
|
src/astgen src/bisonpre src/*fix src/cppcheck_filtered \
|
2014-11-24 02:06:10 +00:00
|
|
|
src/vlcovgen \
|
2013-02-22 22:05:44 +00:00
|
|
|
src/.gdbinit \
|
2008-11-12 20:29:44 +00:00
|
|
|
src/*.pl src/*.pod \
|
2017-09-24 01:18:07 +00:00
|
|
|
examples/*/.*ignore examples/*/Makefile* \
|
|
|
|
examples/*/*.[chv]* examples/*/*.pl \
|
2008-05-08 14:38:07 +00:00
|
|
|
test_*/.*ignore test_*/Makefile* test_*/*.cpp \
|
2010-08-10 15:19:45 +00:00
|
|
|
test_*/*.pl test_*/*.v test_*/*.vc test_*/*.vh \
|
2012-03-21 02:45:00 +00:00
|
|
|
test_regress/t/t*/*.sv* \
|
|
|
|
test_regress/t/t*/*.v* \
|
2017-02-09 23:33:18 +00:00
|
|
|
test_regress/t/t*/*/*.sv* \
|
|
|
|
test_regress/t/t*/*/*.v* \
|
2008-05-08 14:38:07 +00:00
|
|
|
test_regress/t/*.cpp \
|
|
|
|
test_regress/t/*.h \
|
2008-06-28 00:04:20 +00:00
|
|
|
test_regress/t/*.dat \
|
2008-05-08 14:38:07 +00:00
|
|
|
test_regress/t/*.mem \
|
2006-08-26 11:35:28 +00:00
|
|
|
test_regress/t/*.out \
|
2008-05-08 14:38:07 +00:00
|
|
|
test_regress/t/*.pl \
|
2010-01-20 12:15:51 +00:00
|
|
|
test_regress/t/*.pf \
|
2008-05-08 14:38:07 +00:00
|
|
|
test_regress/t/*.v* \
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
INST_PROJ_FILES = \
|
|
|
|
bin/verilator \
|
2014-11-24 02:06:10 +00:00
|
|
|
bin/verilator_coverage \
|
2018-07-23 00:54:28 +00:00
|
|
|
bin/verilator_gantt \
|
2006-08-26 11:35:28 +00:00
|
|
|
bin/verilator_includer \
|
2008-08-05 13:59:15 +00:00
|
|
|
bin/verilator_profcfunc \
|
2006-08-26 11:35:28 +00:00
|
|
|
include/verilated.mk \
|
2010-03-24 20:09:29 +00:00
|
|
|
include/*.[chv]* \
|
|
|
|
include/vltstd/*.[chv]* \
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
INST_PROJ_BIN_FILES = \
|
2017-10-14 20:01:27 +00:00
|
|
|
bin/verilator_bin \
|
|
|
|
bin/verilator_bin_dbg \
|
|
|
|
bin/verilator_coverage_bin_dbg \
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
DISTFILES := $(DISTFILES_INC)
|
|
|
|
|
2009-12-13 16:46:29 +00:00
|
|
|
ifeq ($(OBJCACHE_JOBS),)
|
|
|
|
ifneq ($(OBJCACHE_HOSTS),)
|
2009-09-24 03:10:09 +00:00
|
|
|
export OBJCACHE_JOBS := -j $(shell objcache --jobs "$(OBJCACHE_HOSTS)")
|
|
|
|
endif
|
2009-12-13 16:46:29 +00:00
|
|
|
endif
|
2009-09-24 03:10:09 +00:00
|
|
|
|
2009-11-02 13:06:04 +00:00
|
|
|
default: all
|
2006-08-26 11:35:28 +00:00
|
|
|
all: all_nomsg msg_test
|
2008-07-14 17:41:00 +00:00
|
|
|
all_nomsg: verilator_exe $(VL_INST_MAN_FILES)
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
.PHONY:verilator_exe
|
2009-11-02 13:06:04 +00:00
|
|
|
.PHONY:verilator_bin
|
|
|
|
.PHONY:verilator_bin_dbg
|
2014-11-24 02:06:10 +00:00
|
|
|
.PHONY:verilator_coverage_bin_dbg
|
|
|
|
verilator_exe verilator_bin verilator_bin_dbg verilator_coverage_bin_dbg:
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo ------------------------------------------------------------
|
|
|
|
@echo "making verilator in src" ; \
|
2009-09-24 03:10:09 +00:00
|
|
|
(cd src && $(MAKE) $(OBJCACHE_JOBS) )
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
.PHONY:msg_test
|
2012-02-17 01:39:13 +00:00
|
|
|
msg_test: all_nomsg
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo "Build complete!"
|
|
|
|
@echo
|
2017-09-24 01:18:07 +00:00
|
|
|
@echo "Now type 'make test' to test."
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo
|
|
|
|
|
2017-09-24 01:18:07 +00:00
|
|
|
.PHONY: test
|
2011-10-07 10:48:40 +00:00
|
|
|
ifeq ($(CFG_WITH_LONGTESTS),yes) # Local... Else don't burden users
|
2017-09-24 01:18:07 +00:00
|
|
|
test: smoke-test examples test_regress
|
2006-08-26 11:35:28 +00:00
|
|
|
else
|
2017-09-24 01:18:07 +00:00
|
|
|
test: smoke-test examples
|
2006-08-26 11:35:28 +00:00
|
|
|
endif
|
|
|
|
@echo "Tests passed!"
|
|
|
|
@echo
|
2017-09-24 01:18:07 +00:00
|
|
|
@echo "Now type 'make install' to install."
|
|
|
|
@echo "Or type 'make' inside an examples subdirectory."
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo
|
|
|
|
|
2017-09-24 01:18:07 +00:00
|
|
|
smoke-test: all_nomsg
|
|
|
|
test_regress/t/t_a_first_cc.pl
|
|
|
|
test_regress/t/t_a_first_sc.pl
|
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
test_regress: all_nomsg
|
|
|
|
@(cd test_regress && $(MAKE))
|
|
|
|
|
2017-09-24 01:18:07 +00:00
|
|
|
examples: all_nomsg
|
|
|
|
for p in examples/* ; do \
|
2017-11-25 20:41:49 +00:00
|
|
|
$(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \
|
2017-09-24 01:18:07 +00:00
|
|
|
done
|
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
info: $(INFOS)
|
|
|
|
|
|
|
|
# Use --no-split to avoid creating filenames > 14 chars.
|
2015-04-09 23:03:01 +00:00
|
|
|
%.1: ${srcdir}/bin/%
|
2014-11-27 16:44:06 +00:00
|
|
|
pod2man $< $@
|
|
|
|
|
2011-10-05 14:47:05 +00:00
|
|
|
verilator.txt: ${srcdir}/bin/verilator
|
2009-11-03 14:22:47 +00:00
|
|
|
$(POD2TEXT) $< $@
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2011-10-05 14:47:05 +00:00
|
|
|
verilator.html: ${srcdir}/bin/verilator
|
2006-08-26 11:35:28 +00:00
|
|
|
pod2html $< >$@
|
|
|
|
|
2011-10-05 13:50:14 +00:00
|
|
|
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
2011-10-05 14:47:05 +00:00
|
|
|
verilator.pdf: ${srcdir}/bin/verilator Makefile
|
|
|
|
pod2latex --full --out verilator.tex ${srcdir}/bin/verilator
|
2012-04-15 18:51:04 +00:00
|
|
|
$(PERL) $(POD2LATEXFIX) "$(DISTTITLE)" "${DISTDATE}" < verilator.tex > verilator2.tex
|
2006-08-26 11:35:28 +00:00
|
|
|
mv verilator2.tex verilator.tex
|
|
|
|
pdflatex verilator.tex
|
|
|
|
pdflatex verilator.tex
|
2008-05-08 14:38:07 +00:00
|
|
|
-rm -f verilator.toc verilator.aux verilator.idx verilator.out
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2015-03-14 17:45:00 +00:00
|
|
|
README: README.pod
|
2009-11-03 14:22:47 +00:00
|
|
|
-rm -f $@
|
|
|
|
$(POD2TEXT) --loose $< > $@
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2015-03-14 17:45:00 +00:00
|
|
|
README.html: README.pod
|
2012-04-15 18:51:04 +00:00
|
|
|
pod2html $< >$@
|
|
|
|
|
|
|
|
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
2015-03-14 17:45:00 +00:00
|
|
|
README.pdf: README.pod Makefile
|
|
|
|
pod2latex --full --out README.tex README.pod
|
2012-04-15 18:51:04 +00:00
|
|
|
$(PERL) $(POD2LATEXFIX) "$(DISTTITLE) README File" "${DISTDATE}" < README.tex > README2.tex
|
|
|
|
mv README2.tex README.tex
|
|
|
|
pdflatex README.tex
|
|
|
|
pdflatex README.tex
|
|
|
|
-rm -f README.toc README.aux README.idx README.out
|
|
|
|
|
2009-11-03 14:22:47 +00:00
|
|
|
internals.txt: internals.pod
|
|
|
|
-rm -f $@
|
|
|
|
$(POD2TEXT) --loose $< > $@
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2012-04-15 18:51:04 +00:00
|
|
|
internals.html: internals.pod
|
|
|
|
pod2html $< >$@
|
|
|
|
|
|
|
|
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
|
|
|
internals.pdf: internals.pod Makefile
|
|
|
|
pod2latex --full --out internals.tex internals.pod
|
|
|
|
$(PERL) $(POD2LATEXFIX) "$(DISTTITLE) Internals Manual" "${DISTDATE}" < internals.tex > internals2.tex
|
|
|
|
mv internals2.tex internals.tex
|
|
|
|
pdflatex internals.tex
|
|
|
|
pdflatex internals.tex
|
|
|
|
-rm -f internals.toc internals.aux internals.idx internals.out
|
|
|
|
|
2010-02-08 14:28:40 +00:00
|
|
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
2014-11-24 02:06:10 +00:00
|
|
|
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg verilator_coverage_bin_dbg \
|
2018-07-23 00:54:28 +00:00
|
|
|
verilator_coverage verilator_gantt verilator_includer verilator_profcfunc
|
2008-07-01 20:10:09 +00:00
|
|
|
# Some scripts go into both the search path and pkgdatadir,
|
|
|
|
# so they can be found by the user, and under $VERILATOR_ROOT.
|
2010-02-08 14:28:40 +00:00
|
|
|
|
|
|
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
2018-07-23 00:54:28 +00:00
|
|
|
VL_INST_MAN_FILES = verilator.1 verilator_coverage.1 verilator_gantt.1 verilator_profcfunc.1
|
2010-02-08 14:28:40 +00:00
|
|
|
|
2010-03-18 00:20:40 +00:00
|
|
|
VL_INST_INC_BLDDIR_FILES = \
|
2016-11-19 02:13:56 +00:00
|
|
|
include/verilated_config.h \
|
2010-03-18 00:20:40 +00:00
|
|
|
include/verilated.mk \
|
|
|
|
|
|
|
|
# Files under srcdir, instead of build time
|
|
|
|
VL_INST_INC_SRCDIR_FILES = \
|
|
|
|
include/*.[chv]* \
|
2010-02-08 14:28:40 +00:00
|
|
|
include/vltstd/*.[chv]* \
|
|
|
|
|
2010-03-18 00:20:40 +00:00
|
|
|
VL_INST_DATA_SRCDIR_FILES = \
|
2017-09-24 01:18:07 +00:00
|
|
|
examples/*/*.[chv]* examples/*/Makefile* \
|
2010-02-08 14:28:40 +00:00
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
installbin:
|
2008-05-07 17:46:33 +00:00
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir)
|
2009-11-25 22:20:28 +00:00
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator )
|
2014-11-24 02:06:10 +00:00
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage )
|
2018-07-23 00:54:28 +00:00
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_gantt $(DESTDIR)$(bindir)/verilator_gantt )
|
2009-11-25 22:20:28 +00:00
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc )
|
2017-10-14 20:01:27 +00:00
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_bin $(DESTDIR)$(bindir)/verilator_bin )
|
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_bin_dbg $(DESTDIR)$(bindir)/verilator_bin_dbg )
|
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg )
|
2008-07-01 20:10:09 +00:00
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/bin
|
2009-11-25 22:20:28 +00:00
|
|
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer )
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2011-10-07 10:48:40 +00:00
|
|
|
# Man files can either be part of the original kit, or built in current directory
|
|
|
|
# So important we use $< so VPATH is searched
|
|
|
|
installman: $(VL_INST_MAN_FILES)
|
2008-05-07 17:46:33 +00:00
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(mandir)/man1
|
2016-11-19 02:13:56 +00:00
|
|
|
cd $(srcdir) \
|
|
|
|
; for p in $(VL_INST_MAN_FILES) ; do \
|
2010-04-10 00:21:00 +00:00
|
|
|
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
|
2006-08-26 11:35:28 +00:00
|
|
|
done
|
|
|
|
|
2008-03-18 20:26:37 +00:00
|
|
|
installdata:
|
2010-02-08 14:28:40 +00:00
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include/vltstd
|
2010-03-18 00:20:40 +00:00
|
|
|
for p in $(VL_INST_INC_BLDDIR_FILES) ; do \
|
2010-04-10 00:21:00 +00:00
|
|
|
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
2010-03-18 00:20:40 +00:00
|
|
|
done
|
|
|
|
cd $(srcdir) \
|
|
|
|
; for p in $(VL_INST_INC_SRCDIR_FILES) ; do \
|
2010-04-10 00:21:00 +00:00
|
|
|
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
2010-02-08 14:28:40 +00:00
|
|
|
done
|
2017-09-24 01:18:07 +00:00
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/hello_world_c
|
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/hello_world_sc
|
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/tracing_c
|
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/tracing_sc
|
2010-03-18 00:20:40 +00:00
|
|
|
cd $(srcdir) \
|
|
|
|
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
|
2017-09-24 01:18:07 +00:00
|
|
|
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
2010-02-08 14:28:40 +00:00
|
|
|
done
|
2015-05-14 01:21:29 +00:00
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgconfigdir)
|
|
|
|
$(INSTALL_DATA) verilator.pc $(DESTDIR)$(pkgconfigdir)
|
2010-02-08 14:28:40 +00:00
|
|
|
|
|
|
|
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
|
|
|
|
uninstall:
|
|
|
|
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_BIN_FILES)
|
|
|
|
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_BIN_FILES)
|
|
|
|
-cd $(DESTDIR)$(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
|
2010-03-18 00:20:40 +00:00
|
|
|
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES)
|
|
|
|
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES)
|
2017-09-24 01:18:07 +00:00
|
|
|
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_DATA_SRCDIR_FILES)
|
2015-05-14 01:21:29 +00:00
|
|
|
-rm $(DESTDIR)$(pkgconfigdir)/verilator.pc
|
2010-02-08 14:28:40 +00:00
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/bin
|
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd
|
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/include
|
2017-09-24 01:18:07 +00:00
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/hello_world_c
|
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/hello_world_sc
|
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/tracing_c
|
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/tracing_sc
|
2010-02-08 14:28:40 +00:00
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples
|
|
|
|
-rmdir $(DESTDIR)$(pkgdatadir)
|
2015-05-14 01:21:29 +00:00
|
|
|
-rmdir $(DESTDIR)$(pkgconfigdir)
|
2010-02-08 14:28:40 +00:00
|
|
|
|
2011-12-15 23:39:51 +00:00
|
|
|
install: all_nomsg install-all
|
|
|
|
install-all: installbin installman installdata install-msg
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
install-here: installman ftp
|
|
|
|
|
|
|
|
ifeq ($(VERILATOR_AUTHOR_SITE),1) # Local... Else don't burden users
|
2011-10-07 10:48:40 +00:00
|
|
|
DISTNAMEREV = $(shell sed -e '/DTVERSION/!d' -e 's/.*verilator_\([^"]*\).*/\1/' -e q ${srcdir}/src/config_rev.h)
|
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
DIRPROJECT := $(shell project_dir --project)
|
2010-03-24 20:09:29 +00:00
|
|
|
VERILATOR_CAD_DIR = $(CAD_DIR)/verilator/$(DISTNAMEREV)/$(DIRPROJECT_ARCH)
|
2006-08-26 11:35:28 +00:00
|
|
|
INST_PROJ_CVS = cp_if_cvs_diff
|
|
|
|
|
|
|
|
install-project: dist
|
|
|
|
@echo "Install-project to $(DIRPROJECT)"
|
2017-10-14 20:01:27 +00:00
|
|
|
strip bin/verilator_bin*
|
|
|
|
strip bin/verilator_coverage_bin*
|
2006-08-26 11:35:28 +00:00
|
|
|
$(MAKE) install-project-quick
|
2011-10-07 10:48:40 +00:00
|
|
|
for p in $(VL_INST_MAN_FILES) ; do \
|
2010-04-10 00:21:00 +00:00
|
|
|
$(INSTALL_DATA) $$p $(DIRPROJECT_PREFIX)/man/man1/$$p; \
|
2006-08-26 11:35:28 +00:00
|
|
|
done
|
2008-05-08 14:38:07 +00:00
|
|
|
$(INST_PROJ_CVS) $(DISTNAME).tgz $(DIRPROJECT)/hw/utils/verilator/verilator.tgz
|
|
|
|
rm $(DISTNAME).tgz
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
install-project-quick:
|
2009-06-21 17:17:12 +00:00
|
|
|
ifeq ($(CFG_WITH_DEFENV),yes)
|
|
|
|
@echo "%Error: Reconfigure with './configure --disable-defenv' to avoid hardcoded paths."
|
|
|
|
false
|
|
|
|
endif
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo "Install-project-quick (no strip) to $(DIRPROJECT)"
|
|
|
|
for p in $(INST_PROJ_FILES) ; do \
|
|
|
|
$(INST_PROJ_CVS) $$p $(DIRPROJECT)/hw/utils/verilator/$$p; \
|
|
|
|
done
|
|
|
|
for p in $(INST_PROJ_BIN_FILES) ; do \
|
|
|
|
$(INST_PROJ_CVS) $$p $(DIRPROJECT)/hw/utils/verilator/$$p-$(DIRPROJECT_ARCH); \
|
|
|
|
done
|
2010-03-24 20:09:29 +00:00
|
|
|
|
|
|
|
install-cadtools: dist
|
|
|
|
@echo "Install-project to $(CAD_DIR)"
|
2017-10-14 20:01:27 +00:00
|
|
|
strip bin/verilator_bin*
|
|
|
|
strip bin/verilator_coverage_bin*
|
2010-03-24 20:09:29 +00:00
|
|
|
$(MAKE) install-cadtools-quick
|
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(VERILATOR_CAD_DIR)/man/man1
|
2011-10-07 10:48:40 +00:00
|
|
|
for p in $(VL_INST_MAN_FILES) ; do \
|
2010-04-10 00:21:00 +00:00
|
|
|
$(INSTALL_DATA) $$p $(VERILATOR_CAD_DIR)/man/man1/$$p; \
|
2010-03-24 20:09:29 +00:00
|
|
|
done
|
|
|
|
$(INST_PROJ_CVS) $(DISTNAME).tgz $(VERILATOR_CAD_DIR)/verilator.tgz
|
|
|
|
rm $(DISTNAME).tgz
|
|
|
|
|
|
|
|
install-cadtools-quick:
|
|
|
|
ifeq ($(CFG_WITH_DEFENV),yes)
|
|
|
|
@echo "%Error: Reconfigure with './configure --disable-defenv' to avoid hardcoded paths."
|
|
|
|
false
|
|
|
|
endif
|
|
|
|
@echo "Install-cadtools-quick (no strip) to $(VERILATOR_CAD_DIR)"
|
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(VERILATOR_CAD_DIR)/include/vltstd
|
|
|
|
$(SHELL) ${srcdir}/mkinstalldirs $(VERILATOR_CAD_DIR)/bin
|
|
|
|
for p in $(INST_PROJ_FILES) ; do \
|
|
|
|
$(INST_PROJ_CVS) $$p $(VERILATOR_CAD_DIR)/$$p; \
|
|
|
|
done
|
|
|
|
for p in $(INST_PROJ_BIN_FILES) ; do \
|
|
|
|
$(INST_PROJ_CVS) $$p $(VERILATOR_CAD_DIR)/$$p; \
|
|
|
|
done
|
|
|
|
|
|
|
|
# VERILATOR_AUTHOR_SITE
|
2006-08-26 11:35:28 +00:00
|
|
|
endif
|
|
|
|
|
2013-02-03 18:27:37 +00:00
|
|
|
# Use --xml flag to see the cppcheck code to use for suppression
|
2014-04-30 02:59:38 +00:00
|
|
|
CPPCHECK = src/cppcheck_filtered
|
2015-02-10 02:05:27 +00:00
|
|
|
CPPCHECK_FLAGS = --enable=all --inline-suppr \
|
|
|
|
--suppress=unusedScopedObject --suppress=cstyleCast --suppress=useInitializationList
|
2013-02-03 18:27:37 +00:00
|
|
|
CPPCHECK_FLAGS += --xml
|
2011-08-05 01:58:45 +00:00
|
|
|
CPPCHECK_CPP = $(wildcard $(srcdir)/include/*.cpp $(srcdir)/src/*.cpp)
|
|
|
|
CPPCHECK_DEP = $(subst .cpp,.cppcheck,$(CPPCHECK_CPP))
|
2013-02-03 18:27:37 +00:00
|
|
|
CPPCHECK_INC = -I$(srcdir)/include -I$(srcdir)/src/obj_dbg -I$(srcdir)/src
|
2011-08-05 01:58:45 +00:00
|
|
|
|
|
|
|
cppcheck: $(CPPCHECK_DEP)
|
|
|
|
%.cppcheck: %.cpp
|
2017-10-14 18:51:57 +00:00
|
|
|
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $<
|
2011-08-05 01:58:45 +00:00
|
|
|
|
2017-11-25 20:41:49 +00:00
|
|
|
analyzer-src:
|
|
|
|
-rm -rf src/obj_dbg
|
|
|
|
scan-build $(MAKE) -k verilator_coverage_bin_dbg verilator_bin_dbg
|
|
|
|
|
|
|
|
analyzer-include:
|
|
|
|
-rm -rf examples/*/obj*
|
|
|
|
scan-build $(MAKE) -k examples
|
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
ftp: info
|
|
|
|
|
|
|
|
install-msg:
|
2017-10-14 20:01:27 +00:00
|
|
|
@echo
|
|
|
|
@echo "Installed binaries to $(DESTDIR)$(bindir)/verilator"
|
|
|
|
@echo "Installed man to $(DESTDIR)$(mandir)/man1"
|
|
|
|
@echo "Installed examples to $(DESTDIR)$(pkgdatadir)/examples"
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo
|
2015-05-16 22:08:20 +00:00
|
|
|
@echo "For documentation see 'man verilator' or 'verilator --help'"
|
2010-03-18 00:20:40 +00:00
|
|
|
@echo "For forums and to report bugs see http://www.veripool.org/verilator"
|
2006-08-26 11:35:28 +00:00
|
|
|
@echo
|
|
|
|
|
2010-02-15 12:34:55 +00:00
|
|
|
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2010-02-15 12:34:55 +00:00
|
|
|
# autoheader might not change config_build.h.in, so touch it
|
|
|
|
${srcdir}/config_build.h: ${srcdir}/config_build.h.in configure
|
2006-08-26 11:35:28 +00:00
|
|
|
cd ${srcdir} && autoheader
|
2010-02-15 12:34:55 +00:00
|
|
|
touch $@
|
|
|
|
Makefile: Makefile.in config.status $(IN_WILD)
|
2006-08-26 11:35:28 +00:00
|
|
|
./config.status
|
2010-02-15 12:34:55 +00:00
|
|
|
src/Makefile: src/Makefile.in Makefile
|
2006-08-26 11:35:28 +00:00
|
|
|
config.status: configure
|
|
|
|
./config.status --recheck
|
2011-10-04 14:07:46 +00:00
|
|
|
|
2006-12-15 21:18:41 +00:00
|
|
|
configure: configure.ac
|
2011-10-07 10:48:40 +00:00
|
|
|
ifeq ($(CFG_WITH_CCWARN),yes) # Local... Else don't burden users
|
2011-10-04 14:07:46 +00:00
|
|
|
autoconf --warnings=all
|
|
|
|
else
|
2006-08-26 11:35:28 +00:00
|
|
|
autoconf
|
2011-10-04 14:07:46 +00:00
|
|
|
endif
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
maintainer-clean::
|
|
|
|
@echo "This command is intended for maintainers to use;"
|
|
|
|
@echo "rebuilding the deleted files requires makeinfo."
|
2017-09-24 01:18:07 +00:00
|
|
|
rm -f *.info* *.1 $(INFOS) configure
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
clean mostlyclean distclean maintainer-clean maintainer-copy::
|
|
|
|
for dir in $(SUBDIRS); do \
|
|
|
|
echo making $@ in $$dir ; \
|
|
|
|
(cd $$dir && $(MAKE) $@) ; \
|
|
|
|
done
|
|
|
|
|
|
|
|
clean mostlyclean distclean maintainer-clean::
|
2008-06-10 01:25:10 +00:00
|
|
|
rm -f $(SCRIPTS) *.tmp
|
2006-08-26 11:35:28 +00:00
|
|
|
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
|
|
|
|
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.idx
|
|
|
|
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
|
|
|
|
rm -f *.tex
|
2017-09-24 01:18:07 +00:00
|
|
|
rm -rf test_*/obj_dir
|
|
|
|
rm -rf examples/*/obj_dir examples/*/logs
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
distclean maintainer-clean::
|
2014-11-24 02:06:10 +00:00
|
|
|
rm -f Makefile config.status config.cache config.log TAGS
|
|
|
|
rm -f verilator_bin* verilator_coverage_bin*
|
2017-10-14 20:01:27 +00:00
|
|
|
rm -f bin/verilator_bin* bin/verilator_coverage_bin*
|
2013-01-18 02:40:37 +00:00
|
|
|
rm -f include/verilated.mk include/verilated_config.h
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2012-04-20 01:00:58 +00:00
|
|
|
TAGFILES=${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
|
|
|
|
${srcdir}/*.in ${srcdir}/*.pod
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
TAGS: $(TAGFILES)
|
|
|
|
etags $(TAGFILES)
|
|
|
|
|
2012-04-15 19:44:32 +00:00
|
|
|
.PHONY: doxygen
|
|
|
|
|
|
|
|
doxygen:
|
|
|
|
$(DOXYGEN) doxygen.config
|
|
|
|
|
2008-05-08 14:38:07 +00:00
|
|
|
######################################################################
|
|
|
|
# Test targets
|
|
|
|
|
|
|
|
dist-file-list:
|
2008-05-08 15:18:42 +00:00
|
|
|
@echo "begin-dist-file-list:"; # Scripts look for this
|
2008-05-08 14:38:07 +00:00
|
|
|
@echo $(wildcard $(DISTFILES))
|
2008-05-08 15:18:42 +00:00
|
|
|
@echo "end-dist-file-list:"; # Scripts look for this
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2017-10-27 01:48:45 +00:00
|
|
|
print-cfg-with-threaded:
|
|
|
|
@echo $(CFG_WITH_THREADED)
|
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
######################################################################
|
|
|
|
# Distributions
|
|
|
|
|
2011-10-21 01:13:33 +00:00
|
|
|
DISTTITLE := Verilator $(word 1,$(PACKAGE_VERSION))
|
2011-10-07 10:48:40 +00:00
|
|
|
DISTNAME := verilator-$(word 1,$(PACKAGE_VERSION))
|
2011-10-21 01:13:33 +00:00
|
|
|
DISTDATEPRE := $(word 2,$(PACKAGE_VERSION))
|
|
|
|
DISTDATE := $(subst /,-,$(DISTDATEPRE))
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
DISTTAGNAME := $(subst .,_,$(subst -,_,$(DISTNAME)))
|
|
|
|
|
|
|
|
tag:
|
|
|
|
svnorcvs tag $(DISTTAGNAME)
|
|
|
|
|
|
|
|
# Don't depend on DISTFILES because there's no rule for "standards.info*".
|
|
|
|
dist: $(DISTDEP) maintainer-copy
|
|
|
|
-rm -fr $(DISTNAME)
|
|
|
|
for file in $(DISTFILES); do \
|
|
|
|
mkdir -p `dirname $(DISTNAME)/$$file` >/dev/null ; \
|
|
|
|
ln $$file $(DISTNAME)/$$file \
|
|
|
|
|| { echo copying $$file instead; cp -p $$file $(DISTNAME)/$$file;}; \
|
|
|
|
done; true;
|
|
|
|
chmod -R a+r $(DISTNAME)
|
|
|
|
tar chf $(DISTNAME).tar $(DISTNAME)
|
|
|
|
gzip --force --best $(DISTNAME).tar
|
2008-05-08 16:34:15 +00:00
|
|
|
mv $(DISTNAME).tar.gz $(DISTNAME).tgz
|
2006-08-26 11:35:28 +00:00
|
|
|
rm -fr $(DISTNAME)
|
|
|
|
|
|
|
|
maintainer-diff:
|
|
|
|
svnorcvs diff $(DISTTAGNAME)
|
|
|
|
|
|
|
|
preexist:
|
2008-05-07 18:32:00 +00:00
|
|
|
svnorcvs nexists $(DISTTAGNAME)
|
2006-08-26 11:35:28 +00:00
|
|
|
|
|
|
|
maintainer-dist: preexist dist tag
|
2008-05-08 14:38:07 +00:00
|
|
|
svnorcvs release $(DISTNAME).tgz
|