From b8c8f030371cd764fba5b84f2945adafa02c20a6 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 29 Jan 2017 09:32:14 +0000 Subject: [PATCH] Add library search path option to iverilog-vpi (GitHub issue #145). (cherry picked from commit 4e2ba29dc6f49b5b505e277ff2f0433666d9d007) --- iverilog-vpi.man.in | 9 +++++++-- iverilog-vpi.sh | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/iverilog-vpi.man.in b/iverilog-vpi.man.in index 2f5f090b0..bd8f7a930 100644 --- a/iverilog-vpi.man.in +++ b/iverilog-vpi.man.in @@ -1,4 +1,4 @@ -.TH iverilog-vpi 1 "May 10th, 2015" "" "Version %M.%n%E" +.TH iverilog-vpi 1 "Jan 29th, 2017" "" "Version %M.%n%E" .SH NAME iverilog-vpi - Compile front end for VPI modules @@ -26,6 +26,11 @@ becomes \fIfoo.vpi\fP. Include the named library in the link of the VPI module. This allows VPI modules to further reference external libraries. +.TP 8 +.B -L\fIdirectory\fP +Add \fIdirectory\fP to the list of directories that will be searched +for library files. + .TP 8 .B -I\fIdirectory\fP Add \fIdirectory\fP to the list of directories that will be searched @@ -115,7 +120,7 @@ iverilog(1), vvp(1), .SH COPYRIGHT .nf -Copyright \(co 2002\-2015 Stephen Williams +Copyright \(co 2002\-2017 Stephen Williams This document can be freely redistributed according to the terms of the GNU General Public License version 2.0 diff --git a/iverilog-vpi.sh b/iverilog-vpi.sh index d1554d420..3b918d7f0 100644 --- a/iverilog-vpi.sh +++ b/iverilog-vpi.sh @@ -35,6 +35,7 @@ CCSRC= CXSRC= OBJ= LIB= +LIBDIR= OUT= INCOPT= DEFS= @@ -81,6 +82,9 @@ do -l*) LIB="$LIB $parm" ;; + -L*) LIBDIR="$LIBDIR $parm" + ;; + -I*) INCOPT="$INCOPT $parm" ;; @@ -148,4 +152,4 @@ then fi echo "Making $OUT from $OBJ..." -exec $LD -o $OUT $LDFLAGS $OBJ $LIB $LDLIBS +exec $LD -o $OUT $LDFLAGS $LIBDIR $OBJ $LIB $LDLIBS