Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 219 lines (175 sloc) 6.832 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 #
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
19 #ident "$Id: Makefile.in,v 1.98 2001/07/11 19:32:02 steve Exp $"
471d389 autoconf the makefiles.
steve authored
20 #
21 #
22 SHELL = /bin/sh
23
d0fc6d5 Add ivl_target support for logic gates, and
steve authored
24 VERSION = 0.3
471d389 autoconf the makefiles.
steve authored
25
26 prefix = @prefix@
27 exec_prefix = @exec_prefix@
28 srcdir = @srcdir@
29
cb65ee5 Add the vvp engine to cvs.
steve authored
30 SUBDIRS = @subdirs@
31
471d389 autoconf the makefiles.
steve authored
32 VPATH = $(srcdir)
33
197ed46 configure bindir and libdir
steve authored
34 bindir = @bindir@
35 libdir = @libdir@
471d389 autoconf the makefiles.
steve authored
36 includedir = $(prefix)/include
37
566aad9 Start stub for loadable targets.
steve authored
38 dllib=@DLLIB@
39 rdynamic=@rdynamic@
40
471d389 autoconf the makefiles.
steve authored
41 CC = @CC@
42 CXX = @CXX@
43 INSTALL = @INSTALL@
e6bd088 Compile time problems with vpi_user.h
steve authored
44 INSTALL_SCRIPT = @INSTALL_SCRIPT@
471d389 autoconf the makefiles.
steve authored
45 INSTALL_PROGRAM = @INSTALL_PROGRAM@
46 INSTALL_DATA = @INSTALL_DATA@
8bad04a cannonical make targets, and strip on install.
steve authored
47 STRIP = @STRIP@
471d389 autoconf the makefiles.
steve authored
48
49 CPPFLAGS = @CPPFLAGS@ @DEFS@
a64a4d7 Fixes to support compilation using vpath.
steve authored
50 CXXFLAGS = @CXXFLAGS@ -I. -I$(srcdir)
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
51 PICFLAGS = @PICFLAG@
471d389 autoconf the makefiles.
steve authored
52 LDFLAGS = @LDFLAGS@
53
40da501 Add the pal loadable target.
steve authored
54 # The TARGETS variable lists the target modules that can be build and
55 # installed. Some of them depend on external things, so are only
56 # compiled if the prerequisites are installed.
57 TARGETS = tgt-null
58 ifeq ('@HAVE_IPAL@','yes')
59 TARGETS += tgt-pal
60 endif
61
62
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
63 all: ivl@EXEEXT@ libvpi.a
32f3881 Rearrange VPI support libraries.
steve authored
64 for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) all); done
59e85dc Support build in different directory.
steve authored
65 cd vvm ; $(MAKE) all
b34a451 Cygwin port changes from Venkat
steve authored
66 cd vpi ; $(MAKE) all
59e85dc Support build in different directory.
steve authored
67 cd ivlpp ; $(MAKE) all
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
68 cd driver ; $(MAKE) all
41f3ba6 xor and constant devices.
steve authored
69 cd tgt-verilog ; $(MAKE) all
70 cd tgt-stub ; $(MAKE) all
40da501 Add the pal loadable target.
steve authored
71 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) all); done
471d389 autoconf the makefiles.
steve authored
72
431228e make check target (PR#3)
steve authored
73 # This rule rules the compiler in the trivial hello.vl program to make
74 # sure the basics were compiled properly.
75 check: all
ac91dc3 Recursive make check target.
steve authored
76 for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) check); done
72229ab check explicitly uses local libraries.
steve authored
77 driver/iverilog -Ccheck.conf -ocheck -tvvm-check -B./ivlpp examples/hello.vl
2d4f33a Use the correct paths for vpip in make check.
steve authored
78 $(CXX) -o check $(rdynamic) -fno-exceptions -I$(srcdir) -I$(srcdir)/vvm -I$(srcdir)/vpip -Lvvm -Lvpip check.cc -lvvm -lvpip $(dllib)
72229ab check explicitly uses local libraries.
steve authored
79 ./check | grep 'Hello, World'
431228e make check target (PR#3)
steve authored
80
471d389 autoconf the makefiles.
steve authored
81 clean:
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
82 rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc ivl@EXEEXT@ libivl.a libvpi.a
59e85dc Support build in different directory.
steve authored
83 cd vvm ; $(MAKE) clean
b34a451 Cygwin port changes from Venkat
steve authored
84 cd vpi ; $(MAKE) clean
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
85 cd driver ; $(MAKE) clean
59e85dc Support build in different directory.
steve authored
86 cd ivlpp ; $(MAKE) clean
41f3ba6 xor and constant devices.
steve authored
87 cd tgt-verilog ; $(MAKE) clean
88 cd tgt-stub ; $(MAKE) clean
32f3881 Rearrange VPI support libraries.
steve authored
89 for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) clean); done
40da501 Add the pal loadable target.
steve authored
90 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) clean); done
471d389 autoconf the makefiles.
steve authored
91
8bad04a cannonical make targets, and strip on install.
steve authored
92 distclean: clean
32f3881 Rearrange VPI support libraries.
steve authored
93 for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) distclean); done
94 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) distclean); done
8bad04a cannonical make targets, and strip on install.
steve authored
95 rm -f vvm/Makefile
b34a451 Cygwin port changes from Venkat
steve authored
96 rm -f vpi/Makefile
8bad04a cannonical make targets, and strip on install.
steve authored
97 rm -f ivlpp/Makefile
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
98 rm -f driver/Makefile
8bad04a cannonical make targets, and strip on install.
steve authored
99 rm -f config.status config.cache config.log
100 rm -f Makefile
101
d0ec7e2 Make the null target into a loadable target.
steve authored
102 TT = t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o t-vvm.o t-xnf.o
42e4ff4 Move inital value handling from NetNet to Nexus
steve authored
103 FF = nodangle.o synth.o syn-rules.o xnfio.o
471d389 autoconf the makefiles.
steve authored
104
4cfa3e4 Support the creation of scopes.
steve authored
105 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
106 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
107 elab_sig.o emit.o eval.o eval_rconst.o \
b6ce313 move lval elaboration to PExpr virtual methods.
steve authored
108 eval_tree.o expr_synth.o functor.o lexor.o lexor_keyword.o link_const.o \
f5d0211 In the context of range declarations, use elab_and_eval instead
steve authored
109 mangle.o netlist.o netmisc.o net_assign.o \
89d7176 Add support for modulus (Eric Aardoom)
steve authored
110 net_design.o net_event.o net_force.o net_link.o net_modulo.o net_proc.o \
f6507cb Check lvalue of procedural continuous assign (PR#29)
steve authored
111 net_scope.o net_udp.o pad_to_width.o \
0fb4ba7 Allow expanding of additive operators.
steve authored
112 parse.o parse_misc.o pform.o pform_dump.o \
1c41f8e Move set_width methods into a single file,
steve authored
113 set_width.o \
ef49fc1 Change LineInfo to store const C strings.
steve authored
114 verinum.o verireal.o target.o targets.o util.o \
4f63888 Add Attrib class for holding NetObj attributes.
steve authored
115 Attrib.o LineInfo.o Module.o PDelays.o PEvent.o \
2dd010d Named events as far as the pform.
steve authored
116 PExpr.o PGate.o \
e0a988b Add functions up to elaboration (Ed Carter)
steve authored
117 PTask.o PFunction.o PWire.o Statement.o \
3ff6912 Elaborate user defined tasks.
steve authored
118 $(FF) $(TT)
471d389 autoconf the makefiles.
steve authored
119
120 Makefile: Makefile.in config.status
121 ./config.status
122
b62f094 Add the verilog.sh script.
steve authored
123
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
124 libvpi.a: vpithunk.o
125 rm -f $@
126 ar cvq $@ vpithunk.o
127
3154f07 compile libvpi.a with PIC flags (Dan McMahill)
steve authored
128 # The vpithunk.c file (that makes up the libvpi.a library) needs to
129 # be make with PIC flags, because shared objects load it.
130 vpithunk.o: vpithunk.c
131 @[ -d dep ] || mkdir dep
132 $(CC) $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) -MD -c $< -o $*.o
133 mv $*.d dep/$*.d
134
135
de8c725 Mingw32 support (Venkat Iyer)
steve authored
136 ifeq (@WIN32@,yes)
90ae464 Makefile patches to support target loading under cygwin.
steve authored
137 ivl@EXEEXT@: $O ivl.def
138 dlltool --dllname ivl@EXEEXT@ --def ivl.def \
139 --output-lib libivl.a --output-exp ivl.exp
140 # $(CXX) -o ivl@EXEEXT@ -Wl,--base-file,ivl.base ivl.exp $O $(dllib)
141 # dlltool --dllname ivl@EXEEXT@ --base-file ivl.base \
142 # --output-exp ivl.exp --def ivl.def
de8c725 Mingw32 support (Venkat Iyer)
steve authored
143 $(CXX) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@
90ae464 Makefile patches to support target loading under cygwin.
steve authored
144 else
b34a451 Cygwin port changes from Venkat
steve authored
145 ivl@EXEEXT@: $O
90ae464 Makefile patches to support target loading under cygwin.
steve authored
146 $(CXX) $(CXXFLAGS) $(rdynamic) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
147 endif
471d389 autoconf the makefiles.
steve authored
148
c0d51dd Add the iverilog driver program.
steve authored
149
9680de2 Fix the clean target and excess dependencies.
steve authored
150 %.o: %.cc
f01cbc6 Remember to make the dep directory.
steve authored
151 @[ -d dep ] || mkdir dep
68a7ce3 include getopt if present.
steve authored
152 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
471d389 autoconf the makefiles.
steve authored
153 mv $*.d dep/$*.d
154
155
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
156 lexor.o: lexor.cc parse.h
471d389 autoconf the makefiles.
steve authored
157
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
158 parse.o: parse.cc
430d7b2 Add lexical support for real numbers.
steve authored
159
59e85dc Support build in different directory.
steve authored
160 parse.h parse.cc: $(srcdir)/parse.y
161 bison --verbose -t -p VL -d $(srcdir)/parse.y -o parse.cc
471d389 autoconf the makefiles.
steve authored
162 mv parse.cc.h parse.h
163
3c9902d Use yacc based synthesizer.
steve authored
164 syn-rules.cc: $(srcdir)/syn-rules.y
165 bison --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
166
59e85dc Support build in different directory.
steve authored
167 lexor.cc: $(srcdir)/lexor.lex
168 flex -PVL -s -olexor.cc $(srcdir)/lexor.lex
471d389 autoconf the makefiles.
steve authored
169
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
170 lexor_keyword.o: lexor_keyword.cc
6eef545 Support localparam.
steve authored
171
172 lexor_keyword.cc: lexor_keyword.gperf
a64a4d7 Fixes to support compilation using vpath.
steve authored
173 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
174
175
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
176 install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf $(includedir)/ivl_target.h $(includedir)/vpi_user.h $(libdir)/libvpi.a
59e85dc Support build in different directory.
steve authored
177 cd vvm ; $(MAKE) install
b34a451 Cygwin port changes from Venkat
steve authored
178 cd vpi ; $(MAKE) install
59e85dc Support build in different directory.
steve authored
179 cd ivlpp ; $(MAKE) install
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
180 cd driver ; $(MAKE) install
32f3881 Rearrange VPI support libraries.
steve authored
181 for tgt in $(SUBDIRS); do (cd $$tgt ; $(MAKE) install); done
40da501 Add the pal loadable target.
steve authored
182 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) install); done
c0d51dd Add the iverilog driver program.
steve authored
183
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
184 $(libdir)/libvpi.a : ./libvpi.a
185 $(INSTALL_DATA) libvpi.a $(libdir)/libvpi.a
186
b34a451 Cygwin port changes from Venkat
steve authored
187 $(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
188 $(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@
189 $(STRIP) $(libdir)/ivl/ivl@EXEEXT@
471d389 autoconf the makefiles.
steve authored
190
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
191 $(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf
192 $(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf
193
d0fc6d5 Add ivl_target support for logic gates, and
steve authored
194 $(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
195 $(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h
196
32f3881 Rearrange VPI support libraries.
steve authored
197 $(includedir)/vpi_user.h: $(srcdir)/vpi_user.h
198 $(INSTALL_DATA) $(srcdir)/vpi_user.h $(includedir)/vpi_user.h
199
471d389 autoconf the makefiles.
steve authored
200 installdirs: mkinstalldirs
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
201 $(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl
471d389 autoconf the makefiles.
steve authored
202
203 uninstall:
b34a451 Cygwin port changes from Venkat
steve authored
204 rm -f $(libdir)/ivl/ivl@EXEEXT@
4faec15 Finally remove the verilog.sh script.
steve authored
205 rm -f $(bindir)/verilog
b34a451 Cygwin port changes from Venkat
steve authored
206 rm -f $(bindir)/gverilog@EXEEXT@
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
207 rm -f $(includedir)/ivl_target.h
32f3881 Rearrange VPI support libraries.
steve authored
208 rm -f $(includedir)/vpi_user.h
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
209 cd driver ; $(MAKE) uninstall
59e85dc Support build in different directory.
steve authored
210 cd vpi ; $(MAKE) uninstall
211 cd vvm ; $(MAKE) uninstall
212 cd ivlpp ; $(MAKE) uninstall
32f3881 Rearrange VPI support libraries.
steve authored
213 for tgt in $(SUBDIRS); do (cd $$tgt ; $(MAKE) uninstall); done
40da501 Add the pal loadable target.
steve authored
214 for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) uninstall); done
471d389 autoconf the makefiles.
steve authored
215
216
217 -include $(patsubst %.o, dep/%.d, $O)
b6e1d63 Change the VPI call process so that loaded .vpi modules
steve authored
218 -include $(patsubst %.o, dep/%.d, vpithunk.o)
Something went wrong with that request. Please try again.