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)
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
24 exec_prefix = @
exec_prefix@
31 includedir = $(prefix)/include
33 vpidir
= $(libdir)/ivl
37 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
38 INSTALL_DATA
= @INSTALL_DATA@
42 CPPFLAGS
= @ident_support@
-I.
-I
$(srcdir)/..
-I
$(srcdir) -I.. @file64_support@ @CPPFLAGS@ @DEFS@ @PICFLAG@
43 CFLAGS
= -Wall @CFLAGS@
46 all: dep system.vpi va_math.vpi
$(ALL32
)
54 $(CC
) $(CPPFLAGS
) $(CFLAGS
) -MD
-c
$< -o
$*.o
57 # Object files for system.vpi
58 O
= sys_table.o sys_convert.o sys_deposit.o sys_display.o sys_fileio.o \
59 sys_finish.o sys_icarus.o sys_plusargs.o sys_random.o sys_random_mti.o \
60 sys_readmem.o sys_readmem_lex.o sys_scanf.o sys_sdf.o \
61 sys_time.o sys_vcd.o sys_vcdoff.o vcd_priv.o \
62 mt19937int.o priv.o sdf_lexor.o sdf_parse.o stringheap.o
64 ifeq (@HAVE_LIBZ@
,yes
)
65 ifeq (@HAVE_LIBBZ2@
,yes
)
66 O
+= sys_lxt.o lxt_write.o
68 O
+= sys_lxt2.o lxt2_write.o
71 # Object files for va_math.vpi
75 SYSTEM_VPI_LDFLAGS
= $(LIBS
)
78 SYSTEM_VPI_LDFLAGS
+= @EXTRALIBS@
79 VA_MATH_LDFLAGS
+= @EXTRALIBS@
82 system.vpi
: $O ..
/vvp
/libvpi.a
83 $(CC
) @shared@
-o
$@
$O -L..
/vvp
$(LDFLAGS
) -lvpi
$(SYSTEM_VPI_LDFLAGS
)
85 sys_readmem_lex.c
: sys_readmem_lex.
lex
86 flex
-t
-Preadmem
$(srcdir)/sys_readmem_lex.
lex > sys_readmem_lex.c
88 sdf_lexor.o
: sdf_lexor.c sdf_parse.h
90 sdf_lexor.c
: sdf_lexor.
lex
91 flex
-t
-Psdf
$(srcdir)/sdf_lexor.
lex > sdf_lexor.c
93 sdf_parse.c sdf_parse.h
: $(srcdir)/sdf_parse.y
94 $(YACC
) --verbose
-d
-p sdf
-o sdf_parse.c
$(srcdir)/sdf_parse.y
96 va_math.vpi
: $V ..
/vvp
/libvpi.a
97 $(CC
) @shared@
-o
$@
$V -L..
/vvp
$(LDFLAGS
) -lvpi
$(VA_MATH_VPI_LDFLAGS
)
100 rm -rf
*.o sys_readmem_lex.c dep system.vpi va_math.vpi bin32
101 rm -f sdf_lexor.c sdf_parse.c sdf_parse.output sdf_parse.h
104 rm -f Makefile config.status config.log vpi_config.h
108 install: all installdirs \
109 $(vpidir
)/system.vpi
$(libdir)/ivl
/system.sft \
110 $(vpidir
)/va_math.vpi
$(libdir)/ivl
/va_math.sft \
113 $(vpidir
)/system.vpi
: .
/system.vpi
114 $(INSTALL_PROGRAM
) .
/system.vpi
$(vpidir
)/system.vpi
116 $(libdir)/ivl
/system.sft
: system.sft
117 $(INSTALL_DATA
) $< $@
119 $(vpidir
)/va_math.vpi
: .
/va_math.vpi
120 $(INSTALL_PROGRAM
) .
/va_math.vpi
$(vpidir
)/va_math.vpi
122 $(libdir)/ivl
/va_math.sft
: va_math.sft
123 $(INSTALL_DATA
) $< $@
125 installdirs: ..
/mkinstalldirs
126 $(srcdir)/..
/mkinstalldirs
$(vpidir
)
129 rm -f
$(vpidir
)/system.vpi
130 rm -f
$(libdir)/ivl
/system.sft
131 rm -f
$(vpidir
)/va_math.vpi
132 rm -f
$(libdir)/ivl
/va_math.sft
135 -include $(patsubst %.o
, dep
/%.d
, $O)