2 # This source code is free software; you can redistribute it
3 # and/or modify it in source code form under the terms of the GNU
4 # Library General Public License as published by the Free Software
5 # Foundation; either version 2 of the License, or (at your option)
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU Library General Public License for more details.
13 # You should have received a copy of the GNU Library General Public
14 # License along with this program; if not, write to the Free
15 # Software Foundation, Inc.,
16 # 59 Temple Place - Suite 330
17 # Boston, MA 02111-1307, USA
19 #ident "$Id: Makefile.in,v 1.181 2007/05/24 04:07:11 steve Exp $"
24 # This version string is only used in the version message printed
25 # by the compiler. It reflects the assigned version number for the
26 # product as a whole. Most components also print the CVS Name: token
27 # in order to get a more automatic version stamp as well.
31 exec_prefix = @
exec_prefix@
40 includedir = @
includedir@
50 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
51 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
52 INSTALL_DATA
= @INSTALL_DATA@
56 CPPFLAGS
= @ident_support@ @DEFS@
-I.
-I
$(srcdir) @CPPFLAGS@
57 CXXFLAGS
= -Wall @CXXFLAGS@
59 LDFLAGS
= @rdynamic@ @LDFLAGS@
62 for
dir in
$(SUBDIRS
); do
(cd
$$dir ; $(MAKE
) $@
); done
64 do
(cd
$$dir ; $(MAKE
) $@
); done
65 cd driver
; $(MAKE
) VERSION
=$(VERSION
) $@
67 # In the windows world, the installer will need a dosify program to
72 $(CC
) -o dosify.exe dosify.c
75 # This rule rules the compiler in the trivial hello.vl program to make
76 # sure the basics were compiled properly.
78 for
dir in
$(SUBDIRS
); do
(cd
$$dir ; $(MAKE
) check); done
79 test -r
check.conf || cp
$(srcdir)/check.conf .
80 driver
/iverilog
-B.
-BPivlpp
-tcheck
-ocheck.vvp
$(srcdir)/examples
/hello.vl
81 vvp
/vvp
-M-
-M.
/vpi .
/check.vvp | grep
'Hello, World'
84 for
dir in
$(SUBDIRS
); do
(cd
$$dir ; $(MAKE
) $@
); done
85 for
dir in vpi ivlpp tgt-verilog tgt-pal driver driver-vpi
; \
86 do
(cd
$$dir ; $(MAKE
) $@
); done
87 rm -f
*.o parse.
cc parse.
cc.output parse.h lexor.
cc
88 rm -f ivl.exp iverilog-vpi.pdf iverilog-vpi.ps parse.output
89 rm -f syn-rules.output dosify.exe ivl@EXEEXT@
check.vvp
90 rm -f lexor_keyword.
cc libivl.a libvpi.a iverilog-vpi syn-rules.
cc*
94 for
dir in
$(SUBDIRS
); do
(cd
$$dir ; $(MAKE
) $@
); done
95 for
dir in vpi ivlpp tgt-verilog tgt-pal driver driver-vpi
; \
96 do
(cd
$$dir ; $(MAKE
) $@
); done
97 rm -f Makefile config.status config.log config.cache config.h
100 TT
= t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o
101 FF
= cprop.o nodangle.o synth.o synth2.o syn-rules.o
103 O
= main.o async.o design_dump.o dup_expr.o elaborate.o elab_expr.o \
104 elab_lval.o elab_net.o elab_pexpr.o elab_scope.o \
105 elab_sig.o emit.o eval.o eval_attrib.o \
106 eval_tree.o expr_synth.o functor.o lexor.o lexor_keyword.o link_const.o \
107 load_module.o netlist.o netmisc.o net_assign.o \
108 net_design.o net_event.o net_expr.o net_force.o net_func.o \
109 net_link.o net_modulo.o net_nex_input.o net_nex_output.o \
110 net_proc.o net_scope.o net_udp.o pad_to_width.o \
111 parse.o parse_misc.o pform.o pform_dump.o pform_types.o \
112 set_width.o symbol_search.o sync.o sys_funcs.o \
113 verinum.o verireal.o target.o targets.o \
114 Attrib.o HName.o LineInfo.o Module.o PDelays.o PEvent.o \
115 PExpr.o PGate.o PGenerate.o PSpec.o \
116 PTask.o PUdp.o PFunction.o PWire.o Statement.o StringHeap.o \
119 Makefile
: Makefile.in config.h.in config.status
124 # Under Windows (mingw) I need to make the ivl.exe in two steps.
125 # The first step makes an ivl.exe that dlltool can use to make an
126 # export and import library, and the last link makes a, ivl.exe
127 # that really exports the things that the import library imports.
128 ivl@EXEEXT@
: $O ivl.def
129 $(CXX
) -o ivl@EXEEXT@
$O $(dllib
) @EXTRALIBS@
130 dlltool
--dllname ivl@EXEEXT@
--def ivl.def \
131 --output-lib libivl.a
--output-exp ivl.exp
132 $(CXX
) $(LDFLAGS
) -o ivl@EXEEXT@ ivl.exp
$O $(dllib
) @EXTRALIBS@
135 $(CXX
) $(LDFLAGS
) -o ivl@EXEEXT@
$O $(dllib
)
139 SUBDIRS
+= driver-vpi
141 all: dep iverilog-vpi
143 iverilog-vpi
: iverilog-vpi.sh
144 sed
-e
's;@SHARED@;@shared@;' -e
's;@PIC@;@PICFLAG@;' \
145 -e
's;@IVCC@;$(CC);' \
146 -e
's;@IVCXX@;$(CXX);' \
147 -e
's;@IVCFLAGS@;$(CXXFLAGS);' \
148 -e
's;@INCLUDEDIR@;@includedir@;' \
149 -e
's;@LIBDIR64@;@libdir64@;' \
150 -e
's;@VPIDIR1@;@vpidir1@;' -e
's;@VPIDIR2@;@vpidir2@;' \
151 -e
's;@LIBDIR@;@libdir@;' $< > $@
159 $(CXX
) $(CPPFLAGS
) $(CXXFLAGS
) -MD
-c
$< -o
$*.o
163 lexor.o
: lexor.
cc parse.h
167 parse.
cc parse.h
: $(srcdir)/parse.y
168 $(YACC
) --verbose
-t
-p VL
-d
-o parse.
cc $(srcdir)/parse.y
169 mv parse.
cc.h parse.h
2>/dev
/null || mv parse.hh parse.h
171 syn-rules.
cc: $(srcdir)/syn-rules.y
172 $(YACC
) --verbose
-p syn_
-o syn-rules.
cc $(srcdir)/syn-rules.y
174 lexor.
cc: $(srcdir)/lexor.
lex
175 $(LEX
) -PVL
-s
-olexor.
cc $(srcdir)/lexor.
lex
177 lexor_keyword.o
: lexor_keyword.
cc parse.h
179 lexor_keyword.
cc: lexor_keyword.gperf
180 gperf
-o
-i
7 -C
-k
1-3,$$ -L ANSI-C
-H keyword_hash
-N check_identifier
-t
$(srcdir)/lexor_keyword.gperf
> lexor_keyword.
cc ||
(rm -f lexor_keyword.
cc ; false
)
182 iverilog-vpi.ps
: $(srcdir)/iverilog-vpi.man
183 man
-t
$(srcdir)/iverilog-vpi.man
> iverilog-vpi.ps
185 iverilog-vpi.pdf
: iverilog-vpi.ps
186 ps2pdf iverilog-vpi.ps iverilog-vpi.pdf
189 INSTALL_DOC
= $(prefix)/iverilog-vpi.pdf
$(mandir)/man1
/iverilog-vpi
.1
190 INSTALL_DOCDIR
= $(mandir)/man1
191 all: dep iverilog-vpi.pdf
193 INSTALL_DOC
= $(mandir)/man1
/iverilog-vpi
.1
194 INSTALL_DOCDIR
= $(mandir)/man1
198 WIN32_INSTALL
= $(prefix)/hello.vl
$(prefix)/sqrt.vl
$(prefix)/sqrt-virtex.v
$(prefix)/QUICK_START.txt
200 WIN32_INSTALL
= $(bindir)/iverilog-vpi
203 XNF_INSTALL
= $(libdir)/ivl
/xnf.conf
$(libdir)/ivl
/xnf-s.conf
205 install: all installdirs $(libdir)/ivl
/ivl@EXEEXT@
$(includedir)/ivl_target.h
$(includedir)/_pli_types.h
$(includedir)/vpi_user.h
$(includedir)/acc_user.h
$(includedir)/veriuser.h
$(WIN32_INSTALL
) $(INSTALL_DOC
)
206 for
dir in
$(SUBDIRS
); do
(cd
$$dir ; $(MAKE
) $@
); done
207 for
dir in vpi ivlpp driver
; \
208 do
(cd
$$dir ; $(MAKE
) $@
); done
210 $(bindir)/iverilog-vpi
: .
/iverilog-vpi
211 $(INSTALL_SCRIPT
) .
/iverilog-vpi
$(bindir)/iverilog-vpi
213 $(libdir)/ivl
/ivl@EXEEXT@
: .
/ivl@EXEEXT@
214 $(INSTALL_PROGRAM
) .
/ivl@EXEEXT@
$(libdir)/ivl
/ivl@EXEEXT@
216 $(libdir)/ivl
/xnf-s.conf
: $(srcdir)/xnf-s.conf
217 $(INSTALL_DATA
) $(srcdir)/xnf-s.conf
$(libdir)/ivl
/xnf-s.conf
219 $(libdir)/ivl
/xnf.conf
: $(srcdir)/xnf.conf
220 $(INSTALL_DATA
) $(srcdir)/xnf.conf
$(libdir)/ivl
/xnf.conf
222 $(includedir)/ivl_target.h
: $(srcdir)/ivl_target.h
223 $(INSTALL_DATA
) $(srcdir)/ivl_target.h
$(includedir)/ivl_target.h
225 $(includedir)/_pli_types.h
: _pli_types.h
226 $(INSTALL_DATA
) $< $(includedir)/_pli_types.h
228 $(includedir)/vpi_user.h
: $(srcdir)/vpi_user.h
229 $(INSTALL_DATA
) $(srcdir)/vpi_user.h
$(includedir)/vpi_user.h
231 $(includedir)/acc_user.h
: $(srcdir)/acc_user.h
232 $(INSTALL_DATA
) $(srcdir)/acc_user.h
$(includedir)/acc_user.h
234 $(includedir)/veriuser.h
: $(srcdir)/veriuser.h
235 $(INSTALL_DATA
) $(srcdir)/veriuser.h
$(includedir)/veriuser.h
237 $(mandir)/man1
/iverilog-vpi
.1: $(srcdir)/iverilog-vpi.man
238 $(INSTALL_DATA
) $(srcdir)/iverilog-vpi.man
$(mandir)/man1
/iverilog-vpi
.1
240 $(prefix)/iverilog-vpi.pdf
: iverilog-vpi.pdf
241 $(INSTALL_DATA
) iverilog-vpi.pdf
$(prefix)/iverilog-vpi.pdf
243 # In windows installations, put a few examples and the quick_start
244 # into the destination directory.
246 $(prefix)/hello.vl
: $(srcdir)/examples
/hello.vl
247 .
/dosify.exe
$(srcdir)/examples
/hello.vl tmp.vl
248 mv tmp.vl
$(prefix)/hello.vl
250 $(prefix)/sqrt.vl
: $(srcdir)/examples
/sqrt.vl
251 .
/dosify.exe
$(srcdir)/examples
/sqrt.vl tmp.vl
252 mv tmp.vl
$(prefix)/sqrt.vl
254 $(prefix)/sqrt-virtex.v
: $(srcdir)/examples
/sqrt-virtex.v
255 .
/dosify.exe
$(srcdir)/examples
/sqrt-virtex.v tmp.vl
256 mv tmp.vl
$(prefix)/sqrt-virtex.v
258 $(prefix)/QUICK_START.txt
: $(srcdir)/QUICK_START.txt
259 .
/dosify.exe
$(srcdir)/QUICK_START.txt tmp.txt
260 mv tmp.txt
$(prefix)/QUICK_START.txt
263 installdirs: mkinstalldirs
264 $(srcdir)/mkinstalldirs
$(bindir) $(includedir) $(libdir)/ivl \
265 $(mandir) $(mandir)/man1
268 for
dir in
$(SUBDIRS
); do
(cd
$$dir ; $(MAKE
) $@
); done
269 for
dir in vpi ivlpp driver
; \
270 do
(cd
$$dir ; $(MAKE
) $@
); done
271 for f in xnf.conf xnf-s.conf ivl@EXEEXT@
; \
272 do
rm -f
$(libdir)/ivl
/$$f; done
274 for f in verilog iverilog-vpi gverilog@EXEEXT@
; \
275 do
rm -f
$(bindir)/$$f; done
276 for f in ivl_target.h vpi_user.h _pli_types.h acc_user.h veriuser.h
; \
277 do
rm -f
$(includedir)/$$f; done
278 rm -f
$(mandir)/man1
/iverilog-vpi
.1 $(prefix)/iverilog-vpi.pdf
281 -include $(patsubst %.o
, dep
/%.d
, $O)
282 -include $(patsubst %.o
, dep
/%.d
, vpithunk.o
)