iverilog/vpi/Makefile.in

217 lines
6.3 KiB
Makefile
Raw Normal View History

#
# 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
suffix = @install_suffix@
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
VPATH = $(srcdir)
2000-11-11 01:48:35 +01:00
bindir = @bindir@
libdir = @libdir@
includedir = $(prefix)/include
vpidir = $(libdir)/ivl$(suffix)
CC = @CC@
CXX = @CXX@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
LEX = @LEX@
YACC = @YACC@
ifeq (@srcdir@,.)
INCLUDE_PATH = -I. -I..
else
INCLUDE_PATH = -I. -I.. -I$(srcdir) -I$(srcdir)/..
endif
CPPFLAGS = $(INCLUDE_PATH) @file64_support@ @CPPFLAGS@ @DEFS@ @PICFLAG@
CFLAGS = @WARNING_FLAGS@ @CFLAGS@
CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
LDFLAGS = @LDFLAGS@
# Object files for system.vpi
O = sys_table.o sys_convert.o sys_deposit.o sys_display.o sys_fileio.o \
Add the stochastic (queue) tasks/function This patch adds full support for the stochastic tasks/functions except the mean inter-arrival and average wait statistics are not currently available. These will be added in a later patch. This implementation goes a bit beyond the standard and supports the following: 1. The job and inform arguments support 32 bit four state values. 2. The id for all routines, the job and inform arguments for $q_add(), the statistic code for $q_exam() along with the queue type and maximum length arguments for $q_initialize() can be less than or equal to 32 bits. The argument will be sign extended if needed to fill the internal 32 bit value. 3. The job and inform arguments to $q_remove() and the status argument for all the routines must be 32 bits, but do not have to be an integer variable (e.g. a 32 bit register or part select is OK). 4. An undefined bit in the id argument for any of the routines will return a status of 2 (undefined queue id). Undefined bits are not automatically converted to zero. 5. Undefined bits in the $q_initialize() queue type and maximum length arguments or the $q_exam() statistic code argument are also flagged as an error (are not converted to zero). 6. The $q_full() function returns 2 on error, the other routines that return a value $q_remove() job/inform arguments and the $q_exam() statistic value argument will usually return x on error. 7. An invalid statistic code will set the $q_exam() status to 8. 8. The $q_exam() statistic value argument can be 32 bits or larger. This allows returning large statistical time values. 9. All time values are internally saved in simulation time units. They will be converted to the calling module's time unit (with rounding) before they are returned. 10. If a $q_exam() statistical value is too large to fit into the variable the maximum positive value will be returned and the status code will be set to 9 (value is too large). 11. If a statistical value is currently undefined $q_exam() will return 10 (no statistical information) (e.g. using code 5 on an empty queue).
2011-04-11 02:16:25 +02:00
sys_finish.o sys_icarus.o sys_plusargs.o sys_queue.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 \
table_mod.o table_mod_lexor.o table_mod_parse.o
OPP = vcd_priv2.o
2003-09-13 03:28:47 +02:00
ifeq (@HAVE_LIBZ@,yes)
ifeq (@HAVE_LIBBZ2@,yes)
O += sys_lxt.o lxt_write.o
endif
O += sys_lxt2.o lxt2_write.o
O += sys_fst.o fstapi.o fastlz.o
2003-09-13 03:28:47 +02:00
endif
# Object files for v2005_math.vpi
M = sys_clog2.o v2005_math.o
# Object files for va_math.vpi
V = va_math.o
V2009 = v2009_table.o v2009_enum.o
VHDL_SYS = vhdl_table.o
all: dep system.vpi va_math.vpi v2005_math.vpi v2009.vpi vhdl_sys.vpi $(ALL32)
check: all
clean:
rm -rf *.o sys_readmem_lex.c dep system.vpi
rm -f sdf_lexor.c sdf_parse.c sdf_parse.output sdf_parse.h
rm -f table_mod_parse.c table_mod_parse.h table_mod_parse.output
rm -f table_mod_lexor.c
rm -f va_math.vpi v2005_math.vpi v2009.vpi vhdl_sys.vpi
distclean: clean
rm -f Makefile config.log
rm -f vpi_config.h stamp-vpi_config-h
cppcheck: $(O:.o=.c) $(OPP:.o=.cc) $(M:.o=.c) $(V:.o=.c)
cppcheck --enable=all -f --suppressions $(srcdir)/cppcheck.sup \
$(INCLUDE_PATH) $^
Makefile: $(srcdir)/Makefile.in ../config.status
cd ..; ./config.status --file=vpi/$@
dep:
mkdir dep
%.o: %.c vpi_config.h
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
mv $*.d dep
%.o: %.cc vpi_config.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
mv $*.d dep
LIBS = @LIBS@
SYSTEM_VPI_LDFLAGS = $(LIBS)
VA_MATH_LDFLAGS =
ifeq (@MINGW32@,yes)
SYSTEM_VPI_LDFLAGS += @EXTRALIBS@
VA_MATH_LDFLAGS += @EXTRALIBS@
2001-06-15 07:05:04 +02:00
endif
system.vpi: $O $(OPP) ../vvp/libvpi.a
$(CXX) @shared@ -o $@ $O $(OPP) -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
sys_readmem_lex.c: sys_readmem_lex.lex
$(LEX) -t $(srcdir)/sys_readmem_lex.lex > sys_readmem_lex.c
sdf_lexor.o: sdf_lexor.c sdf_parse.h
sdf_lexor.c: sdf_lexor.lex
$(LEX) -t $(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
table_mod_lexor.o: table_mod_lexor.c table_mod_parse.h
table_mod_lexor.c: $(srcdir)/table_mod_lexor.lex
$(LEX) -t $< > $@
table_mod_parse.c table_mod_parse.h: $(srcdir)/table_mod_parse.y
$(YACC) --verbose -d -p tblmod -o table_mod_parse.c $<
v2005_math.vpi: $M ../vvp/libvpi.a
$(CC) @shared@ -o $@ $M -L../vvp $(LDFLAGS) -lvpi $(VA_MATH_VPI_LDFLAGS)
v2009.vpi: $(V2009) ../vvp/libvpi.a
$(CC) @shared@ -o $@ $(V2009) -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
va_math.vpi: $V ../vvp/libvpi.a
$(CC) @shared@ -o $@ $V -L../vvp $(LDFLAGS) -lvpi $(VA_MATH_VPI_LDFLAGS)
vhdl_sys.vpi: $(VHDL_SYS) ../vvp/libvpi.a
$(CXX) @shared@ -o $@ $(VHDL_SYS) -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
stamp-vpi_config-h: $(srcdir)/vpi_config.h.in ../config.status
@rm -f $@
cd ..; ./config.status --header=vpi/vpi_config.h
vpi_config.h: stamp-vpi_config-h
install: all installdirs \
$(vpidir)/system.vpi $(vpidir)/system.sft \
$(vpidir)/va_math.vpi $(vpidir)/va_math.sft \
$(vpidir)/v2005_math.vpi $(vpidir)/v2005_math.sft \
$(vpidir)/v2009.vpi $(vpidir)/v2009.sft \
$(vpidir)/vhdl_sys.vpi $(vpidir)/vhdl_sys.sft
$(vpidir)/system.vpi: ./system.vpi
$(INSTALL_PROGRAM) ./system.vpi "$(DESTDIR)$(vpidir)/system.vpi"
$(vpidir)/system.sft: system.sft
$(INSTALL_DATA) $< "$(DESTDIR)$@"
$(vpidir)/va_math.vpi: ./va_math.vpi
$(INSTALL_PROGRAM) ./va_math.vpi "$(DESTDIR)$(vpidir)/va_math.vpi"
$(vpidir)/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"
$(vpidir)/v2005_math.sft: v2005_math.sft
$(INSTALL_DATA) $< "$(DESTDIR)$@"
$(vpidir)/v2009.vpi: ./v2009.vpi
$(INSTALL_PROGRAM) ./v2009.vpi "$(DESTDIR)$(vpidir)/v2009.vpi"
$(vpidir)/v2009.sft: v2009.sft
$(INSTALL_DATA) $< "$(DESTDIR)$@"
$(vpidir)/vhdl_sys.vpi: ./vhdl_sys.vpi
$(INSTALL_PROGRAM) ./vhdl_sys.vpi "$(DESTDIR)$(vpidir)/vhdl_sys.vpi"
$(vpidir)/vhdl_sys.sft: vhdl_sys.sft
$(INSTALL_DATA) $< "$(DESTDIR)$@"
installdirs: $(srcdir)/../mkinstalldirs
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(libdir)" "$(DESTDIR)$(vpidir)"
uninstall:
rm -f "$(DESTDIR)$(vpidir)/system.vpi"
rm -f "$(DESTDIR)$(vpidir)/system.sft"
rm -f "$(DESTDIR)$(vpidir)/va_math.vpi"
rm -f "$(DESTDIR)$(vpidir)/va_math.sft"
rm -f "$(DESTDIR)$(vpidir)/v2005_math.vpi"
rm -f "$(DESTDIR)$(vpidir)/v2005_math.sft"
rm -f "$(DESTDIR)$(vpidir)/v2009.vpi"
rm -f "$(DESTDIR)$(vpidir)/v2009.sft"
rm -f "$(DESTDIR)$(vpidir)/vhdl_sys.vpi"
rm -f "$(DESTDIR)$(vpidir)/vhdl_sys.sft"
-include $(patsubst %.o, dep/%.d, $O)
-include $(patsubst %.o, dep/%.d, $(OPP))
-include $(patsubst %.o, dep/%.d, $M)
-include $(patsubst %.o, dep/%.d, $V)