1999-04-25 23:54:33 +02:00
|
|
|
#
|
|
|
|
|
# This source code is free software; you can redistribute it
|
|
|
|
|
# and/or modify it in source code form under the terms of the GNU
|
|
|
|
|
# Library General Public License as published by the Free Software
|
|
|
|
|
# Foundation; either version 2 of the License, or (at your option)
|
2000-11-21 04:55:20 +01:00
|
|
|
# any later version.
|
1999-04-25 23:54:33 +02:00
|
|
|
#
|
|
|
|
|
# This program 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 Library General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
|
# License along with this program; if not, write to the Free
|
|
|
|
|
# Software Foundation, Inc.,
|
|
|
|
|
# 59 Temple Place - Suite 330
|
|
|
|
|
# Boston, MA 02111-1307, USA
|
|
|
|
|
#
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
2009-01-06 06:43:21 +01:00
|
|
|
# The interesting make targets are:
|
2008-09-08 06:54:46 +02:00
|
|
|
#
|
2009-01-06 06:43:21 +01:00
|
|
|
# make version
|
|
|
|
|
# Force the version_tag.h file to be rebuilt. Otherwise, it will only
|
|
|
|
|
# be built if it is missing.
|
2008-09-08 06:54:46 +02:00
|
|
|
#
|
2009-01-06 06:43:21 +01:00
|
|
|
# make all
|
|
|
|
|
# make install
|
2008-09-08 06:54:46 +02:00
|
|
|
#
|
2009-01-06 06:43:21 +01:00
|
|
|
# The "suffix" is used as an installation suffix. It modifies certain
|
2008-11-17 16:22:46 +01:00
|
|
|
# key install paths/files such that a build and install of Icarus Verilog
|
|
|
|
|
# with the same $(prefix) but a different $(suffix) will not interfere.
|
|
|
|
|
# The normal configuratin leaves suffix empty
|
|
|
|
|
suffix = @install_suffix@
|
|
|
|
|
|
1999-04-25 23:54:33 +02:00
|
|
|
prefix = @prefix@
|
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
srcdir = @srcdir@
|
2008-01-24 21:10:31 +01:00
|
|
|
datarootdir = @datarootdir@
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2008-12-17 01:24:09 +01:00
|
|
|
SUBDIRS = ivlpp vvp vpi libveriuser cadpli tgt-null tgt-stub tgt-vvp \
|
|
|
|
|
tgt-vhdl driver
|
2009-11-29 03:42:54 +01:00
|
|
|
# Only run distclean for these directories.
|
2008-12-17 01:24:09 +01:00
|
|
|
NOTUSED = tgt-fpga tgt-pal tgt-verilog
|
2001-03-11 01:29:38 +01:00
|
|
|
|
2009-12-01 04:04:26 +01:00
|
|
|
ifeq (@MINGW32@,yes)
|
|
|
|
|
SUBDIRS += driver-vpi
|
|
|
|
|
else
|
|
|
|
|
NOTUSED += driver-vpi
|
|
|
|
|
endif
|
|
|
|
|
|
2009-11-29 03:42:54 +01:00
|
|
|
# To get the version headers to build correctly we only want to look
|
|
|
|
|
# for C++ files in the source directory. All other files will require
|
|
|
|
|
# an explicit $(srcdir).
|
|
|
|
|
vpath %.cc $(srcdir)
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2000-11-11 01:48:35 +01:00
|
|
|
bindir = @bindir@
|
|
|
|
|
libdir = @libdir@
|
2008-11-17 16:22:46 +01:00
|
|
|
# This is actually the directory where we install our own header files.
|
|
|
|
|
# It is a little different from the generic includedir.
|
2008-11-26 01:38:09 +01:00
|
|
|
includedir = @includedir@/iverilog$(suffix)
|
2002-05-28 07:21:30 +02:00
|
|
|
mandir = @mandir@
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2000-08-12 18:34:37 +02:00
|
|
|
dllib=@DLLIB@
|
|
|
|
|
|
1999-04-25 23:54:33 +02:00
|
|
|
CC = @CC@
|
2009-11-27 18:25:50 +01:00
|
|
|
HOSTCC = @CC@
|
1999-04-25 23:54:33 +02:00
|
|
|
CXX = @CXX@
|
|
|
|
|
INSTALL = @INSTALL@
|
2000-01-24 00:54:36 +01:00
|
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
1999-04-25 23:54:33 +02:00
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
2001-12-30 18:20:33 +01:00
|
|
|
LEX = @LEX@
|
|
|
|
|
YACC = @YACC@
|
2008-05-23 01:31:09 +02:00
|
|
|
MAN = @MAN@
|
|
|
|
|
PS2PDF = @PS2PDF@
|
|
|
|
|
GIT = @GIT@
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2009-01-06 06:43:21 +01:00
|
|
|
CPPFLAGS = @DEFS@ -I. -I$(srcdir) @CPPFLAGS@
|
2009-01-01 17:33:26 +01:00
|
|
|
CXXFLAGS = -Wall @CXXFLAGS@
|
2001-07-11 21:32:02 +02:00
|
|
|
PICFLAGS = @PICFLAG@
|
2004-02-10 20:25:00 +01:00
|
|
|
LDFLAGS = @rdynamic@ @LDFLAGS@
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2009-11-29 05:32:29 +01:00
|
|
|
all: dep config.h _pli_types.h version_tag.h ivl@EXEEXT@ version.exe iverilog-vpi.man
|
2009-10-17 06:59:27 +02:00
|
|
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2001-08-03 19:06:47 +02:00
|
|
|
# In the windows world, the installer will need a dosify program to
|
|
|
|
|
# dosify text files.
|
2008-05-23 01:31:09 +02:00
|
|
|
ifeq (@MINGW32@,yes)
|
2003-02-27 23:13:22 +01:00
|
|
|
all: dep dosify.exe
|
2009-11-28 22:29:19 +01:00
|
|
|
dosify.exe: $(srcdir)/dosify.c
|
|
|
|
|
$(CC) -o dosify.exe $(srcdir)/dosify.c
|
2001-08-03 19:06:47 +02:00
|
|
|
endif
|
|
|
|
|
|
2000-10-28 05:58:11 +02:00
|
|
|
# This rule rules the compiler in the trivial hello.vl program to make
|
|
|
|
|
# sure the basics were compiled properly.
|
|
|
|
|
check: all
|
2009-10-17 06:59:27 +02:00
|
|
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
2004-09-18 03:59:44 +02:00
|
|
|
test -r check.conf || cp $(srcdir)/check.conf .
|
2003-12-12 05:36:48 +01:00
|
|
|
driver/iverilog -B. -BPivlpp -tcheck -ocheck.vvp $(srcdir)/examples/hello.vl
|
2009-12-23 01:32:50 +01:00
|
|
|
ifeq (@WIN32@,yes)
|
|
|
|
|
ifeq (@install_suffix@,)
|
2003-01-19 00:56:06 +01:00
|
|
|
vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
2009-12-23 01:32:50 +01:00
|
|
|
else
|
|
|
|
|
# On Windows if we have a suffix we must run the vvp part of
|
|
|
|
|
# the test with a suffix since it was built/linked that way.
|
|
|
|
|
ln vvp/vvp.exe vvp/vvp$(suffix).exe
|
|
|
|
|
vvp/vvp$(suffix) -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
|
|
|
|
rm vvp/vvp$(suffix).exe
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
|
|
|
|
endif
|
2000-10-28 05:58:11 +02:00
|
|
|
|
1999-04-25 23:54:33 +02:00
|
|
|
clean:
|
2009-10-17 06:59:27 +02:00
|
|
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
2009-10-29 03:20:36 +01:00
|
|
|
rm -f *.o parse.cc parse.h lexor.cc
|
2009-11-27 18:25:50 +01:00
|
|
|
rm -f ivl.exp iverilog-vpi.man iverilog-vpi.pdf iverilog-vpi.ps parse.output
|
2007-02-06 06:07:31 +01:00
|
|
|
rm -f syn-rules.output dosify.exe ivl@EXEEXT@ check.vvp
|
2009-10-29 03:20:36 +01:00
|
|
|
rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc
|
2007-02-06 06:07:31 +01:00
|
|
|
rm -rf dep
|
2009-12-10 23:39:21 +01:00
|
|
|
rm -f version.exe
|
1999-04-25 23:54:33 +02:00
|
|
|
|
1999-10-23 18:55:51 +02:00
|
|
|
distclean: clean
|
2009-10-17 06:59:27 +02:00
|
|
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
2009-10-21 23:27:15 +02:00
|
|
|
$(foreach dir,$(NOTUSED),$(MAKE) -C $(dir) $@ && ) true
|
|
|
|
|
rm -f Makefile config.status config.log config.cache
|
|
|
|
|
rm -f stamp-config-h config.h
|
|
|
|
|
rm -f stamp-_pli_types-h _pli_types.h
|
2009-11-29 03:42:54 +01:00
|
|
|
ifneq (@srcdir@,.)
|
|
|
|
|
rm -f version.h version_tag.h check.conf
|
|
|
|
|
rmdir $(SUBDIRS) $(NOTUSED)
|
|
|
|
|
endif
|
2009-10-29 03:20:36 +01:00
|
|
|
rm -rf autom4te.cache
|
1999-10-23 18:55:51 +02:00
|
|
|
|
2008-11-07 06:31:34 +01:00
|
|
|
TT = t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o t-dll-analog.o
|
2004-12-11 03:31:25 +01:00
|
|
|
FF = cprop.o nodangle.o synth.o synth2.o syn-rules.o
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2008-10-22 07:15:49 +02:00
|
|
|
O = main.o async.o design_dump.o discipline.o dup_expr.o \
|
|
|
|
|
elaborate.o elab_expr.o elaborate_analog.o \
|
2005-08-06 19:58:16 +02:00
|
|
|
elab_lval.o elab_net.o elab_pexpr.o elab_scope.o \
|
2008-10-22 07:15:49 +02:00
|
|
|
elab_sig.o elab_sig_analog.o emit.o eval.o eval_attrib.o \
|
2000-09-09 17:21:26 +02:00
|
|
|
eval_tree.o expr_synth.o functor.o lexor.o lexor_keyword.o link_const.o \
|
2008-10-23 06:56:00 +02:00
|
|
|
load_module.o netlist.o netmisc.o net_analog.o net_assign.o \
|
2008-09-03 03:38:04 +02:00
|
|
|
net_design.o net_event.o net_expr.o net_func.o \
|
2002-06-30 04:21:31 +02:00
|
|
|
net_link.o net_modulo.o net_nex_input.o net_nex_output.o \
|
2008-05-20 06:42:52 +02:00
|
|
|
net_proc.o net_scope.o net_tran.o net_udp.o pad_to_width.o \
|
2008-07-27 21:02:09 +02:00
|
|
|
parse.o parse_misc.o pform.o pform_analog.o pform_disciplines.o \
|
|
|
|
|
pform_dump.o pform_types.o \
|
2004-03-09 05:29:42 +01:00
|
|
|
set_width.o symbol_search.o sync.o sys_funcs.o \
|
2008-09-08 01:43:54 +02:00
|
|
|
verinum.o verireal.o target.o \
|
2005-07-11 18:56:50 +02:00
|
|
|
Attrib.o HName.o LineInfo.o Module.o PDelays.o PEvent.o \
|
2008-02-14 04:59:05 +01:00
|
|
|
PExpr.o PGate.o PGenerate.o PScope.o PSpec.o \
|
2008-07-27 21:02:09 +02:00
|
|
|
PTask.o PUdp.o PFunction.o PWire.o Statement.o AStatement.o StringHeap.o \
|
1999-07-03 04:12:51 +02:00
|
|
|
$(FF) $(TT)
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2008-12-13 00:30:15 +01:00
|
|
|
Makefile: $(srcdir)/Makefile.in config.status
|
|
|
|
|
./config.status --file=$@
|
|
|
|
|
|
2009-10-20 07:58:54 +02:00
|
|
|
stamp-config-h: $(srcdir)/config.h.in config.status
|
|
|
|
|
@rm -f $@
|
|
|
|
|
./config.status config.h
|
|
|
|
|
config.h: stamp-config-h
|
2008-12-13 00:30:15 +01:00
|
|
|
|
2009-10-20 07:58:54 +02:00
|
|
|
stamp-_pli_types-h: $(srcdir)/_pli_types.h.in config.status
|
|
|
|
|
@rm -f $@
|
|
|
|
|
./config.status _pli_types.h
|
|
|
|
|
_pli_types.h: stamp-_pli_types-h
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2009-10-21 23:27:15 +02:00
|
|
|
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4
|
2009-10-17 06:59:27 +02:00
|
|
|
cd $(srcdir) && autoconf
|
|
|
|
|
|
|
|
|
|
config.status: $(srcdir)/configure
|
|
|
|
|
./config.status --recheck
|
2009-10-20 07:58:54 +02:00
|
|
|
./config.status
|
1999-08-17 17:57:43 +02:00
|
|
|
|
2001-05-20 17:09:39 +02:00
|
|
|
ifeq (@WIN32@,yes)
|
2001-10-20 01:15:01 +02:00
|
|
|
# Under Windows (mingw) I need to make the ivl.exe in two steps.
|
|
|
|
|
# The first step makes an ivl.exe that dlltool can use to make an
|
|
|
|
|
# export and import library, and the last link makes a, ivl.exe
|
|
|
|
|
# that really exports the things that the import library imports.
|
2008-04-06 01:03:26 +02:00
|
|
|
ivl@EXEEXT@: $O $(srcdir)/ivl.def
|
2004-10-04 03:10:51 +02:00
|
|
|
$(CXX) -o ivl@EXEEXT@ $O $(dllib) @EXTRALIBS@
|
2008-04-06 01:03:26 +02:00
|
|
|
dlltool --dllname ivl@EXEEXT@ --def $(srcdir)/ivl.def \
|
2000-10-15 23:02:08 +02:00
|
|
|
--output-lib libivl.a --output-exp ivl.exp
|
2007-02-06 06:07:31 +01:00
|
|
|
$(CXX) $(LDFLAGS) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@
|
2000-10-15 23:02:08 +02:00
|
|
|
else
|
2000-09-30 05:20:47 +02:00
|
|
|
ivl@EXEEXT@: $O
|
2004-02-10 20:25:00 +01:00
|
|
|
$(CXX) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
|
2004-03-09 05:29:42 +01:00
|
|
|
endif
|
2000-04-21 08:41:02 +02:00
|
|
|
|
2009-12-01 04:04:26 +01:00
|
|
|
ifeq (@MINGW32@,no)
|
2004-03-11 07:13:58 +01:00
|
|
|
all: dep iverilog-vpi
|
|
|
|
|
|
2009-11-29 03:42:54 +01:00
|
|
|
iverilog-vpi: $(srcdir)/iverilog-vpi.sh Makefile
|
2002-07-04 01:20:12 +02:00
|
|
|
sed -e 's;@SHARED@;@shared@;' -e 's;@PIC@;@PICFLAG@;' \
|
2008-11-17 16:22:46 +01:00
|
|
|
-e 's;@SUFFIX@;$(suffix);' \
|
2007-02-06 06:07:31 +01:00
|
|
|
-e 's;@IVCC@;$(CC);' \
|
|
|
|
|
-e 's;@IVCXX@;$(CXX);' \
|
|
|
|
|
-e 's;@IVCFLAGS@;$(CXXFLAGS);' \
|
2008-11-17 16:22:46 +01:00
|
|
|
-e 's;@INCLUDEDIR@;$(includedir);' \
|
2003-10-13 22:57:34 +02:00
|
|
|
-e 's;@LIBDIR@;@libdir@;' $< > $@
|
2002-04-07 02:47:10 +02:00
|
|
|
chmod +x $@
|
|
|
|
|
endif
|
|
|
|
|
|
2009-11-27 18:25:50 +01:00
|
|
|
version.exe: $(srcdir)/version.c $(srcdir)/version_base.h version_tag.h
|
2009-12-10 22:07:28 +01:00
|
|
|
$(HOSTCC) -Wall -o version.exe -I. -I$(srcdir) $(srcdir)/version.c
|
2009-11-27 18:25:50 +01:00
|
|
|
|
2003-02-27 23:13:22 +01:00
|
|
|
dep:
|
|
|
|
|
mkdir dep
|
|
|
|
|
|
2009-12-05 00:20:03 +01:00
|
|
|
%.o: %.cc config.h
|
2004-02-10 20:25:00 +01:00
|
|
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
|
1999-04-25 23:54:33 +02:00
|
|
|
mv $*.d dep/$*.d
|
|
|
|
|
|
2009-12-05 00:20:03 +01:00
|
|
|
# Here are some explicit dependencies needed to get things going.
|
|
|
|
|
main.o: main.cc version_tag.h
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2000-12-02 06:30:08 +01:00
|
|
|
lexor.o: lexor.cc parse.h
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2000-12-02 06:30:08 +01:00
|
|
|
parse.o: parse.cc
|
1999-06-15 04:50:02 +02:00
|
|
|
|
2006-05-01 22:47:29 +02:00
|
|
|
parse.cc parse.h: $(srcdir)/parse.y
|
2001-12-30 18:20:33 +01:00
|
|
|
$(YACC) --verbose -t -p VL -d -o parse.cc $(srcdir)/parse.y
|
2003-09-13 02:59:56 +02:00
|
|
|
mv parse.cc.h parse.h 2>/dev/null || mv parse.hh parse.h
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2000-05-13 22:55:47 +02:00
|
|
|
syn-rules.cc: $(srcdir)/syn-rules.y
|
2001-12-30 18:20:33 +01:00
|
|
|
$(YACC) --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
|
2000-05-13 22:55:47 +02:00
|
|
|
|
1999-10-23 01:58:13 +02:00
|
|
|
lexor.cc: $(srcdir)/lexor.lex
|
2001-12-30 18:20:33 +01:00
|
|
|
$(LEX) -PVL -s -olexor.cc $(srcdir)/lexor.lex
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2003-03-13 17:33:25 +01:00
|
|
|
lexor_keyword.o: lexor_keyword.cc parse.h
|
2000-03-12 18:09:40 +01:00
|
|
|
|
2009-11-29 03:42:54 +01:00
|
|
|
lexor_keyword.cc: $(srcdir)/lexor_keyword.gperf
|
2010-02-06 08:09:39 +01:00
|
|
|
gperf -o -i 7 -C -k 1-4,6,9,$$ -L ANSI-C -H keyword_hash -N check_identifier -t $(srcdir)/lexor_keyword.gperf > lexor_keyword.cc || (rm -f lexor_keyword.cc ; false)
|
2000-03-12 18:09:40 +01:00
|
|
|
|
2009-11-27 18:25:50 +01:00
|
|
|
iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in version.exe
|
|
|
|
|
./version.exe `head -1 $(srcdir)/iverilog-vpi.man.in`'\n' > $@
|
2009-12-04 23:57:36 +01:00
|
|
|
tail -n +2 $(srcdir)/iverilog-vpi.man.in >> $@
|
2009-11-27 18:25:50 +01:00
|
|
|
|
|
|
|
|
iverilog-vpi.ps: iverilog-vpi.man
|
|
|
|
|
$(MAN) -t iverilog-vpi.man > iverilog-vpi.ps
|
2002-05-28 07:21:30 +02:00
|
|
|
|
|
|
|
|
iverilog-vpi.pdf: iverilog-vpi.ps
|
2008-05-23 01:31:09 +02:00
|
|
|
$(PS2PDF) iverilog-vpi.ps iverilog-vpi.pdf
|
2002-05-28 07:21:30 +02:00
|
|
|
|
2008-04-11 06:44:50 +02:00
|
|
|
# For VERSION_TAG in driver/main.c, first try git-describe, then look for a
|
|
|
|
|
# version.h file in the source tree (included in snapshots and releases), and
|
|
|
|
|
# finally use nothing.
|
2009-01-06 06:43:21 +01:00
|
|
|
|
2008-05-29 19:37:35 +02:00
|
|
|
# "true" and "false" in the next few lines are Unix shell command names
|
2008-05-23 01:31:09 +02:00
|
|
|
ifeq ($(GIT),none)
|
2008-05-29 19:37:35 +02:00
|
|
|
GIT_PRESENT = false
|
2008-05-23 01:31:09 +02:00
|
|
|
else
|
2008-05-29 19:37:35 +02:00
|
|
|
GIT_PRESENT = true
|
|
|
|
|
endif
|
2009-01-06 06:43:21 +01:00
|
|
|
version_tag.h version:
|
2008-05-29 19:37:35 +02:00
|
|
|
@if $(GIT_PRESENT) && test -d $(srcdir)/.git; then \
|
2008-04-11 06:44:50 +02:00
|
|
|
echo "Using git-describe for VERSION_TAG"; \
|
2008-05-23 01:31:09 +02:00
|
|
|
tmp=`$(GIT) --git-dir $(srcdir)/.git describe \
|
2008-04-18 05:33:39 +02:00
|
|
|
| sed -e 's;\(.*\);#define VERSION_TAG "\1";'`; \
|
2009-01-06 06:43:21 +01:00
|
|
|
echo "$$tmp" | diff - version_tag.h > /dev/null 2>&1 || echo "$$tmp" > version_tag.h || exit 1; \
|
|
|
|
|
elif test -r $(srcdir)/version_tag.h; then \
|
|
|
|
|
echo "Using $(srcdir)/version_tag.h for VERSION_TAG"; \
|
|
|
|
|
diff $(srcdir)/version_tag.h version_tag.h > /dev/null 2>&1 || cp $(srcdir)/version_tag.h version_tag.h; \
|
2008-04-11 06:44:50 +02:00
|
|
|
else \
|
|
|
|
|
echo "Using empty VERSION_TAG"; \
|
2009-01-06 06:43:21 +01:00
|
|
|
echo '#define VERSION_TAG ""' > version_tag.h; \
|
2008-04-11 06:44:50 +02:00
|
|
|
fi
|
2008-04-06 02:02:57 +02:00
|
|
|
|
2008-05-23 01:31:09 +02:00
|
|
|
ifeq (@MINGW32@,yes)
|
|
|
|
|
ifeq ($(MAN),none)
|
2008-11-17 16:22:46 +01:00
|
|
|
INSTALL_DOC = $(mandir)/man1/iverilog-vpi$(suffix).1
|
2008-05-23 01:31:09 +02:00
|
|
|
else
|
|
|
|
|
ifeq ($(PS2PDF),none)
|
2008-11-17 16:22:46 +01:00
|
|
|
INSTALL_DOC = $(mandir)/man1/iverilog-vpi$(suffix).1
|
2008-05-23 01:31:09 +02:00
|
|
|
else
|
2008-11-17 16:22:46 +01:00
|
|
|
INSTALL_DOC = $(prefix)/iverilog-vpi$(suffix).pdf $(mandir)/man1/iverilog-vpi$(suffix).1
|
2003-02-27 23:13:22 +01:00
|
|
|
all: dep iverilog-vpi.pdf
|
2008-05-23 01:31:09 +02:00
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
INSTALL_DOCDIR = $(mandir)/man1
|
2002-05-28 07:21:30 +02:00
|
|
|
else
|
2008-11-17 16:22:46 +01:00
|
|
|
INSTALL_DOC = $(mandir)/man1/iverilog-vpi$(suffix).1
|
2002-05-28 07:21:30 +02:00
|
|
|
INSTALL_DOCDIR = $(mandir)/man1
|
|
|
|
|
endif
|
|
|
|
|
|
2004-03-17 18:06:44 +01:00
|
|
|
ifeq (@MINGW32@,yes)
|
2008-11-17 16:22:46 +01:00
|
|
|
WIN32_INSTALL =
|
2002-04-07 02:47:10 +02:00
|
|
|
else
|
2008-11-17 16:22:46 +01:00
|
|
|
WIN32_INSTALL = $(bindir)/iverilog-vpi$(suffix)
|
2001-08-03 19:06:47 +02:00
|
|
|
endif
|
2000-03-12 18:09:40 +01:00
|
|
|
|
2008-11-17 16:22:46 +01:00
|
|
|
install: all installdirs $(libdir)/ivl$(suffix)/ivl@EXEEXT@ $(libdir)/ivl$(suffix)/include/constants.vams $(libdir)/ivl$(suffix)/include/disciplines.vams $(includedir)/ivl_target.h $(includedir)/_pli_types.h $(includedir)/vpi_user.h $(includedir)/acc_user.h $(includedir)/veriuser.h $(WIN32_INSTALL) $(INSTALL_DOC)
|
2009-10-17 06:59:27 +02:00
|
|
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
2000-04-21 08:41:02 +02:00
|
|
|
|
2008-11-17 16:22:46 +01:00
|
|
|
$(bindir)/iverilog-vpi$(suffix): ./iverilog-vpi
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_SCRIPT) ./iverilog-vpi "$(DESTDIR)$(bindir)/iverilog-vpi$(suffix)"
|
2002-04-07 02:47:10 +02:00
|
|
|
|
2008-11-17 16:22:46 +01:00
|
|
|
$(libdir)/ivl$(suffix)/ivl@EXEEXT@: ./ivl@EXEEXT@
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ "$(DESTDIR)$(libdir)/ivl$(suffix)/ivl@EXEEXT@"
|
1999-04-25 23:54:33 +02:00
|
|
|
|
2008-11-17 16:22:46 +01:00
|
|
|
$(libdir)/ivl$(suffix)/include/constants.vams: $(srcdir)/constants.vams
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/constants.vams "$(DESTDIR)$(libdir)/ivl$(suffix)/include/constants.vams"
|
2008-04-30 06:20:39 +02:00
|
|
|
|
2008-11-17 16:22:46 +01:00
|
|
|
$(libdir)/ivl$(suffix)/include/disciplines.vams: $(srcdir)/disciplines.vams
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/disciplines.vams "$(DESTDIR)$(libdir)/ivl$(suffix)/include/disciplines.vams"
|
2008-05-10 19:37:33 +02:00
|
|
|
|
2000-08-20 06:13:56 +02:00
|
|
|
$(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/ivl_target.h "$(DESTDIR)$(includedir)/ivl_target.h"
|
2000-08-20 06:13:56 +02:00
|
|
|
|
2003-11-26 02:36:55 +01:00
|
|
|
$(includedir)/_pli_types.h: _pli_types.h
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $< "$(DESTDIR)$(includedir)/_pli_types.h"
|
2003-02-17 07:39:47 +01:00
|
|
|
|
2001-03-14 20:27:44 +01:00
|
|
|
$(includedir)/vpi_user.h: $(srcdir)/vpi_user.h
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/vpi_user.h "$(DESTDIR)$(includedir)/vpi_user.h"
|
2001-03-14 20:27:44 +01:00
|
|
|
|
2002-05-23 05:46:42 +02:00
|
|
|
$(includedir)/acc_user.h: $(srcdir)/acc_user.h
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/acc_user.h "$(DESTDIR)$(includedir)/acc_user.h"
|
2002-05-23 05:46:42 +02:00
|
|
|
|
2002-05-19 07:21:00 +02:00
|
|
|
$(includedir)/veriuser.h: $(srcdir)/veriuser.h
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/veriuser.h "$(DESTDIR)$(includedir)/veriuser.h"
|
2002-05-19 07:21:00 +02:00
|
|
|
|
2009-11-27 18:25:50 +01:00
|
|
|
$(mandir)/man1/iverilog-vpi$(suffix).1: iverilog-vpi.man
|
|
|
|
|
$(INSTALL_DATA) iverilog-vpi.man "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1"
|
2001-08-03 19:06:47 +02:00
|
|
|
|
2008-11-17 16:22:46 +01:00
|
|
|
$(prefix)/iverilog-vpi$(suffix).pdf: iverilog-vpi.pdf
|
2009-02-04 17:44:22 +01:00
|
|
|
$(INSTALL_DATA) iverilog-vpi.pdf "$(DESTDIR)$(prefix)/iverilog-vpi$(suffix).pdf"
|
2002-11-11 02:12:41 +01:00
|
|
|
|
2001-08-03 19:06:47 +02:00
|
|
|
|
2009-02-04 17:44:22 +01:00
|
|
|
installdirs: $(srcdir)/mkinstalldirs
|
|
|
|
|
$(srcdir)/mkinstalldirs "$(DESTDIR)$(bindir)" \
|
|
|
|
|
"$(DESTDIR)$(includedir)" \
|
|
|
|
|
"$(DESTDIR)$(libdir)/ivl$(suffix)" \
|
|
|
|
|
"$(DESTDIR)$(libdir)/ivl$(suffix)/include" \
|
|
|
|
|
"$(DESTDIR)$(mandir)" \
|
|
|
|
|
"$(DESTDIR)$(mandir)/man1"
|
2001-08-03 19:06:47 +02:00
|
|
|
|
1999-04-25 23:54:33 +02:00
|
|
|
uninstall:
|
2009-10-17 06:59:27 +02:00
|
|
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
2008-09-03 03:23:48 +02:00
|
|
|
for f in ivl@EXEEXT@ include/constants.vams include/disciplines.vams; \
|
2009-02-04 17:44:22 +01:00
|
|
|
do rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/$$f"; done
|
|
|
|
|
-rmdir "$(DESTDIR)$(libdir)/ivl$(suffix)/include"
|
|
|
|
|
-rmdir "$(DESTDIR)$(libdir)/ivl$(suffix)"
|
2008-11-17 16:22:46 +01:00
|
|
|
for f in verilog$(suffix) iverilog-vpi$(suffix) gverilog$(suffix)@EXEEXT@; \
|
2009-02-04 17:44:22 +01:00
|
|
|
do rm -f "$(DESTDIR)$(bindir)/$$f"; done
|
2003-03-15 06:47:51 +01:00
|
|
|
for f in ivl_target.h vpi_user.h _pli_types.h acc_user.h veriuser.h; \
|
2009-02-04 17:44:22 +01:00
|
|
|
do rm -f "$(DESTDIR)$(includedir)/$$f"; done
|
|
|
|
|
-test X$(suffix) = X || rmdir "$(DESTDIR)/$(includedir)"
|
|
|
|
|
rm -f "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1" "$(DESTDIR)$(prefix)/iverilog-vpi$(suffix).pdf"
|
1999-04-25 23:54:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
-include $(patsubst %.o, dep/%.d, $O)
|
2001-06-12 05:53:10 +02:00
|
|
|
-include $(patsubst %.o, dep/%.d, vpithunk.o)
|