2008-06-10 03:25:10 +02:00
|
|
|
# -*- Makefile -*-
|
2006-08-26 13:35:28 +02:00
|
|
|
#*****************************************************************************
|
|
|
|
|
#
|
|
|
|
|
# DESCRIPTION: Verilator: Makefile for verilog source
|
|
|
|
|
#
|
2019-11-08 04:33:59 +01:00
|
|
|
# Code available from: https://verilator.org
|
2006-08-26 13:35:28 +02:00
|
|
|
#
|
|
|
|
|
#*****************************************************************************
|
|
|
|
|
#
|
2021-01-01 16:29:54 +01:00
|
|
|
# Copyright 2003-2021 by Wilson Snyder. This program is free software; you
|
2020-03-21 16:24:24 +01:00
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 23:07:57 +02:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
|
# Version 2.0.
|
2020-03-21 16:24:24 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2006-08-26 13:35:28 +02:00
|
|
|
#
|
|
|
|
|
#****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
|
|
2009-11-25 23:20:28 +01:00
|
|
|
# Unfortunately configure uses relative paths, and this makefile is called
|
|
|
|
|
# from a level lower, so we need to move up if it's relative, not if absolute.
|
|
|
|
|
config_srcdir = @srcdir@
|
|
|
|
|
ifeq ($(config_srcdir),.)
|
|
|
|
|
srcdir = ..
|
|
|
|
|
else # Run an experiment
|
2012-02-16 13:17:08 +01:00
|
|
|
ifeq ($(wildcard $(config_srcdir)/../Makefile_obj.in),)
|
2009-11-25 23:20:28 +01:00
|
|
|
srcdir = $(config_srcdir)
|
|
|
|
|
else
|
|
|
|
|
srcdir = $(config_srcdir)/..
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
incdir = $(srcdir)/../include
|
|
|
|
|
# Bldsrc may differ from srcdir if configure wan't run from the kit top
|
|
|
|
|
bldsrc = ..
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2008-06-24 20:50:34 +02:00
|
|
|
# Programs
|
2006-08-26 13:35:28 +02:00
|
|
|
CC = @CC@
|
|
|
|
|
CXX = @CXX@
|
|
|
|
|
LINK = @CXX@
|
2008-06-24 20:50:34 +02:00
|
|
|
LEX = @LEX@
|
|
|
|
|
LFLAGS = -d
|
|
|
|
|
PERL = @PERL@
|
2020-12-23 21:41:14 +01:00
|
|
|
PYTHON3 = @PYTHON3@
|
2008-06-24 20:50:34 +02:00
|
|
|
YACC = @YACC@
|
2020-04-05 22:10:33 +02:00
|
|
|
OBJCACHE ?= @OBJCACHE@
|
2008-03-18 21:26:37 +01:00
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
|
|
2008-04-29 16:14:20 +02:00
|
|
|
# Directory in which to install data across multiple architectures
|
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
|
|
2008-03-18 21:26:37 +01:00
|
|
|
# Directory in which to install package specific files
|
|
|
|
|
# Generally ${prefix}/share/verilator
|
|
|
|
|
pkgdatadir = @pkgdatadir@
|
|
|
|
|
|
2008-06-24 20:50:34 +02:00
|
|
|
# Compile options
|
2011-10-07 12:48:40 +02:00
|
|
|
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
|
2008-06-24 20:50:34 +02:00
|
|
|
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
2011-08-23 03:02:09 +02:00
|
|
|
CPPFLAGS += @CPPFLAGS@
|
2019-07-06 19:02:36 +02:00
|
|
|
CFLAGS += @CFLAGS@
|
|
|
|
|
CXXFLAGS += @CXXFLAGS@
|
2008-06-24 20:50:34 +02:00
|
|
|
LDFLAGS += @LDFLAGS@
|
2011-10-05 23:07:10 +02:00
|
|
|
EXEEXT = @EXEEXT@
|
2015-02-11 04:38:05 +01:00
|
|
|
CFG_CXXFLAGS_SRC = @CFG_CXXFLAGS_SRC@
|
|
|
|
|
CFG_CXXFLAGS_PARSER = @CFG_CXXFLAGS_PARSER@
|
2017-09-15 05:28:02 +02:00
|
|
|
# Compiler flags that turn on extra warnings
|
|
|
|
|
CFG_CXXFLAGS_WEXTRA = @CFG_CXXFLAGS_WEXTRA@
|
2020-02-01 01:13:55 +01:00
|
|
|
CFG_LDFLAGS_SRC = @CFG_LDFLAGS_SRC@
|
2020-01-23 23:32:19 +01:00
|
|
|
CFG_LIBS = @CFG_LIBS@
|
2008-06-24 20:50:34 +02:00
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
#### End of system configuration section. ####
|
|
|
|
|
|
2009-11-25 23:20:28 +01:00
|
|
|
VPATH += . $(bldsrc) $(srcdir)
|
2021-06-04 18:04:55 +02:00
|
|
|
TGT = ../../verilator_bin$(EXEEXT)
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
#################
|
|
|
|
|
ifeq ($(VL_DEBUG),)
|
|
|
|
|
# Optimize
|
2021-06-12 21:46:08 +02:00
|
|
|
CPPFLAGS += -O2
|
2006-08-26 13:35:28 +02:00
|
|
|
else
|
|
|
|
|
# Debug
|
2021-06-12 21:46:08 +02:00
|
|
|
CPPFLAGS += @CFG_CXXFLAGS_DEBUG@ -DVL_DEBUG -D_GLIBCXX_DEBUG
|
|
|
|
|
LDFLAGS += @CFG_LDFLAGS_DEBUG@
|
2006-08-26 13:35:28 +02:00
|
|
|
endif
|
|
|
|
|
#################
|
|
|
|
|
|
|
|
|
|
#LIBS += -ldl
|
|
|
|
|
#CCMALLOC = /usr/local/lib/ccmalloc-gcc.o -lccmalloc -ldl
|
|
|
|
|
|
2010-02-01 12:37:39 +01:00
|
|
|
# -lfl not needed as Flex invoked with %nowrap option
|
2020-02-01 01:13:55 +01:00
|
|
|
LIBS = $(CFG_LIBS) -lm
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2011-08-23 03:02:09 +02:00
|
|
|
CPPFLAGS += -MMD
|
2018-08-25 13:55:48 +02:00
|
|
|
CPPFLAGS += -I. -I$(bldsrc) -I$(srcdir) -I$(incdir) -I../../include
|
2011-08-23 03:02:09 +02:00
|
|
|
#CPPFLAGS += -DVL_LEAK_CHECKS # If running valgrind or other hunting tool
|
|
|
|
|
CPPFLAGS += -MP # Only works on recent GCC versions
|
2011-10-07 12:48:40 +02:00
|
|
|
ifeq ($(CFG_WITH_CCWARN),yes) # Local... Else don't burden users
|
2017-09-15 05:28:02 +02:00
|
|
|
CPPFLAGS += -W -Wall $(CFG_CXXFLAGS_WEXTRA) $(CFG_CXXFLAGS_SRC) -Werror
|
2006-08-26 13:35:28 +02:00
|
|
|
#CPPFLAGS += -pedantic-errors
|
2016-05-17 03:40:49 +02:00
|
|
|
else
|
|
|
|
|
CPPFLAGS += $(CFG_CXXFLAGS_SRC)
|
2006-08-26 13:35:28 +02:00
|
|
|
endif
|
2020-02-01 01:13:55 +01:00
|
|
|
LDFLAGS += $(CFG_LDFLAGS_SRC)
|
2017-11-02 23:02:11 +01:00
|
|
|
|
2011-08-23 03:02:09 +02:00
|
|
|
CPPFLAGSWALL = $(CPPFLAGS)
|
2015-02-11 04:38:05 +01:00
|
|
|
CPPFLAGSPARSER = $(CPPFLAGS) $(CFG_CXXFLAGS_PARSER)
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2008-03-18 21:26:37 +01:00
|
|
|
# Allow RPM builds to specify hardcoded data directories
|
|
|
|
|
# To do this:
|
2008-03-28 20:42:14 +01:00
|
|
|
ifeq ($(CFG_WITH_DEFENV),yes)
|
2008-03-18 21:26:37 +01:00
|
|
|
CPPFLAGS += -DDEFENV_SYSTEMC=\"$(SYSTEMC)\"
|
|
|
|
|
CPPFLAGS += -DDEFENV_SYSTEMC_ARCH=\"$(SYSTEMC_ARCH)\"
|
2012-01-20 02:30:41 +01:00
|
|
|
CPPFLAGS += -DDEFENV_SYSTEMC_INCLUDE=\"$(SYSTEMC_INCLUDE)\"
|
|
|
|
|
CPPFLAGS += -DDEFENV_SYSTEMC_LIBDIR=\"$(SYSTEMC_LIBDIR)\"
|
2008-03-18 21:26:37 +01:00
|
|
|
ifeq ($(VERILATOR_ROOT),) # Use what we're given, or intuit
|
|
|
|
|
CPPFLAGS += -DDEFENV_VERILATOR_ROOT=\"$(pkgdatadir)\"
|
|
|
|
|
else
|
|
|
|
|
CPPFLAGS += -DDEFENV_VERILATOR_ROOT=\"$(VERILATOR_ROOT)\"
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
HEADERS = $(wildcard V*.h v*.h)
|
|
|
|
|
|
|
|
|
|
ASTGEN = $(srcdir)/astgen
|
2008-08-06 18:35:34 +02:00
|
|
|
BISONPRE = $(srcdir)/bisonpre
|
2010-02-27 01:50:44 +01:00
|
|
|
FLEXFIX = $(srcdir)/flexfix
|
2014-11-24 03:06:10 +01:00
|
|
|
VLCOVGEN = $(srcdir)/vlcovgen
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
#### Top level
|
|
|
|
|
|
|
|
|
|
all: make_info $(TGT)
|
|
|
|
|
|
|
|
|
|
make_info:
|
2019-07-06 19:02:36 +02:00
|
|
|
@echo " Compile flags: " $(CXX) ${CFLAGS} ${CXXFLAGS} ${CPPFLAGS}
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
clean mostlyclean distclean maintainer-clean::
|
2020-12-23 21:41:14 +01:00
|
|
|
-rm -f *.o *.d *_gen_*
|
2006-08-26 13:35:28 +02:00
|
|
|
-rm -f *__gen*
|
|
|
|
|
-rm -f obj_* .objcache*
|
|
|
|
|
|
|
|
|
|
distclean maintainer-clean:: clean
|
|
|
|
|
|
|
|
|
|
maintainer-clean::
|
|
|
|
|
|
|
|
|
|
maintainer-copy::
|
|
|
|
|
|
|
|
|
|
#### Top executable
|
|
|
|
|
|
|
|
|
|
RAW_OBJS = \
|
|
|
|
|
Verilator.o \
|
|
|
|
|
V3Active.o \
|
|
|
|
|
V3ActiveTop.o \
|
|
|
|
|
V3Assert.o \
|
|
|
|
|
V3AssertPre.o \
|
|
|
|
|
V3Ast.o \
|
|
|
|
|
V3AstNodes.o \
|
|
|
|
|
V3Begin.o \
|
|
|
|
|
V3Branch.o \
|
|
|
|
|
V3Broken.o \
|
2016-10-23 20:27:57 +02:00
|
|
|
V3CCtors.o \
|
2020-02-01 22:45:11 +01:00
|
|
|
V3CUse.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Case.o \
|
|
|
|
|
V3Cast.o \
|
2010-01-07 22:41:19 +01:00
|
|
|
V3Cdc.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Changed.o \
|
2020-04-05 15:30:23 +02:00
|
|
|
V3Class.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Clean.o \
|
|
|
|
|
V3Clock.o \
|
|
|
|
|
V3Combine.o \
|
2021-07-20 17:40:38 +02:00
|
|
|
V3Common.o \
|
2010-01-21 12:11:30 +01:00
|
|
|
V3Config.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Const__gen.o \
|
|
|
|
|
V3Coverage.o \
|
2008-12-12 21:34:02 +01:00
|
|
|
V3CoverageJoin.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Dead.o \
|
|
|
|
|
V3Delayed.o \
|
|
|
|
|
V3Depth.o \
|
2007-04-19 20:20:16 +02:00
|
|
|
V3DepthBlock.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Descope.o \
|
2021-05-21 02:41:46 +02:00
|
|
|
V3DupFinder.o \
|
2021-06-24 17:58:30 +02:00
|
|
|
V3EmitCBase.o \
|
2021-06-13 16:05:55 +02:00
|
|
|
V3EmitCConstPool.o \
|
2021-06-24 18:35:12 +02:00
|
|
|
V3EmitCFunc.o \
|
2021-07-07 20:16:40 +02:00
|
|
|
V3EmitCHeaders.o \
|
|
|
|
|
V3EmitCImp.o \
|
2007-11-30 23:38:21 +01:00
|
|
|
V3EmitCInlines.o \
|
2020-04-22 02:45:23 +02:00
|
|
|
V3EmitCMain.o \
|
Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.
Please see the updated documentation for the model interface changes.
2021-06-21 16:30:20 +02:00
|
|
|
V3EmitCMake.o \
|
|
|
|
|
V3EmitCModel.o \
|
|
|
|
|
V3EmitCSyms.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3EmitMk.o \
|
|
|
|
|
V3EmitV.o \
|
2012-03-20 21:13:10 +01:00
|
|
|
V3EmitXml.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Error.o \
|
|
|
|
|
V3Expand.o \
|
|
|
|
|
V3File.o \
|
2014-11-22 17:48:39 +01:00
|
|
|
V3FileLine.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Gate.o \
|
|
|
|
|
V3GenClk.o \
|
2020-01-19 13:23:26 +01:00
|
|
|
V3Global.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Graph.o \
|
|
|
|
|
V3GraphAlg.o \
|
|
|
|
|
V3GraphAcyc.o \
|
2018-07-16 04:09:27 +02:00
|
|
|
V3GraphPathChecker.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3GraphTest.o \
|
2021-05-21 15:34:27 +02:00
|
|
|
V3Hash.o \
|
2021-05-21 02:41:46 +02:00
|
|
|
V3Hasher.o \
|
2020-08-15 15:43:53 +02:00
|
|
|
V3HierBlock.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Inline.o \
|
|
|
|
|
V3Inst.o \
|
2018-07-05 03:52:15 +02:00
|
|
|
V3InstrCount.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Life.o \
|
|
|
|
|
V3LifePost.o \
|
|
|
|
|
V3LinkCells.o \
|
|
|
|
|
V3LinkDot.o \
|
2010-02-14 16:01:21 +01:00
|
|
|
V3LinkJump.o \
|
2020-05-29 00:08:15 +02:00
|
|
|
V3LinkInc.o \
|
2006-12-21 15:35:19 +01:00
|
|
|
V3LinkLValue.o \
|
2010-02-14 16:01:21 +01:00
|
|
|
V3LinkLevel.o \
|
2006-12-21 22:53:51 +01:00
|
|
|
V3LinkParse.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3LinkResolve.o \
|
|
|
|
|
V3Localize.o \
|
2020-05-30 22:09:05 +02:00
|
|
|
V3MergeCond.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Name.o \
|
|
|
|
|
V3Number.o \
|
2021-05-03 23:30:18 +02:00
|
|
|
V3OptionParser.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Options.o \
|
|
|
|
|
V3Order.o \
|
2015-02-27 02:40:45 +01:00
|
|
|
V3Os.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Param.o \
|
2018-07-23 02:54:28 +02:00
|
|
|
V3Partition.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3PreShell.o \
|
|
|
|
|
V3Premit.o \
|
2019-10-09 12:47:26 +02:00
|
|
|
V3ProtectLib.o \
|
2020-12-07 23:55:22 +01:00
|
|
|
V3Randomize.o \
|
2018-06-23 23:07:22 +02:00
|
|
|
V3Reloop.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Scope.o \
|
2018-07-16 04:09:27 +02:00
|
|
|
V3Scoreboard.o \
|
2010-01-19 16:52:11 +01:00
|
|
|
V3Slice.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Split.o \
|
2007-01-18 01:51:26 +01:00
|
|
|
V3SplitAs.o \
|
2020-02-29 01:15:08 +01:00
|
|
|
V3SplitVar.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Stats.o \
|
|
|
|
|
V3StatsReport.o \
|
2012-08-27 03:13:47 +02:00
|
|
|
V3String.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Subst.o \
|
|
|
|
|
V3Table.o \
|
|
|
|
|
V3Task.o \
|
|
|
|
|
V3Trace.o \
|
|
|
|
|
V3TraceDecl.o \
|
2009-01-06 17:03:57 +01:00
|
|
|
V3Tristate.o \
|
2018-06-18 03:06:11 +02:00
|
|
|
V3TSP.o \
|
2010-12-29 14:06:05 +01:00
|
|
|
V3Undriven.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Unknown.o \
|
|
|
|
|
V3Unroll.o \
|
Add V3VariableOrder pass
A separate V3VariableOrder pass is now used to order module variables
before Emit. All variables are now ordered together, without
consideration for whether they are ports, signals form the design, or
additional internal variables added by Verilator (which used to be
ordered and emitted as separate groups in Emit). For single threaded
models, this is performance neutral. For multi-threaded models, the
MTask affinity based sorting was slightly modified, so variables with no
MTask affinity are emitted last, otherwise the MTask affinity sets are
sorted using the TSP sorter as before, but again, ports, signals, and
internal variables are not differentiated. This yields a 2%+ speedup for
the multithreaded model on OpenTitan.
2021-06-29 18:57:07 +02:00
|
|
|
V3VariableOrder.o \
|
2020-05-26 20:38:14 +02:00
|
|
|
V3Waiver.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Width.o \
|
2009-10-25 21:53:55 +01:00
|
|
|
V3WidthSel.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
# Non-concatable
|
2014-11-24 03:06:10 +01:00
|
|
|
NC_OBJS += \
|
2009-10-31 15:08:38 +01:00
|
|
|
V3ParseImp.o \
|
|
|
|
|
V3ParseGrammar.o \
|
|
|
|
|
V3ParseLex.o \
|
2006-08-26 13:35:28 +02:00
|
|
|
V3PreProc.o \
|
|
|
|
|
|
2014-11-24 03:06:10 +01:00
|
|
|
# verilator_coverage
|
|
|
|
|
VLCOV_OBJS = \
|
|
|
|
|
VlcMain.o \
|
|
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
#### Linking
|
|
|
|
|
|
2014-11-24 03:06:10 +01:00
|
|
|
ifeq ($(VL_VLCOV),)
|
|
|
|
|
PREDEP_H = V3Ast__gen_classes.h
|
|
|
|
|
OBJS += $(RAW_OBJS) $(NC_OBJS)
|
2006-08-26 13:35:28 +02:00
|
|
|
else
|
2014-11-24 03:06:10 +01:00
|
|
|
PREDEP_H =
|
|
|
|
|
OBJS += $(VLCOV_OBJS)
|
2006-08-26 13:35:28 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
V3__CONCAT.cpp: $(addsuffix .cpp, $(basename $(RAW_OBJS)))
|
|
|
|
|
$(PERL) $(srcdir)/../bin/verilator_includer $^ > $@
|
|
|
|
|
|
2014-11-24 03:06:10 +01:00
|
|
|
$(TGT): $(PREDEP_H) $(OBJS)
|
2006-08-26 13:35:28 +02:00
|
|
|
@echo " Linking $@..."
|
|
|
|
|
${LINK} ${LDFLAGS} -o $@ $(OBJS) $(CCMALLOC) ${LIBS}
|
|
|
|
|
|
|
|
|
|
V3Number_test: V3Number_test.o
|
|
|
|
|
${LINK} ${LDFLAGS} -o $@ $^ ${LIBS}
|
|
|
|
|
|
|
|
|
|
#### Modules
|
|
|
|
|
|
2008-11-22 23:37:20 +01:00
|
|
|
%__gen.cpp: %.cpp $(ASTGEN) V3Ast.h V3AstNodes.h
|
2021-01-16 19:57:56 +01:00
|
|
|
$(PYTHON3) $(ASTGEN) -I $(srcdir) $*.cpp
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
%.o: %.cpp
|
2020-05-28 23:39:20 +02:00
|
|
|
$(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} -c $< -o $@
|
2006-08-26 13:35:28 +02:00
|
|
|
%.o: %.c
|
2020-05-28 23:39:20 +02:00
|
|
|
$(OBJCACHE) ${CC} ${CFLAGS} ${CPPFLAGSWALL} -c $< -o $@
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2009-10-31 15:08:38 +01:00
|
|
|
V3ParseLex.o: V3ParseLex.cpp V3Lexer.yy.cpp V3ParseBison.c
|
2020-05-28 23:39:20 +02:00
|
|
|
$(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSPARSER} -c $< -o $@
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2009-10-31 15:08:38 +01:00
|
|
|
V3ParseGrammar.o: V3ParseGrammar.cpp V3ParseBison.c
|
2020-05-28 23:39:20 +02:00
|
|
|
$(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSPARSER} -c $< -o $@
|
2009-10-31 15:08:38 +01:00
|
|
|
|
|
|
|
|
V3ParseImp.o: V3ParseImp.cpp V3ParseBison.c
|
2020-05-28 23:39:20 +02:00
|
|
|
$(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSPARSER} -c $< -o $@
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
V3PreProc.o: V3PreProc.cpp V3PreLex.yy.cpp
|
2020-05-28 23:39:20 +02:00
|
|
|
$(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSPARSER} -c $< -o $@
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
#### Generated files
|
|
|
|
|
|
|
|
|
|
# Target rule called before parallel build to make generated files
|
2009-05-05 03:54:44 +02:00
|
|
|
serial:: V3Ast__gen_classes.h V3ParseBison.c
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2014-11-24 03:06:10 +01:00
|
|
|
serial_vlcov:: vlcovgen.d
|
|
|
|
|
|
2016-11-19 03:13:56 +01:00
|
|
|
vlcovgen.d: $(VLCOVGEN) $(srcdir)/../include/verilated_cov_key.h
|
2021-01-28 21:01:33 +01:00
|
|
|
$(PYTHON3) $(VLCOVGEN) --srcdir $(srcdir)
|
2014-11-24 03:06:10 +01:00
|
|
|
touch $@
|
|
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
V3Ast__gen_classes.h : $(ASTGEN) V3Ast.h V3AstNodes.h
|
2021-01-16 20:14:39 +01:00
|
|
|
$(PYTHON3) $(ASTGEN) -I $(srcdir) --classes
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2009-05-05 03:54:44 +02:00
|
|
|
V3ParseBison.h: V3ParseBison.c
|
2008-05-06 17:45:41 +02:00
|
|
|
|
|
|
|
|
# Have only one output file in this rule to prevent parallel make issues
|
2009-05-08 00:28:05 +02:00
|
|
|
V3ParseBison.c: verilog.y $(BISONPRE)
|
2006-08-26 13:35:28 +02:00
|
|
|
@echo "If you get errors from verilog.y below, try upgrading bison to version 1.875 or newer."
|
2021-01-11 04:53:59 +01:00
|
|
|
$(PYTHON3) $(BISONPRE) --yacc ${YACC} -d -v -o V3ParseBison.c $<
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2009-05-05 03:54:44 +02:00
|
|
|
V3Lexer_pregen.yy.cpp: verilog.l V3ParseBison.h $(HEADERS)
|
2009-04-09 03:47:48 +02:00
|
|
|
${LEX} --version
|
2006-08-26 13:35:28 +02:00
|
|
|
${LEX} ${LFLAGS} -o$@ $<
|
|
|
|
|
|
2010-02-27 01:50:44 +01:00
|
|
|
V3Lexer.yy.cpp: V3Lexer_pregen.yy.cpp $(FLEXFIX)
|
2020-12-23 21:41:14 +01:00
|
|
|
$(PYTHON3) $(FLEXFIX) V3Lexer <$< >$@
|
2006-08-26 13:35:28 +02:00
|
|
|
|
|
|
|
|
V3PreLex_pregen.yy.cpp: V3PreLex.l $(HEADERS)
|
2009-04-09 03:47:48 +02:00
|
|
|
${LEX} --version
|
2006-08-26 13:35:28 +02:00
|
|
|
${LEX} ${LFLAGS} -o$@ $<
|
|
|
|
|
|
2010-02-27 01:50:44 +01:00
|
|
|
V3PreLex.yy.cpp: V3PreLex_pregen.yy.cpp $(FLEXFIX)
|
2021-02-26 03:19:37 +01:00
|
|
|
$(PYTHON3) $(FLEXFIX) V3PreLex <$< >$@
|
2006-08-26 13:35:28 +02:00
|
|
|
|
2015-11-28 23:33:01 +01:00
|
|
|
.SUFFIXES:
|
|
|
|
|
|
2006-08-26 13:35:28 +02:00
|
|
|
######################################################################
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
DEPS := $(wildcard *.d)
|
|
|
|
|
ifneq ($(DEPS),)
|
|
|
|
|
include $(DEPS)
|
|
|
|
|
endif
|