Skip to content
Newer
Older
100644 193 lines (157 sloc) 5.54 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 #
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
19 #ident "$Id: Makefile.in,v 1.84 2000/12/02 05:30:08 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
30 VPATH = $(srcdir)
31
197ed46 configure bindir and libdir
steve authored
32 bindir = @bindir@
33 libdir = @libdir@
471d389 autoconf the makefiles.
steve authored
34 includedir = $(prefix)/include
35
566aad9 Start stub for loadable targets.
steve authored
36 dllib=@DLLIB@
37 rdynamic=@rdynamic@
38
471d389 autoconf the makefiles.
steve authored
39 CC = @CC@
40 CXX = @CXX@
41 INSTALL = @INSTALL@
e6bd088 Compile time problems with vpi_user.h
steve authored
42 INSTALL_SCRIPT = @INSTALL_SCRIPT@
471d389 autoconf the makefiles.
steve authored
43 INSTALL_PROGRAM = @INSTALL_PROGRAM@
44 INSTALL_DATA = @INSTALL_DATA@
8bad04a cannonical make targets, and strip on install.
steve authored
45 STRIP = @STRIP@
471d389 autoconf the makefiles.
steve authored
46
47 CPPFLAGS = @CPPFLAGS@ @DEFS@
59e85dc Support build in different directory.
steve authored
48 CXXFLAGS = @CXXFLAGS@ -I$(srcdir)
471d389 autoconf the makefiles.
steve authored
49 LDFLAGS = @LDFLAGS@
50
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
51 all: ivl@EXEEXT@
59e85dc Support build in different directory.
steve authored
52 cd vvm ; $(MAKE) all
b34a451 Cygwin port changes from Venkat
steve authored
53 cd vpi ; $(MAKE) all
59e85dc Support build in different directory.
steve authored
54 cd ivlpp ; $(MAKE) all
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
55 cd driver ; $(MAKE) all
d0ec7e2 Make the null target into a loadable target.
steve authored
56 cd tgt-null ; $(MAKE) all
41f3ba6 xor and constant devices.
steve authored
57 cd tgt-verilog ; $(MAKE) all
58 cd tgt-stub ; $(MAKE) all
471d389 autoconf the makefiles.
steve authored
59
431228e make check target (PR#3)
steve authored
60 # This rule rules the compiler in the trivial hello.vl program to make
61 # sure the basics were compiled properly.
62 check: all
72229ab check explicitly uses local libraries.
steve authored
63 driver/iverilog -Ccheck.conf -ocheck -tvvm-check -B./ivlpp examples/hello.vl
10fbb2a Glitches in cygwin build process.
steve authored
64 $(CXX) -o check $(rdynamic) -fno-exceptions -Ivvm -Ivpi -Lvvm check.cc -lvvm -lvpip $(dllib)
72229ab check explicitly uses local libraries.
steve authored
65 ./check | grep 'Hello, World'
431228e make check target (PR#3)
steve authored
66
471d389 autoconf the makefiles.
steve authored
67 clean:
28af357 Clean a bit more completely.
steve authored
68 rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc verilog ivl@EXEEXT@ libivl.a
59e85dc Support build in different directory.
steve authored
69 cd vvm ; $(MAKE) clean
b34a451 Cygwin port changes from Venkat
steve authored
70 cd vpi ; $(MAKE) clean
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
71 cd driver ; $(MAKE) clean
59e85dc Support build in different directory.
steve authored
72 cd ivlpp ; $(MAKE) clean
d0ec7e2 Make the null target into a loadable target.
steve authored
73 cd tgt-null ; $(MAKE) clean
41f3ba6 xor and constant devices.
steve authored
74 cd tgt-verilog ; $(MAKE) clean
75 cd tgt-stub ; $(MAKE) clean
471d389 autoconf the makefiles.
steve authored
76
8bad04a cannonical make targets, and strip on install.
steve authored
77 distclean: clean
78 rm -f vvm/Makefile
b34a451 Cygwin port changes from Venkat
steve authored
79 rm -f vpi/Makefile
8bad04a cannonical make targets, and strip on install.
steve authored
80 rm -f ivlpp/Makefile
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
81 rm -f driver/Makefile
8bad04a cannonical make targets, and strip on install.
steve authored
82 rm -f config.status config.cache config.log
83 rm -f Makefile
84
d0ec7e2 Make the null target into a loadable target.
steve authored
85 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
86 FF = nodangle.o synth.o syn-rules.o xnfio.o
471d389 autoconf the makefiles.
steve authored
87
4cfa3e4 Support the creation of scopes.
steve authored
88 O = main.o cprop.o design_dump.o dup_expr.o elaborate.o elab_expr.o \
b6ce313 move lval elaboration to PExpr virtual methods.
steve authored
89 elab_lval.o elab_net.o elab_pexpr.o elab_scope.o elab_sig.o emit.o eval.o \
90 eval_tree.o expr_synth.o functor.o lexor.o lexor_keyword.o link_const.o \
ac81f6a Rearrange NetAssign to make NetAssign_ separate.
steve authored
91 mangle.o netlist.o net_assign.o \
89d7176 Add support for modulus (Eric Aardoom)
steve authored
92 net_design.o net_event.o net_force.o net_link.o net_modulo.o net_proc.o \
93 net_scope.o net_udp.o \
30e8289 Simulate named event trigger and waits.
steve authored
94 pad_to_width.o \
0fb4ba7 Allow expanding of additive operators.
steve authored
95 parse.o parse_misc.o pform.o pform_dump.o \
1c41f8e Move set_width methods into a single file,
steve authored
96 set_width.o \
ef49fc1 Change LineInfo to store const C strings.
steve authored
97 verinum.o verireal.o target.o targets.o util.o \
98 LineInfo.o Module.o PDelays.o PEvent.o \
2dd010d Named events as far as the pform.
steve authored
99 PExpr.o PGate.o \
e0a988b Add functions up to elaboration (Ed Carter)
steve authored
100 PTask.o PFunction.o PWire.o Statement.o \
3ff6912 Elaborate user defined tasks.
steve authored
101 $(FF) $(TT)
471d389 autoconf the makefiles.
steve authored
102
103 Makefile: Makefile.in config.status
104 ./config.status
105
b62f094 Add the verilog.sh script.
steve authored
106 # Make the actual verilog program from the script template. This
107 # simply invloves editing the substitution strings in the script into
108 # the configured copy.
109 tmp1 = bindir
110 tmp2 = libdir
a4143f8 autoconf the verilog script to run anywhere.
steve authored
111 tmp3 = includedir
112 tmp4 = CXX
b62f094 Add the verilog.sh script.
steve authored
113 verilog: $(srcdir)/verilog.sh
a4143f8 autoconf the verilog script to run anywhere.
steve authored
114 sed -e 's;@$(tmp1)@;@bindir@;' \
115 -e 's;@$(tmp2)@;@libdir@;' \
116 -e 's;@$(tmp3)@;@includedir@;' \
ce0b97a Fix up compiling with configured -ldl switch.
steve authored
117 -e 's;@dllib@;@DLLIB@;' \
a4143f8 autoconf the verilog script to run anywhere.
steve authored
118 -e 's;@$(tmp4)@;@CXX@;' < $< > $@
b62f094 Add the verilog.sh script.
steve authored
119
90ae464 Makefile patches to support target loading under cygwin.
steve authored
120 ifeq (@CYGWIN@,yes)
121 ivl@EXEEXT@: $O ivl.def
122 dlltool --dllname ivl@EXEEXT@ --def ivl.def \
123 --output-lib libivl.a --output-exp ivl.exp
124 # $(CXX) -o ivl@EXEEXT@ -Wl,--base-file,ivl.base ivl.exp $O $(dllib)
125 # dlltool --dllname ivl@EXEEXT@ --base-file ivl.base \
126 # --output-exp ivl.exp --def ivl.def
127 $(CXX) -o ivl@EXEEXT@ ivl.exp $O $(dllib)
128 else
b34a451 Cygwin port changes from Venkat
steve authored
129 ivl@EXEEXT@: $O
90ae464 Makefile patches to support target loading under cygwin.
steve authored
130 $(CXX) $(CXXFLAGS) $(rdynamic) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
131 endif
471d389 autoconf the makefiles.
steve authored
132
c0d51dd Add the iverilog driver program.
steve authored
133
9680de2 Fix the clean target and excess dependencies.
steve authored
134 %.o: %.cc
f01cbc6 Remember to make the dep directory.
steve authored
135 @[ -d dep ] || mkdir dep
68a7ce3 include getopt if present.
steve authored
136 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
471d389 autoconf the makefiles.
steve authored
137 mv $*.d dep/$*.d
138
139
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
140 lexor.o: lexor.cc parse.h
471d389 autoconf the makefiles.
steve authored
141
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
142 parse.o: parse.cc
430d7b2 Add lexical support for real numbers.
steve authored
143
59e85dc Support build in different directory.
steve authored
144 parse.h parse.cc: $(srcdir)/parse.y
145 bison --verbose -t -p VL -d $(srcdir)/parse.y -o parse.cc
471d389 autoconf the makefiles.
steve authored
146 mv parse.cc.h parse.h
147
3c9902d Use yacc based synthesizer.
steve authored
148 syn-rules.cc: $(srcdir)/syn-rules.y
149 bison --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
150
59e85dc Support build in different directory.
steve authored
151 lexor.cc: $(srcdir)/lexor.lex
152 flex -PVL -s -olexor.cc $(srcdir)/lexor.lex
471d389 autoconf the makefiles.
steve authored
153
ff53b60 Remove excess *.d dependencies for parse.d
steve authored
154 lexor_keyword.o: lexor_keyword.cc
6eef545 Support localparam.
steve authored
155
156 lexor_keyword.cc: lexor_keyword.gperf
79ca317 Better handle failures to build lexor_keyword.cc
steve authored
157 gperf -o -i 7 -C -k 1-3,$$ -L ANSI-C -H keyword_hash -N check_identifier -t lexor_keyword.gperf > lexor_keyword.cc || (rm -f lexor_keyword.cc ; false)
6eef545 Support localparam.
steve authored
158
159
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
160 install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf $(includedir)/ivl_target.h
59e85dc Support build in different directory.
steve authored
161 cd vvm ; $(MAKE) install
b34a451 Cygwin port changes from Venkat
steve authored
162 cd vpi ; $(MAKE) install
59e85dc Support build in different directory.
steve authored
163 cd ivlpp ; $(MAKE) install
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
164 cd driver ; $(MAKE) install
d0ec7e2 Make the null target into a loadable target.
steve authored
165 cd tgt-null ; $(MAKE) install
c0d51dd Add the iverilog driver program.
steve authored
166
b34a451 Cygwin port changes from Venkat
steve authored
167 $(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
168 $(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@
169 $(STRIP) $(libdir)/ivl/ivl@EXEEXT@
471d389 autoconf the makefiles.
steve authored
170
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
171 $(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf
172 $(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf
173
d0fc6d5 Add ivl_target support for logic gates, and
steve authored
174 $(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
175 $(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h
176
471d389 autoconf the makefiles.
steve authored
177 installdirs: mkinstalldirs
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
178 $(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl
471d389 autoconf the makefiles.
steve authored
179
180 uninstall:
b34a451 Cygwin port changes from Venkat
steve authored
181 rm -f $(libdir)/ivl/ivl@EXEEXT@
182 rm -f $(bindir)/verilog@EXEEXT@
183 rm -f $(bindir)/gverilog@EXEEXT@
5ce28c1 iverilog with an iverilog.conf configuration file.
steve authored
184 rm -f $(includedir)/ivl_target.h
185 cd driver ; $(MAKE) uninstall
59e85dc Support build in different directory.
steve authored
186 cd vpi ; $(MAKE) uninstall
187 cd vvm ; $(MAKE) uninstall
188 cd ivlpp ; $(MAKE) uninstall
d0ec7e2 Make the null target into a loadable target.
steve authored
189 cd tgt-null ; $(MAKE) uninstall
471d389 autoconf the makefiles.
steve authored
190
191
192 -include $(patsubst %.o, dep/%.d, $O)
Something went wrong with that request. Please try again.