iverilog/Makefile.in

180 lines
5.1 KiB
Makefile
Raw Normal View History

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
#
#ident "$Id: Makefile.in,v 1.86 2000/12/04 17:37:03 steve Exp $"
1999-04-25 23:54:33 +02:00
#
#
SHELL = /bin/sh
VERSION = 0.3
1999-04-25 23:54:33 +02:00
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
VPATH = $(srcdir)
2000-11-11 01:48:35 +01:00
bindir = @bindir@
libdir = @libdir@
1999-04-25 23:54:33 +02:00
includedir = $(prefix)/include
2000-08-12 18:34:37 +02:00
dllib=@DLLIB@
rdynamic=@rdynamic@
1999-04-25 23:54:33 +02:00
CC = @CC@
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@
STRIP = @STRIP@
1999-04-25 23:54:33 +02:00
CPPFLAGS = @CPPFLAGS@ @DEFS@
1999-10-23 01:58:13 +02:00
CXXFLAGS = @CXXFLAGS@ -I$(srcdir)
1999-04-25 23:54:33 +02:00
LDFLAGS = @LDFLAGS@
all: ivl@EXEEXT@
1999-10-23 01:58:13 +02:00
cd vvm ; $(MAKE) all
2000-09-30 05:20:47 +02:00
cd vpi ; $(MAKE) all
1999-10-23 01:58:13 +02:00
cd ivlpp ; $(MAKE) all
cd driver ; $(MAKE) all
cd tgt-null ; $(MAKE) all
2000-10-05 07:03:01 +02:00
cd tgt-verilog ; $(MAKE) all
cd tgt-stub ; $(MAKE) all
1999-04-25 23:54:33 +02:00
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
2000-10-28 19:51:45 +02:00
driver/iverilog -Ccheck.conf -ocheck -tvvm-check -B./ivlpp examples/hello.vl
2000-10-28 21:12:43 +02:00
$(CXX) -o check $(rdynamic) -fno-exceptions -Ivvm -Ivpi -Lvvm check.cc -lvvm -lvpip $(dllib)
2000-10-28 19:51:45 +02:00
./check | grep 'Hello, World'
2000-10-28 05:58:11 +02:00
1999-04-25 23:54:33 +02:00
clean:
2000-12-02 06:57:46 +01:00
rm -f *.o parse.cc parse.cc.output parse.h dep/*.d lexor.cc lexor_keyword.cc ivl@EXEEXT@ libivl.a
1999-10-23 01:58:13 +02:00
cd vvm ; $(MAKE) clean
2000-09-30 05:20:47 +02:00
cd vpi ; $(MAKE) clean
cd driver ; $(MAKE) clean
1999-10-23 01:58:13 +02:00
cd ivlpp ; $(MAKE) clean
cd tgt-null ; $(MAKE) clean
2000-10-05 07:03:01 +02:00
cd tgt-verilog ; $(MAKE) clean
cd tgt-stub ; $(MAKE) clean
1999-04-25 23:54:33 +02:00
distclean: clean
rm -f vvm/Makefile
2000-09-30 05:20:47 +02:00
rm -f vpi/Makefile
rm -f ivlpp/Makefile
rm -f driver/Makefile
rm -f config.status config.cache config.log
rm -f Makefile
TT = t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o t-vvm.o t-xnf.o
FF = nodangle.o synth.o syn-rules.o xnfio.o
1999-04-25 23:54:33 +02:00
1999-11-27 20:07:57 +01:00
O = main.o cprop.o design_dump.o dup_expr.o elaborate.o elab_expr.o \
elab_lval.o elab_net.o elab_pexpr.o elab_scope.o elab_sig.o emit.o eval.o \
eval_tree.o expr_synth.o functor.o lexor.o lexor_keyword.o link_const.o \
mangle.o netlist.o net_assign.o \
2000-09-17 23:26:15 +02:00
net_design.o net_event.o net_force.o net_link.o net_modulo.o net_proc.o \
net_scope.o net_udp.o \
pad_to_width.o \
1999-09-29 02:42:50 +02:00
parse.o parse_misc.o pform.o pform_dump.o \
set_width.o \
verinum.o verireal.o target.o targets.o util.o \
Attrib.o LineInfo.o Module.o PDelays.o PEvent.o \
2000-04-01 21:31:57 +02:00
PExpr.o PGate.o \
PTask.o PFunction.o PWire.o Statement.o \
1999-07-03 04:12:51 +02:00
$(FF) $(TT)
1999-04-25 23:54:33 +02:00
Makefile: Makefile.in config.status
./config.status
1999-08-17 17:57:43 +02:00
ifeq (@CYGWIN@,yes)
ivl@EXEEXT@: $O ivl.def
dlltool --dllname ivl@EXEEXT@ --def ivl.def \
--output-lib libivl.a --output-exp ivl.exp
# $(CXX) -o ivl@EXEEXT@ -Wl,--base-file,ivl.base ivl.exp $O $(dllib)
# dlltool --dllname ivl@EXEEXT@ --base-file ivl.base \
# --output-exp ivl.exp --def ivl.def
$(CXX) -o ivl@EXEEXT@ ivl.exp $O $(dllib)
else
2000-09-30 05:20:47 +02:00
ivl@EXEEXT@: $O
$(CXX) $(CXXFLAGS) $(rdynamic) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
endif
1999-04-25 23:54:33 +02:00
2000-04-21 08:41:02 +02:00
%.o: %.cc
1999-04-26 04:45:08 +02:00
@[ -d dep ] || mkdir dep
1999-11-29 18:02:21 +01:00
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c $< -o $*.o
1999-04-25 23:54:33 +02:00
mv $*.d dep/$*.d
lexor.o: lexor.cc parse.h
1999-04-25 23:54:33 +02:00
parse.o: parse.cc
1999-06-15 04:50:02 +02:00
1999-10-23 01:58:13 +02:00
parse.h parse.cc: $(srcdir)/parse.y
bison --verbose -t -p VL -d $(srcdir)/parse.y -o parse.cc
1999-04-25 23:54:33 +02:00
mv parse.cc.h parse.h
2000-05-13 22:55:47 +02:00
syn-rules.cc: $(srcdir)/syn-rules.y
bison --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
1999-10-23 01:58:13 +02:00
lexor.cc: $(srcdir)/lexor.lex
flex -PVL -s -olexor.cc $(srcdir)/lexor.lex
1999-04-25 23:54:33 +02:00
lexor_keyword.o: lexor_keyword.cc
2000-03-12 18:09:40 +01:00
lexor_keyword.cc: lexor_keyword.gperf
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)
2000-03-12 18:09:40 +01:00
install: all installdirs $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf $(includedir)/ivl_target.h
1999-10-23 01:58:13 +02:00
cd vvm ; $(MAKE) install
2000-09-30 05:20:47 +02:00
cd vpi ; $(MAKE) install
1999-10-23 01:58:13 +02:00
cd ivlpp ; $(MAKE) install
cd driver ; $(MAKE) install
cd tgt-null ; $(MAKE) install
2000-04-21 08:41:02 +02:00
2000-09-30 05:20:47 +02:00
$(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@
$(STRIP) $(libdir)/ivl/ivl@EXEEXT@
1999-04-25 23:54:33 +02:00
$(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf
$(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf
$(includedir)/ivl_target.h: $(srcdir)/ivl_target.h
$(INSTALL_DATA) $(srcdir)/ivl_target.h $(includedir)/ivl_target.h
1999-04-25 23:54:33 +02:00
installdirs: mkinstalldirs
$(srcdir)/mkinstalldirs $(bindir) $(includedir) $(libdir)/ivl
1999-04-25 23:54:33 +02:00
uninstall:
2000-09-30 05:20:47 +02:00
rm -f $(libdir)/ivl/ivl@EXEEXT@
2000-12-02 06:57:46 +01:00
rm -f $(bindir)/verilog
2000-09-30 05:20:47 +02:00
rm -f $(bindir)/gverilog@EXEEXT@
rm -f $(includedir)/ivl_target.h
cd driver ; $(MAKE) uninstall
1999-10-23 01:58:13 +02:00
cd vpi ; $(MAKE) uninstall
cd vvm ; $(MAKE) uninstall
cd ivlpp ; $(MAKE) uninstall
cd tgt-null ; $(MAKE) uninstall
1999-04-25 23:54:33 +02:00
-include $(patsubst %.o, dep/%.d, $O)