Add a mark at simulation end for vcd/lxt/lxt2 files.
[iverilog.git] / vpi / Makefile.in
blob7f8c2c6966b084fa639eee023e5cc1c9d1ca45bf
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)
6 # any later version.
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.61 2007/02/06 05:07:32 steve Exp $"
22 SHELL = /bin/sh
24 VERSION = 0.0
26 prefix = @prefix@
27 exec_prefix = @exec_prefix@
28 srcdir = @srcdir@
30 VPATH = $(srcdir)
32 bindir = @bindir@
33 libdir = @libdir@
34 includedir = $(prefix)/include
36 vpidir = $(libdir)/ivl/@vpidir1@
38 CC = @CC@
39 INSTALL = @INSTALL@
40 INSTALL_PROGRAM = @INSTALL_PROGRAM@
41 INSTALL_DATA = @INSTALL_DATA@
43 CPPFLAGS = @ident_support@ -I. -I$(srcdir)/.. -I$(srcdir) -I.. @file64_support@ @CPPFLAGS@ @DEFS@ @PICFLAG@
44 CFLAGS = -Wall @CFLAGS@
45 LDFLAGS = @LDFLAGS@
47 ifeq (@enable_vvp32@,yes)
48 vpidir32 = $(libdir)/ivl/@vpidir2@
49 ALL32 = all32
50 INSTALL32 = install32
51 UNINSTALL32 = uninistall32
52 endif
54 all: dep system.vpi $(ALL32)
56 dep:
57 mkdir dep
59 %.o: %.c
60 $(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
61 mv $*.d dep
63 O = sys_table.o sys_convert.o sys_deposit.o sys_display.o sys_fileio.o \
64 sys_finish.o sys_plusargs.o sys_random.o sys_random_mti.o \
65 sys_readmem.o sys_readmem_lex.o sys_scanf.o \
66 sys_time.o sys_vcd.o sys_vcdoff.o vcd_priv.o mt19937int.o priv.o stringheap.o
68 ifeq (@HAVE_LIBZ@,yes)
69 ifeq (@HAVE_LIBBZ2@,yes)
70 O += sys_lxt.o lxt_write.o
71 endif
72 O += sys_lxt2.o lxt2_write.o
73 endif
75 LIBS = @LIBS@
76 SYSTEM_VPI_LDFLAGS = $(LIBS)
77 ifeq (@MING32@,yes)
78 SYSTEM_VPI_LDFLAGS += @EXTRALIBS@
79 endif
81 system.vpi: $O ../vvp/libvpi.a
82 $(CC) @shared@ -o $@ $O -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
84 sys_readmem_lex.c: sys_readmem_lex.lex
85 flex -t -Preadmem $(srcdir)/sys_readmem_lex.lex > sys_readmem_lex.c
87 ifeq (@enable_vvp32@,yes)
89 all32: bin32 bin32/system.vpi
91 bin32:
92 mkdir bin32
94 bin32/%.o: %.c
95 $(CC) -m32 $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $@
97 bin32/system.vpi: $(addprefix bin32/,$O)
98 $(CC) -m32 @shared@ -o $@ $(addprefix bin32/,$O) -L../vvp/bin32 $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
100 install32: all32 $(vpidir32)/system.vpi
102 $(vpidir32)/system.vpi: bin32/system.vpi
103 $(INSTALL_PROGRAM) bin32/system.vpi $(vpidir32)/system.vpi
105 uninstall32:
106 rm -f $(vpidir32)/system.vpi
107 endif
109 clean:
110 rm -rf *.o sys_readmem_lex.c dep system.vpi bin32
112 distclean: clean
113 rm -f Makefile config.status config.log vpi_config.h
115 install: all installdirs $(vpidir)/system.vpi $(libdir)/ivl/system.sft $(INSTALL32)
117 $(vpidir)/system.vpi: ./system.vpi
118 $(INSTALL_PROGRAM) ./system.vpi $(vpidir)/system.vpi
120 $(libdir)/ivl/system.sft: system.sft
121 $(INSTALL_DATA) $< $@
123 installdirs: ../mkinstalldirs
124 $(srcdir)/../mkinstalldirs $(vpidir)
126 uninstall: $(UNINSTALL32)
127 rm -f $(vpidir)/system.vpi
128 rm -f $(libdir)/ivl/system.sft
131 -include $(patsubst %.o, dep/%.d, $O)