151 lines
4.1 KiB
Makefile
151 lines
4.1 KiB
Makefile
#
|
|
# 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)
|
|
# any later version.
|
|
#
|
|
# 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
|
|
#
|
|
SHELL = /bin/sh
|
|
|
|
VERSION = 0.9.devel
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = $(srcdir)
|
|
|
|
bindir = @bindir@
|
|
libdir = @libdir@
|
|
includedir = $(prefix)/include
|
|
|
|
vpidir = $(libdir)/ivl
|
|
|
|
CC = @CC@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
LEX = @LEX@
|
|
YACC = @YACC@
|
|
|
|
CPPFLAGS = @ident_support@ -I. -I$(srcdir)/.. -I$(srcdir) -I.. @file64_support@ @CPPFLAGS@ @DEFS@ @PICFLAG@
|
|
CFLAGS = -Wall @CFLAGS@
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
all: dep system.vpi va_math.vpi v2005_math.vpi $(ALL32)
|
|
|
|
check: all
|
|
|
|
dep:
|
|
mkdir dep
|
|
|
|
%.o: %.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
|
|
mv $*.d dep
|
|
|
|
# Object files for system.vpi
|
|
O = sys_table.o sys_convert.o sys_deposit.o sys_display.o sys_fileio.o \
|
|
sys_finish.o sys_icarus.o sys_plusargs.o sys_random.o sys_random_mti.o \
|
|
sys_readmem.o sys_readmem_lex.o sys_scanf.o sys_sdf.o \
|
|
sys_time.o sys_vcd.o sys_vcdoff.o vcd_priv.o \
|
|
mt19937int.o sys_priv.o sdf_lexor.o sdf_parse.o stringheap.o \
|
|
vams_simparam.o
|
|
|
|
ifeq (@HAVE_LIBZ@,yes)
|
|
ifeq (@HAVE_LIBBZ2@,yes)
|
|
O += sys_lxt.o lxt_write.o
|
|
endif
|
|
O += sys_lxt2.o lxt2_write.o
|
|
endif
|
|
|
|
# Object files for v2005_math.vpi
|
|
M = sys_clog2.o v2005_math.o
|
|
|
|
# Object files for va_math.vpi
|
|
V = va_math.o
|
|
|
|
LIBS = @LIBS@
|
|
SYSTEM_VPI_LDFLAGS = $(LIBS)
|
|
VA_MATH_LDFLAGS =
|
|
ifeq (@MINGW32@,yes)
|
|
SYSTEM_VPI_LDFLAGS += @EXTRALIBS@
|
|
VA_MATH_LDFLAGS += @EXTRALIBS@
|
|
endif
|
|
|
|
system.vpi: $O ../vvp/libvpi.a
|
|
$(CC) @shared@ -o $@ $O -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
|
|
|
|
sys_readmem_lex.c: sys_readmem_lex.lex
|
|
flex -t -Preadmem $(srcdir)/sys_readmem_lex.lex > sys_readmem_lex.c
|
|
|
|
sdf_lexor.o: sdf_lexor.c sdf_parse.h
|
|
|
|
sdf_lexor.c: sdf_lexor.lex
|
|
flex -t -Psdf $(srcdir)/sdf_lexor.lex > sdf_lexor.c
|
|
|
|
sdf_parse.c sdf_parse.h: $(srcdir)/sdf_parse.y
|
|
$(YACC) --verbose -d -p sdf -o sdf_parse.c $(srcdir)/sdf_parse.y
|
|
|
|
v2005_math.vpi: $M ../vvp/libvpi.a
|
|
$(CC) @shared@ -o $@ $M -L../vvp $(LDFLAGS) -lvpi $(VA_MATH_VPI_LDFLAGS)
|
|
|
|
va_math.vpi: $V ../vvp/libvpi.a
|
|
$(CC) @shared@ -o $@ $V -L../vvp $(LDFLAGS) -lvpi $(VA_MATH_VPI_LDFLAGS)
|
|
|
|
clean:
|
|
rm -rf *.o sys_readmem_lex.c dep system.vpi bin32
|
|
rm -f sdf_lexor.c sdf_parse.c sdf_parse.output sdf_parse.h
|
|
rm -f va_math.vpi v2005_math.vpi
|
|
|
|
distclean: clean
|
|
rm -f Makefile config.status config.log vpi_config.h
|
|
|
|
check: all
|
|
|
|
install: all installdirs \
|
|
$(vpidir)/system.vpi $(libdir)/ivl/system.sft \
|
|
$(vpidir)/va_math.vpi $(libdir)/ivl/va_math.sft \
|
|
$(vpidir)/v2005_math.vpi $(libdir)/ivl/v2005_math.sft
|
|
|
|
$(vpidir)/system.vpi: ./system.vpi
|
|
$(INSTALL_PROGRAM) ./system.vpi $(DESTDIR)$(vpidir)/system.vpi
|
|
|
|
$(libdir)/ivl/system.sft: system.sft
|
|
$(INSTALL_DATA) $< $(DESTDIR)$@
|
|
|
|
$(vpidir)/va_math.vpi: ./va_math.vpi
|
|
$(INSTALL_PROGRAM) ./va_math.vpi $(DESTDIR)$(vpidir)/va_math.vpi
|
|
|
|
$(libdir)/ivl/va_math.sft: va_math.sft
|
|
$(INSTALL_DATA) $< $(DESTDIR)$@
|
|
|
|
$(vpidir)/v2005_math.vpi: ./v2005_math.vpi
|
|
$(INSTALL_PROGRAM) ./v2005_math.vpi $(DESTDIR)$(vpidir)/v2005_math.vpi
|
|
|
|
$(libdir)/ivl/v2005_math.sft: v2005_math.sft
|
|
$(INSTALL_DATA) $< $(DESTDIR)$@
|
|
|
|
installdirs: ../mkinstalldirs
|
|
$(srcdir)/../mkinstalldirs $(DESTDIR)$(libdir) $(DESTDIR)$(vpidir)
|
|
|
|
uninstall:
|
|
rm -f $(DESTDIR)$(vpidir)/system.vpi
|
|
rm -f $(DESTDIR)$(libdir)/ivl/system.sft
|
|
rm -f $(DESTDIR)$(vpidir)/va_math.vpi
|
|
rm -f $(DESTDIR)$(libdir)/ivl/va_math.sft
|
|
rm -f $(DESTDIR)$(vpidir)/v2005_math.vpi
|
|
rm -f $(DESTDIR)$(libdir)/ivl/v2005_math.sft
|
|
|
|
-include $(patsubst %.o, dep/%.d, $O)
|