Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 276 lines (222 sloc) 8.482 kb
471d389 autoconf the makefiles.
steve authored
1 #
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)
f7d62b9 whoops, wrong copyright notice.
steve authored
6 # any later version.
471d389 autoconf the makefiles.
steve authored
7 #
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.
12 #
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
18 #
1893e7c Add the iverilog-vpi command.
steve authored
19 #ident "$Id: Makefile.in,v 1.117 2002/04/07 00:47:10 steve Exp $"
471d389 autoconf the makefiles.
steve authored
20 #
21 #
22 SHELL = /bin/sh
23
7c3f5c9 Support print of version number.
steve authored
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.
28 VERSION = 0.6
471d389 autoconf the makefiles.
steve authored
29
30 prefix = @prefix@
31 exec_prefix = @exec_prefix@
32 srcdir = @srcdir@
33
cb65ee5 Add the vvp engine to cvs.
steve authored
34 SUBDIRS = @subdirs@
35
471d389 autoconf the makefiles.
steve authored
36 VPATH = $(srcdir)
37
197ed46 configure bindir and libdir
steve authored
38 bindir = @bindir@
39 libdir = @libdir@
471d389 autoconf the makefiles.
steve authored
40 includedir = $(prefix)/include
41
566aad9 Start stub for loadable targets.
steve authored
42 dllib=@DLLIB@
43 rdynamic=@rdynamic@
a73cfbc MacOS X compile time changes. (Timothy Wood)
steve authored
44 strip_dynamic=@strip_dynamic@
566aad9 Start stub for loadable targets.
steve authored
45
471d389 autoconf the makefiles.
steve authored
46 CC = @CC@
47 CXX = @CXX@
48 INSTALL = @INSTALL@
e6bd088 Compile time problems with vpi_user.h
steve authored
49 INSTALL_SCRIPT = @INSTALL_SCRIPT@
471d389 autoconf the makefiles.
steve authored
50 INSTALL_PROGRAM = @INSTALL_PROGRAM@
51 INSTALL_DATA = @INSTALL_DATA@
8bad04a cannonical make targets, and strip on install.
steve authored
52 STRIP = @STRIP@
357a0ff Detect bison and flex in configure.in
steve authored
53 LEX = @LEX@
54 YACC = @YACC@
471d389 autoconf the makefiles.
steve authored
55
56 CPPFLAGS = @CPPFLAGS@ @DEFS@
a64a4d7 Fixes to support compilation using vpath.
steve authored
57 CXXFLAGS = @CXXFLAGS@ -I. -I$(srcdir)
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
58 PICFLAGS = @PICFLAG@
471d389 autoconf the makefiles.
steve authored
59 LDFLAGS = @LDFLAGS@
60
40da501 Add the pal loadable target.
steve authored
61 # The TARGETS variable lists the target modules that can be build and
62 # installed. Some of them depend on external things, so are only
63 # compiled if the prerequisites are installed.
64 TARGETS = tgt-null
65 ifeq ('@HAVE_IPAL@','yes')
66 TARGETS += tgt-pal
67 endif
68
b5fbb82 Make vvm optional, normally off.
steve authored
69 ifeq (@ENABLE_VVM@,yes)
70 SUB_VVM = vvm
71 endif
40da501 Add the pal loadable target.
steve authored
72
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
73 all: ivl@EXEEXT@ libvpi.a
b5fbb82 Make vvm optional, normally off.
steve authored
74 for dir in $(SUBDIRS) $(SUB_VVM); do (cd $$dir ; $(MAKE) all); done
b34a451 Cygwin port changes from Venkat
steve authored
75 cd vpi ; $(MAKE) all
59e85dc Support build in different directory.
steve authored
76 cd ivlpp ; $(MAKE) all
7c3f5c9 Support print of version number.
steve authored
77 cd driver ; $(MAKE) VERSION=$(VERSION) all
41f3ba6 xor and constant devices.
steve authored
78 cd tgt-verilog ; $(MAKE) all
79 cd tgt-stub ; $(MAKE) all
40da501 Add the pal loadable target.
steve authored
80 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) all); done
471d389 autoconf the makefiles.
steve authored
81
176e6d0 Add install of examples for Windows.
steve authored
82 # In the windows world, the installer will need a dosify program to
83 # dosify text files.
84 ifeq (@WIN32@,yes)
85 all: dosify.exe
86 dosify.exe: dosify.c
87 $(CC) -o dosify.exe dosify.c
1893e7c Add the iverilog-vpi command.
steve authored
88
89 else
90 all: iverilog-vpi
176e6d0 Add install of examples for Windows.
steve authored
91 endif
92
431228e make check target (PR#3)
steve authored
93 # This rule rules the compiler in the trivial hello.vl program to make
94 # sure the basics were compiled properly.
95 check: all
ac91dc3 Recursive make check target.
steve authored
96 for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) check); done
a87575a make check uses vvp instead of vvm.
steve authored
97 driver/iverilog -Ccheck.conf -ocheck.vvp -tvvp-check -B./ivlpp $(srcdir)/examples/hello.vl
d48bb4d Tell check target where to find system.vpi.
steve authored
98 vvp/vvp -M./vpi ./check.vvp | grep 'Hello, World'
431228e make check target (PR#3)
steve authored
99
471d389 autoconf the makefiles.
steve authored
100 clean:
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
101 rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc ivl@EXEEXT@ libivl.a libvpi.a
b34a451 Cygwin port changes from Venkat
steve authored
102 cd vpi ; $(MAKE) clean
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
103 cd driver ; $(MAKE) clean
59e85dc Support build in different directory.
steve authored
104 cd ivlpp ; $(MAKE) clean
41f3ba6 xor and constant devices.
steve authored
105 cd tgt-verilog ; $(MAKE) clean
106 cd tgt-stub ; $(MAKE) clean
b5fbb82 Make vvm optional, normally off.
steve authored
107 for dir in $(SUBDIRS) $(SUB_VVM); do (cd $$dir ; $(MAKE) clean); done
40da501 Add the pal loadable target.
steve authored
108 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) clean); done
471d389 autoconf the makefiles.
steve authored
109
8bad04a cannonical make targets, and strip on install.
steve authored
110 distclean: clean
b5fbb82 Make vvm optional, normally off.
steve authored
111 for dir in $(SUBDIRS) $(SUB_VVM); do (cd $$dir ; $(MAKE) distclean); done
32f3881 Rearrange VPI support libraries.
steve authored
112 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) distclean); done
8bad04a cannonical make targets, and strip on install.
steve authored
113 rm -f vvm/Makefile
b34a451 Cygwin port changes from Venkat
steve authored
114 rm -f vpi/Makefile
8bad04a cannonical make targets, and strip on install.
steve authored
115 rm -f ivlpp/Makefile
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
116 rm -f driver/Makefile
8bad04a cannonical make targets, and strip on install.
steve authored
117 rm -f config.status config.cache config.log
118 rm -f Makefile
119
b5fbb82 Make vvm optional, normally off.
steve authored
120 ifeq (@ENABLE_VVM@,yes)
121 TT_VVM = t-vvm.o
122 endif
123
124 TT = t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o $(TT_VVM) t-xnf.o
42e4ff4 Move inital value handling from NetNet to Nexus
steve authored
125 FF = nodangle.o synth.o syn-rules.o xnfio.o
471d389 autoconf the makefiles.
steve authored
126
4cfa3e4 Support the creation of scopes.
steve authored
127 O = main.o cprop.o design_dump.o dup_expr.o elaborate.o elab_expr.o \
f6507cb Check lvalue of procedural continuous assign (PR#29)
steve authored
128 elab_lval.o elab_net.o elab_anet.o elab_pexpr.o elab_scope.o \
219df16 Generalize the evaluation of floating point delays, and
steve authored
129 elab_sig.o emit.o eval.o eval_rconst.o \
b6ce313 move lval elaboration to PExpr virtual methods.
steve authored
130 eval_tree.o expr_synth.o functor.o lexor.o lexor_keyword.o link_const.o \
6466d02 Add automatic module libraries.
steve authored
131 load_module.o mangle.o netlist.o netmisc.o net_assign.o \
b7c2bd4 Add the NetUserFunc netlist node.
steve authored
132 net_design.o net_event.o net_expr.o net_force.o net_func.o \
133 net_link.o net_modulo.o \
364ffc9 Add support for bit select of parameters.
steve authored
134 net_proc.o net_scope.o net_udp.o pad_to_width.o \
0fb4ba7 Allow expanding of additive operators.
steve authored
135 parse.o parse_misc.o pform.o pform_dump.o \
1c41f8e Move set_width methods into a single file,
steve authored
136 set_width.o \
ab6c8cb Parser and pform use hierarchical names as hname_t
steve authored
137 verinum.o verireal.o target.o targets.o \
138 Attrib.o HName.o LineInfo.o Module.o PDelays.o PEvent.o \
2dd010d Named events as far as the pform.
steve authored
139 PExpr.o PGate.o \
e0a988b Add functions up to elaboration (Ed Carter)
steve authored
140 PTask.o PFunction.o PWire.o Statement.o \
3ff6912 Elaborate user defined tasks.
steve authored
141 $(FF) $(TT)
471d389 autoconf the makefiles.
steve authored
142
b825f8d Create a config.h.in file to hold all the config
steve authored
143 Makefile: Makefile.in config.h.in config.status
471d389 autoconf the makefiles.
steve authored
144 ./config.status
145
b62f094 Add the verilog.sh script.
steve authored
146
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
147 libvpi.a: vpithunk.o
148 rm -f $@
149 ar cvq $@ vpithunk.o
a73cfbc MacOS X compile time changes. (Timothy Wood)
steve authored
150 ranlib $@
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
151
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
152 # The vpithunk.c file (that makes up the libvpi.a library) needs to
153 # be make with PIC flags, because shared objects load it.
154 vpithunk.o: vpithunk.c
155 @[ -d dep ] || mkdir dep
156 $(CC) $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) -MD -c $< -o $*.o
157 mv $*.d dep/$*.d
158
159
de8c725 Mingw32 support (Venkat Iyer)
steve authored
160 ifeq (@WIN32@,yes)
3e4eb17 Another go at getting link of ivl.exe right.
steve authored
161 # Under Windows (mingw) I need to make the ivl.exe in two steps.
162 # The first step makes an ivl.exe that dlltool can use to make an
163 # export and import library, and the last link makes a, ivl.exe
164 # that really exports the things that the import library imports.
90ae464 Makefile patches to support target loading under cygwin.
steve authored
165 ivl@EXEEXT@: $O ivl.def
3e4eb17 Another go at getting link of ivl.exe right.
steve authored
166 $(CXX) -o ivl@EXEEXT@ $O $(dllib) @EXTRALIBS@
90ae464 Makefile patches to support target loading under cygwin.
steve authored
167 dlltool --dllname ivl@EXEEXT@ --def ivl.def \
168 --output-lib libivl.a --output-exp ivl.exp
3e4eb17 Another go at getting link of ivl.exe right.
steve authored
169 $(CXX) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@
90ae464 Makefile patches to support target loading under cygwin.
steve authored
170 else
b34a451 Cygwin port changes from Venkat
steve authored
171 ivl@EXEEXT@: $O
90ae464 Makefile patches to support target loading under cygwin.
steve authored
172 $(CXX) $(CXXFLAGS) $(rdynamic) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
173 endif
471d389 autoconf the makefiles.
steve authored
174
c0d51dd Add the iverilog driver program.
steve authored
175
1893e7c Add the iverilog-vpi command.
steve authored
176 ifeq (@WIN32@,yes)
177
178 else
179 iverilog-vpi: iverilog-vpi.sh
180 sed -e 's;@SHARED@;@shared@;' -e 's;@PIC@;@PICFLAG@;' $< > $@
181 chmod +x $@
182 endif
183
9680de2 Fix the clean target and excess dependencies.
steve authored
184 %.o: %.cc
f01cbc6 Remember to make the dep directory.
steve authored
185 @[ -d dep ] || mkdir dep
68a7ce3 include getopt if present.
steve authored
186 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
471d389 autoconf the makefiles.
steve authored
187 mv $*.d dep/$*.d
188
189
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
190 lexor.o: lexor.cc parse.h
471d389 autoconf the makefiles.
steve authored
191
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
192 parse.o: parse.cc
430d7b2 Add lexical support for real numbers.
steve authored
193
59e85dc Support build in different directory.
steve authored
194 parse.h parse.cc: $(srcdir)/parse.y
357a0ff Detect bison and flex in configure.in
steve authored
195 $(YACC) --verbose -t -p VL -d -o parse.cc $(srcdir)/parse.y
7bf480b Some bison versions choose different output names.
steve authored
196 mv parse.cc.h parse.h || mv parse.hh parse.h
471d389 autoconf the makefiles.
steve authored
197
3c9902d Use yacc based synthesizer.
steve authored
198 syn-rules.cc: $(srcdir)/syn-rules.y
357a0ff Detect bison and flex in configure.in
steve authored
199 $(YACC) --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
3c9902d Use yacc based synthesizer.
steve authored
200
59e85dc Support build in different directory.
steve authored
201 lexor.cc: $(srcdir)/lexor.lex
357a0ff Detect bison and flex in configure.in
steve authored
202 $(LEX) -PVL -s -olexor.cc $(srcdir)/lexor.lex
471d389 autoconf the makefiles.
steve authored
203
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
204 lexor_keyword.o: lexor_keyword.cc
6eef545 Support localparam.
steve authored
205
206 lexor_keyword.cc: lexor_keyword.gperf
a64a4d7 Fixes to support compilation using vpath.
steve authored
207 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)
6eef545 Support localparam.
steve authored
208
176e6d0 Add install of examples for Windows.
steve authored
209 ifeq (@WIN32@,yes)
fbf55b9 Get the hello.vl and sqrt.vl names right.
steve authored
210 WIN32_INSTALL = $(prefix)/hello.vl $(prefix)/sqrt.vl $(prefix)/QUICK_START.txt
1893e7c Add the iverilog-vpi command.
steve authored
211 else
212 WIN32_INSTALL = $(bindir)/iverilog-vpi
176e6d0 Add install of examples for Windows.
steve authored
213 endif
6eef545 Support localparam.
steve authored
214
176e6d0 Add install of examples for Windows.
steve authored
215 install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf $(includedir)/ivl_target.h $(includedir)/vpi_user.h $(libdir)/libvpi.a $(WIN32_INSTALL)
b34a451 Cygwin port changes from Venkat
steve authored
216 cd vpi ; $(MAKE) install
59e85dc Support build in different directory.
steve authored
217 cd ivlpp ; $(MAKE) install
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
218 cd driver ; $(MAKE) install
b5fbb82 Make vvm optional, normally off.
steve authored
219 for tgt in $(SUBDIRS) $(SUB_VVM); do (cd $$tgt ; $(MAKE) install); done
40da501 Add the pal loadable target.
steve authored
220 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) install); done
c0d51dd Add the iverilog driver program.
steve authored
221
1893e7c Add the iverilog-vpi command.
steve authored
222 $(bindir)/vpi-tool: ./vpi-tool
223 $(INSTALL_PROGRAM) ./vpi-tool $(bindir)/vpi-tool
224
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
225 $(libdir)/libvpi.a : ./libvpi.a
226 $(INSTALL_DATA) libvpi.a $(libdir)/libvpi.a
227
b34a451 Cygwin port changes from Venkat
steve authored
228 $(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
229 $(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@
a73cfbc MacOS X compile time changes. (Timothy Wood)
steve authored
230 $(STRIP) $(strip_dynamic) $(libdir)/ivl/ivl@EXEEXT@
471d389 autoconf the makefiles.
steve authored
231
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
232 $(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf
233 $(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf
234
d0fc6d5 Add ivl_target support for logic gates, and
steve authored
235 $(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
236 $(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h
237
32f3881 Rearrange VPI support libraries.
steve authored
238 $(includedir)/vpi_user.h: $(srcdir)/vpi_user.h
239 $(INSTALL_DATA) $(srcdir)/vpi_user.h $(includedir)/vpi_user.h
240
176e6d0 Add install of examples for Windows.
steve authored
241 # In windows installations, put a few examples and the quick_start
242 # into the destination directory.
243 ifeq (@WIN32@,yes)
fbf55b9 Get the hello.vl and sqrt.vl names right.
steve authored
244 $(prefix)/hello.vl: $(srcdir)/examples/hello.vl
d5658d4 dosify compiled with mingw does not know cygwin paths.
steve authored
245 ./dosify.exe $(srcdir)/examples/hello.vl tmp.vl
246 mv tmp.vl $(prefix)/hello.vl
176e6d0 Add install of examples for Windows.
steve authored
247
fbf55b9 Get the hello.vl and sqrt.vl names right.
steve authored
248 $(prefix)/sqrt.vl: $(srcdir)/examples/sqrt.vl
d5658d4 dosify compiled with mingw does not know cygwin paths.
steve authored
249 ./dosify.exe $(srcdir)/examples/sqrt.vl tmp.vl
250 mv tmp.vl $(prefix)/sqrt.vl
176e6d0 Add install of examples for Windows.
steve authored
251
252 $(prefix)/QUICK_START.txt: $(srcdir)/QUICK_START.txt
d5658d4 dosify compiled with mingw does not know cygwin paths.
steve authored
253 ./dosify.exe $(srcdir)/QUICK_START.txt tmp.txt
254 mv tmp.txt $(prefix)/QUICK_START.txt
176e6d0 Add install of examples for Windows.
steve authored
255 endif
256
471d389 autoconf the makefiles.
steve authored
257 installdirs: mkinstalldirs
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
258 $(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl
471d389 autoconf the makefiles.
steve authored
259
176e6d0 Add install of examples for Windows.
steve authored
260
471d389 autoconf the makefiles.
steve authored
261 uninstall:
b34a451 Cygwin port changes from Venkat
steve authored
262 rm -f $(libdir)/ivl/ivl@EXEEXT@
4faec15 Finally remove the verilog.sh script.
steve authored
263 rm -f $(bindir)/verilog
b34a451 Cygwin port changes from Venkat
steve authored
264 rm -f $(bindir)/gverilog@EXEEXT@
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
265 rm -f $(includedir)/ivl_target.h
32f3881 Rearrange VPI support libraries.
steve authored
266 rm -f $(includedir)/vpi_user.h
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
267 cd driver ; $(MAKE) uninstall
59e85dc Support build in different directory.
steve authored
268 cd vpi ; $(MAKE) uninstall
269 cd ivlpp ; $(MAKE) uninstall
b5fbb82 Make vvm optional, normally off.
steve authored
270 for tgt in $(SUBDIRS) $(SUB_VVM); do (cd $$tgt ; $(MAKE) uninstall); done
40da501 Add the pal loadable target.
steve authored
271 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) uninstall); done
471d389 autoconf the makefiles.
steve authored
272
273
274 -include $(patsubst %.o, dep/%.d, $O)
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
275 -include $(patsubst %.o, dep/%.d, vpithunk.o)
Something went wrong with that request. Please try again.