diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5197876b9..c2a7cbe85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,6 +71,32 @@ jobs: cd Documentation make html + lin-with-libvvp: + strategy: + fail-fast: false + matrix: + os: [ + '22.04', + '24.04' + ] + runs-on: ubuntu-${{ matrix.os }} + name: '🐧 Ubuntu ${{ matrix.os }} (with libvvp)' + steps: + + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt update -qq + sudo apt install -y make g++ git bison flex gperf libreadline-dev libbz2-dev autoconf python3-sphinx python3-docopt + + - name: Build, check and install + run: | + autoconf + ./configure --enable-libveriuser --enable-libvvp + make -j$(nproc) check + sudo make install + win: runs-on: windows-latest strategy: diff --git a/Documentation/developer/version_stamps.rst b/Documentation/developer/version_stamps.rst index 3e84ddb37..5342d9aff 100644 --- a/Documentation/developer/version_stamps.rst +++ b/Documentation/developer/version_stamps.rst @@ -17,7 +17,7 @@ the "make version" target, or automatically if the version_tag.h file doesn't exist at all. This implies that a "make version" is something worth doing when you do a "git pull" or create commits. -The files below are now edited by the Makefile and the version.exe program: +The files below are now edited by the Makefile: * iverilog-vpi.man -- The .TH tag has a version string * driver/iverilog.man -- The .TH tag has a version string diff --git a/Documentation/usage/installation.rst b/Documentation/usage/installation.rst index 090f020f0..e79d26fa5 100644 --- a/Documentation/usage/installation.rst +++ b/Documentation/usage/installation.rst @@ -373,7 +373,5 @@ Next, compile with the command:: $ make -The configure generated the cross compiler flags, but there are a few -bits that need to be compiled with the native compiler. (version.exe -for example is used by the build process but is not installed.) The +The configure generated the cross compiler flags. The configure script should have gotten all that right. diff --git a/Makefile.in b/Makefile.in index 6972bda98..52fdb0019 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,6 +36,8 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ datarootdir = @datarootdir@ +VERSION_MAJOR = @VERSION_MAJOR@ +VERSION_MINOR = @VERSION_MINOR@ SUBDIRS = ivlpp vhdlpp vvp vpi tgt-null tgt-stub tgt-vvp \ tgt-vhdl tgt-vlog95 tgt-pcb tgt-blif tgt-sizer driver @@ -159,14 +161,14 @@ else rm vvp/vvp$(suffix).exe endif else - vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World' + LD_LIBRARY_PATH=$(srcdir)/vvp vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World' endif clean: $(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true rm -f *.o parse.cc parse.h lexor.cc rm -f ivl.exp iverilog-vpi.man iverilog-vpi.pdf iverilog-vpi.ps - rm -f iverilog_man.ps iverilog_man.pdf iverilog_man_`./version.exe %M_%n`.pdf + rm -f iverilog_man.ps iverilog_man.pdf iverilog_man_$(VERSION_MAJOR)_$(VERSION_MINOR).pdf rm -f parse.output syn-rules.output dosify$(BUILDEXT) ivl@EXEEXT@ check.vvp rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc rm -rf dep @@ -279,9 +281,8 @@ lexor_keyword.o: lexor_keyword.cc parse.h lexor_keyword.cc: $(srcdir)/lexor_keyword.gperf gperf -o -i 7 -C -k 1-4,6,9,$$ -H keyword_hash -N check_identifier -t $< > $@ || (rm -f $@ ; false) -iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in version.exe - ./version.exe `head -1 $<`'\n' > $@ - tail -n +2 $< >> $@ +iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in + # generated by autoconf iverilog-vpi.ps: iverilog-vpi.man $(MAN) -t ./$< > $@ @@ -292,9 +293,9 @@ iverilog-vpi.pdf: iverilog-vpi.ps iverilog_man.ps: driver/iverilog.man vvp/vvp.man iverilog-vpi.man $(GROFF) -man -rC1 -rD1 -T ps $^ > $@ -iverilog_man.pdf: iverilog_man.ps version.exe +iverilog_man.pdf: iverilog_man.ps $(PS2PDF) $< $@ - cp $@ iverilog_man_`./version.exe %M_%n`.pdf + cp $@ iverilog-vpi.man_$(VERSION_MAJOR)_$(VERSION_MINOR).pdf # For VERSION_TAG in driver/main.c, first try git-describe, then look for a # release_tag.h file in the source tree (included in snapshots and releases), diff --git a/configure.ac b/configure.ac index 023753457..f21efedd9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,25 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT +m4_define([VER_MAJOR], [14]) +m4_define([VER_MINOR], [0]) +m4_define([VER_EXTRA], [stable]) +AC_INIT([iverilog], [VER_MAJOR.VER_MINOR (VER_EXTRA)]) +AC_SUBST([VERSION_MAJOR], [VER_MAJOR]) +AC_SUBST([VERSION_MINOR], [VER_MINOR]) +AC_SUBST([VERSION_EXTRA], [" (VER_EXTRA)"]) +AC_SUBST([VERSION], ["VER_MAJOR.VER_MINOR (VER_EXTRA)"]) +# used in res.rc +AC_SUBST([PRODUCTVERSION], ["VER_MAJOR,VER_MINOR,0,0"]) + +# setup libvvp soversion, which depends on abi not package version +AC_SUBST([LIBVVP_SOVERSION], [1]) +# setup libvvp version +AC_SUBST([LIBVVP_VERSION], [VER_MAJOR.VER_MINOR]) + +# setup libvvp soversion, which depends on abi not package version +AC_SUBST([LIBVVP_SOVERSION], [1]) +# setup libvvp version +AC_SUBST([LIBVVP_VERSION], [VER_MAJOR.VER_MINOR]) + AC_CONFIG_SRCDIR([netlist.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([_pli_types.h]) @@ -184,7 +204,16 @@ AC_FUNC_FSEEKO # Build VVP as a library and stub AC_ARG_ENABLE([libvvp], [AS_HELP_STRING([--enable-libvvp], [build VVP as a shared library])], - [AC_SUBST(LIBVVP, yes)],[]) + [enable_libvvp=yes], + [enable_libvvp=no]) + +AC_SUBST([LIBVVP], [$enable_libvvp]) + +AS_IF([test "x$enable_libvvp" = "xyes"], [ + AC_MSG_NOTICE([libvvp support enabled]) +], [ + AC_MSG_NOTICE([libvvp support disabled]) +]) AC_ARG_ENABLE([libveriuser], [AS_HELP_STRING([--enable-libveriuser], [include support for PLI 1 (deprecated)])], @@ -366,5 +395,5 @@ then AC_MSG_ERROR(cannot configure white space in libdir: $libdir) fi AC_MSG_RESULT(ok) -AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile]) +AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h iverilog-vpi.man driver/iverilog.man driver-vpi/res.rc vvp/vvp.man vvp/libvvp.pc]) AC_OUTPUT diff --git a/driver-vpi/Makefile.in b/driver-vpi/Makefile.in index bb8d66bc2..2403101e4 100644 --- a/driver-vpi/Makefile.in +++ b/driver-vpi/Makefile.in @@ -95,9 +95,8 @@ else endif # Windows specific... -res.rc: $(srcdir)/res.rc.in ../version.exe - sed -e 's;@PRODUCTVERSION@;'`../version.exe '%M,%n,0,0'`';' \ - $(srcdir)/res.rc.in > $@ +res.rc: $(srcdir)/res.rc.in + # generated by autoconf res.o: res.rc $(WINDRES) -i res.rc -o res.o diff --git a/driver/Makefile.in b/driver/Makefile.in index 38ab633a9..2ff6a9176 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -102,9 +102,8 @@ main.o: main.c globals.h $(srcdir)/../version_base.h ../version_tag.h Makefile | cflexor.o: cflexor.c cfparse.h -iverilog.man: $(srcdir)/iverilog.man.in ../version.exe - ../version.exe `head -1 $<`'\n' > $@ - tail -n +2 $< >> $@ +iverilog.man: $(srcdir)/iverilog.man.in + # generated by autoconf iverilog.ps: iverilog.man $(MAN) -t ./$< > $@ diff --git a/driver/iverilog.man.in b/driver/iverilog.man.in index 21dbf72dc..4ff682a48 100644 --- a/driver/iverilog.man.in +++ b/driver/iverilog.man.in @@ -1,4 +1,4 @@ -.TH iverilog 1 "Jan 13th, 2026" "" "Version %M.%n%E" +.TH iverilog 1 "Jan 13th, 2026" "" "Version @VERSION@" .SH NAME iverilog - Icarus Verilog compiler diff --git a/iverilog-vpi.man.in b/iverilog-vpi.man.in index 23741e1c2..13a85a586 100644 --- a/iverilog-vpi.man.in +++ b/iverilog-vpi.man.in @@ -1,4 +1,4 @@ -.TH iverilog-vpi 1 "Jan 13th, 2026" "" "Version %M.%n%E" +.TH iverilog-vpi 1 "Jan 13th, 2026" "" "Version @VERSION@" .SH NAME iverilog-vpi - Compile front end for VPI modules diff --git a/scripts/CREATE_BRANCH.sh b/scripts/CREATE_BRANCH.sh index e35546072..9e717e062 100644 --- a/scripts/CREATE_BRANCH.sh +++ b/scripts/CREATE_BRANCH.sh @@ -27,7 +27,8 @@ case $1 in esac major=$1 - +minor=0 +extra="stable" branch="v${major}-branch" branch_exists=`git ls-remote --heads origin $branch` @@ -39,10 +40,11 @@ fi echo "Creating branch $branch" git checkout -b $branch -echo "Updating version_base.h..." -sed -i -E "s/(define\s+VERSION_MAJOR\s+).*/\1$major/" version_base.h -sed -i -E "s/(define\s+VERSION_MINOR\s+).*/\10/" version_base.h -sed -i -E "s/(define\s+VERSION_EXTRA\s+).*/\1\" \(stable\)\"/" version_base.h +file=configure.ac +echo "Updating $file..." +sed -i -E "s/(m4_define\(\[VER_MAJOR\],[[:space:]]*\[)[^]]*(\]\))/\1$major\2/" $file +sed -i -E "s/(m4_define\(\[VER_MINOR\],[[:space:]]*\[)[^]]*(\]\))/\1$minor\2/" $file +sed -i -E "s/(m4_define\(\[VER_EXTRA\],[[:space:]]*\[)[^]]*(\]\))/\1$extra\2/" $file echo "Updating aclocal.m4..." sed -i -E "s/(install_suffix='-)dev/\1$major/" aclocal.m4 diff --git a/version_base.h b/version_base.h.in similarity index 76% rename from version_base.h rename to version_base.h.in index 46b0e93eb..a0064332c 100644 --- a/version_base.h +++ b/version_base.h.in @@ -3,14 +3,14 @@ * Edit this definition in version_base.in to define the base version * number for the compiled result. */ -# define VERSION_MAJOR 14 -# define VERSION_MINOR 0 +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ /* * This will be appended to the version. Use this to mark development * versions and the like. */ -# define VERSION_EXTRA " (devel)" +# define VERSION_EXTRA "@VERSION_EXTRA@" # define VERSION_STRINGIFY(x) #x # define VERSION_STR(a,b,extra) VERSION_STRINGIFY(a.b) extra diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 941ffdee1..9ecdf21e5 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -23,6 +23,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ datarootdir = @datarootdir@ +builddir = @builddir@ VPATH = $(srcdir) @@ -33,6 +34,7 @@ mandir = @mandir@ # It is a little different from the generic includedir. includedir = @includedir@/iverilog$(suffix) pdfdir = @docdir@ +pkgconfigdir = $(libdir)/pkgconfig # For a cross compile these defines will need to be set accordingly. HOSTCC = @CC@ @@ -60,36 +62,80 @@ CPPFLAGS = $(INCLUDE_PATH) @CPPFLAGS@ @DEFS@ -DICARUS_VPI_CONST=const CFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CC@ @CFLAGS@ CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@ LDFLAGS = @rdynamic@ @LDFLAGS@ -LIBS = @LIBS@ @EXTRALIBS@ +LIBS = @LIBS@ @EXTRALIBS@ @DLLIB@ -ifeq (@WIN32@,yes) +LIBVVP_VERSION = @LIBVVP_VERSION@ +LIBVVP_SOVERSION = @LIBVVP_SOVERSION@ +LIBBASENAME=vvp$(suffix) + +ifeq (@MINGW32@,yes) SLDIR=$(bindir) SLEXT=dll +IMPEXT=dll.a +LIBPREFIX=lib +LIBNAME=$(LIBPREFIX)$(LIBBASENAME) +LIBSONAME=$(LIBNAME).$(SLEXT).$(LIBVVP_SOVERSION) +LIBREALNAME=$(LIBNAME).$(SLEXT).$(LIBVVP_VERSION) +LIBLINKNAME=$(LIBNAME).$(SLEXT) +LIBTARGET=$(LIBNAME)-$(LIBVVP_SOVERSION).$(SLEXT) +LIBBUILD=$(LIBTARGET) +LIBLINKFLAGS=-Wl,--out-implib $(LIBNAME).$(IMPEXT) -Wl,--no-undefined +LIBPOSTBUILD=@true +LIBINSTALL=$(LIBTARGET) +LIBDEVELINSTALL=$(LIBNAME).$(IMPEXT) +else ifeq (@WIN32@,yes) +SLDIR=$(bindir) +SLEXT=dll +IMPEXT=lib +LIBPREFIX= +LIBNAME=$(LIBPREFIX)$(LIBBASENAME) +LIBSONAME=$(LIBNAME).$(SLEXT).$(LIBVVP_SOVERSION) +LIBREALNAME=$(LIBNAME).$(SLEXT).$(LIBVVP_VERSION) +LIBLINKNAME=$(LIBNAME).$(SLEXT) +LIBTARGET=$(LIBLINKNAME) +LIBBUILD=$(LIBLINKNAME) +LIBLINKFLAGS= +LIBPOSTBUILD=@true +LIBINSTALL=$(LIBTARGET) +LIBDEVELINSTALL= else +CXXFLAGS+= -fPIC +CFLAGS+= -fPIC SLDIR=$(libdir) SLEXT=so +LIBPREFIX=lib +LIBNAME=$(LIBPREFIX)$(LIBBASENAME) +LIBSONAME=$(LIBNAME).$(SLEXT).$(LIBVVP_SOVERSION) +LIBREALNAME=$(LIBNAME).$(SLEXT).$(LIBVVP_VERSION) +LIBLINKNAME=$(LIBNAME).$(SLEXT) +LIBTARGET=$(LIBREALNAME) +LIBBUILD=$(LIBLINKNAME) +LIBLINKFLAGS=-Wl,-soname,$(LIBSONAME) +LIBPOSTBUILD=ln -sf $(LIBREALNAME) $(LIBSONAME) && ln -sf $(LIBSONAME) $(LIBLINKNAME) +LIBINSTALL=$(LIBTARGET) +LIBDEVELINSTALL= endif -dllib=@DLLIB@ - MDIR1 = -DMODULE_DIR1='"$(libdir)/ivl$(suffix)"' -VPI = vpi_modules.o vpi_bit.o vpi_callback.o vpi_cobject.o vpi_const.o vpi_darray.o \ - vpi_event.o vpi_iter.o vpi_mcd.o \ - vpi_priv.o vpi_scope.o vpi_real.o vpi_signal.o vpi_string.o vpi_tasks.o vpi_time.o \ - vpi_vthr_vector.o vpip_bin.o vpip_hex.o vpip_oct.o \ - vpip_to_dec.o vpip_format.o vvp_vpi.o +CORE_OBJ = lib_main.o \ + parse.o parse_misc.o lexor.o arith.o array_common.o array.o bufif.o compile.o \ + concat.o dff.o class_type.o enum_type.o extend.o file_line.o latch.o npmos.o part.o \ + permaheap.o reduce.o resolv.o \ + sfunc.o stop.o \ + substitute.o \ + symbols.o ufunc.o codes.o vthread.o schedule.o \ + statistics.o tables.o udp.o vvp_island.o vvp_net.o vvp_net_sig.o \ + vvp_object.o vvp_cobject.o vvp_darray.o event.o logic.o delay.o \ + words.o island_tran.o -O = lib_main.o \ - parse.o parse_misc.o lexor.o arith.o array_common.o array.o bufif.o compile.o \ - concat.o dff.o class_type.o enum_type.o extend.o file_line.o latch.o npmos.o part.o \ - permaheap.o reduce.o resolv.o \ - sfunc.o stop.o \ - substitute.o \ - symbols.o ufunc.o codes.o vthread.o schedule.o \ - statistics.o tables.o udp.o vvp_island.o vvp_net.o vvp_net_sig.o \ - vvp_object.o vvp_cobject.o vvp_darray.o event.o logic.o delay.o \ - words.o island_tran.o $(VPI) +VPI_OBJ = vpi_modules.o vpi_bit.o vpi_callback.o vpi_cobject.o vpi_const.o vpi_darray.o \ + vpi_event.o vpi_iter.o vpi_mcd.o \ + vpi_priv.o vpi_scope.o vpi_real.o vpi_signal.o vpi_string.o vpi_tasks.o vpi_time.o \ + vpi_vthr_vector.o vpip_bin.o vpip_hex.o vpip_oct.o \ + vpip_to_dec.o vpip_format.o vvp_vpi.o + +O = $(CORE_OBJ) $(VPI_OBJ) all: dep vvp@EXEEXT@ vvp.man @@ -105,11 +151,11 @@ else rm -f vvp$(suffix).exe endif else - ./vvp -M../vpi $(srcdir)/examples/hello.vvp | grep 'Hello, World.' + LD_LIBRARY_PATH=$(builddir) ./vvp -M../vpi $(srcdir)/examples/hello.vvp | grep 'Hello, World.' endif clean: - rm -f *.o *~ parse.cc parse.h lexor.cc tables.cc libvvp$(suffix).$(SLEXT) + rm -f *.o *~ parse.cc parse.h lexor.cc tables.cc $(LIBNAME)*.$(SLEXT)* rm -rf dep vvp@EXEEXT@ parse.output vvp.man vvp.ps vvp.pdf vvp.exp distclean: clean @@ -136,26 +182,25 @@ dep: ifeq (@LIBVVP@,yes) -CPPFLAGS+= -fpic - # To avoid setting LD_LIBRARY_PATH when running vvp from the build tree, # add option -Wl,-rpath=`pwd` to the CXX command below. -vvp@EXEEXT@: main.o $(srcdir)/vvp.def libvvp$(suffix).$(SLEXT) +vvp@EXEEXT@: main.o $(srcdir)/vvp.def $(LIBBUILD) $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o -L. $(LDFLAGS) -lvvp$(suffix) $(LIBS) -libvvp$(suffix).$(SLEXT): $O - $(CXX) -shared $(LDFLAGS) -o libvvp$(suffix).$(SLEXT) $O $(LIBS) $(dllib) +$(LIBBUILD): $O + $(CXX) -shared $(LIBLINKFLAGS) -o $(LIBTARGET) $^ $(LIBS) + $(LIBPOSTBUILD) else ifeq (@WIN32@,yes) # To support cocotb, we export the VPI functions directly. This allows # cocotb to build VPI modules without using our vpi_user.h and libvpi.a. # The .def file controls what is exported. vvp@EXEEXT@: main.o $O $(srcdir)/vvp.def - $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ $(LDFLAGS) $(srcdir)/vvp.def main.o $O $(dllib) $(LIBS) + $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ $(LDFLAGS) $(srcdir)/vvp.def main.o $O $(LIBS) else vvp@EXEEXT@: $O main.o - $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o $O $(LIBS) $(dllib) + $(CXX) $(LDFLAGS) -o vvp@EXEEXT@ main.o $O $(LIBS) endif endif @@ -185,9 +230,8 @@ parse%cc parse%h: $(srcdir)/parse%y lexor.cc: $(srcdir)/lexor.lex $(LEX) -s -o$@ $< -vvp.man: $(srcdir)/vvp.man.in ../version.exe - ../version.exe `head -1 $<`'\n' > $@ - tail -n +2 $< >> $@ +vvp.man: $(srcdir)/vvp.man.in + # generated by autoconf vvp.ps: vvp.man $(MAN) -t ./$< > $@ @@ -221,7 +265,7 @@ stamp-config-h: $(srcdir)/config.h.in ../config.status cd ..; ./config.status --header=vvp/config.h config.h: stamp-config-h -install: all installdirs installfiles +install: all installdirs installfiles installpkgconfig F = ./vvp@EXEEXT@ $(srcdir)/libvvp.h $(INSTALL_DOC) @@ -234,22 +278,45 @@ installpdf: vvp.pdf installdirs installfiles: $(F) | installdirs $(INSTALL_PROGRAM) ./vvp@EXEEXT@ "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@" ifeq (@LIBVVP@,yes) - $(INSTALL_PROGRAM) ./libvvp$(suffix).$(SLEXT) "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" + $(INSTALL_PROGRAM) ./$(LIBINSTALL) "$(DESTDIR)$(SLDIR)/$(LIBINSTALL)" +ifeq (@WIN32@,yes) +ifneq ($(LIBDEVELINSTALL),) + $(INSTALL_PROGRAM) ./$(LIBDEVELINSTALL) "$(DESTDIR)$(libdir)/$(LIBDEVELINSTALL)" +endif +else + # Install real library + ln -sf $(LIBREALNAME) "$(DESTDIR)$(SLDIR)/$(LIBSONAME)" + ln -sf $(LIBSONAME) "$(DESTDIR)$(SLDIR)/$(LIBLINKNAME)" +endif $(INSTALL_DATA) $(srcdir)/libvvp.h "$(DESTDIR)$(includedir)/libvvp.h" endif installdirs: $(srcdir)/../mkinstalldirs $(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(INSTALL_DOCDIR)" \ "$(DESTDIR)$(INSTALL_PDFDIR)" +installpkgconfig: + $(INSTALL) -d "$(DESTDIR)$(pkgconfigdir)" + $(INSTALL_DATA) libvvp.pc "$(DESTDIR)$(pkgconfigdir)" uninstall: $(UNINSTALL32) rm -f "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@" rm -f "$(DESTDIR)$(mandir)/man1/vvp$(suffix).1" "$(DESTDIR)$(pdfdir)/vvp$(suffix).pdf" ifeq (@LIBVVP@,yes) - rm -f "$(DESTDIR)$(SLDIR)/libvvp$(suffix).$(SLEXT)" + rm -f "$(DESTDIR)$(SLDIR)/$(LIBINSTALL)" +ifeq (@WIN32@,yes) +ifneq ($(LIBDEVELINSTALL),) + rm -f "$(DESTDIR)$(libdir)/$(LIBDEVELINSTALL)" +endif +else + rm -f "$(DESTDIR)$(SLDIR)/$(LIBLINKNAME)" + rm -f "$(DESTDIR)$(SLDIR)/$(LIBSONAME)" + rm -f "$(DESTDIR)$(SLDIR)/$(LIBREALNAME)" +endif + rm -f "$(DESTDIR)$(pkgconfigdir)/libvvp.pc" rm -f "$(DESTDIR)$(includedir)/libvvp.h" endif diff --git a/vvp/libvvp.pc.in b/vvp/libvvp.pc.in new file mode 100644 index 000000000..268f18d7e --- /dev/null +++ b/vvp/libvvp.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libvvp +Version: @LIBVVP_VERSION@ +Description: Icarus Verilog VVP runtime library +Libs: -L${libdir} -lvvp +Cflags: -I${includedir}/iverilog diff --git a/vvp/vvp.man.in b/vvp/vvp.man.in index c7d64d9b4..8da9ef816 100644 --- a/vvp/vvp.man.in +++ b/vvp/vvp.man.in @@ -1,4 +1,4 @@ -.TH vvp 1 "Jan 13th, 2026" "" "Version %M.%n %E" +.TH vvp 1 "Jan 13th, 2026" "" "Version @VERSION@" .SH NAME vvp - Icarus Verilog vvp runtime engine