diff --git a/iverilog-vpi.man b/iverilog-vpi.man index f49af2d7f..fb559691f 100644 --- a/iverilog-vpi.man +++ b/iverilog-vpi.man @@ -27,6 +27,15 @@ first source file is named \fIfoo.c\fP, the output becomes Include the named library in the link of the VPI module. This allows VPI modules to further reference external libraries. +.TP 8 +.B -I\fIdirectory\fP +Add \fIdirectory\fP to the list of directories that will be search for +header files. + +.TP 8 +.B -D\fIdefine\fP +Define a macro named \fIdefine\fP. + .TP 8 .B --name=\fIname\fP Normally, the output VPI module will be named after the first source @@ -39,6 +48,10 @@ This flag causes the program to print the install directory for VPI modules, then exit. It is a convenience for makefiles or automated plug-in installers. +.TP 8 +.B --cflags, --ldflags and -ldlibs +These flags provide compile time information. + .SH "PC-ONLY OPTIONS" The PC port of \fIiverilog-vpi\fP includes two special flags needed to diff --git a/iverilog-vpi.sh b/iverilog-vpi.sh index c82689a4f..fbccedb04 100644 --- a/iverilog-vpi.sh +++ b/iverilog-vpi.sh @@ -46,6 +46,7 @@ OBJ= LIB= OUT= INCOPT= +DEFS= # -- # parse the command line switches. This collects the source files @@ -90,7 +91,9 @@ do ;; -I*) INCOPT="$INCOPT $parm" - echo "$parm" + ;; + + -D*) DEFS="$DEFS $parm" ;; -m32) LDFLAGS="-m32 $LDFLAGS32" @@ -138,7 +141,7 @@ do obj=$base".o" echo "Compiling $src..." - $CC -c -o $obj $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1` + $CC -c -o $obj $DEFS $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1` OBJ="$OBJ $obj" done @@ -148,7 +151,7 @@ do obj=$base".o" echo "Compiling $src..." - $CXX -c -o $obj $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1` + $CXX -c -o $obj $DEFS $CFLAGS $INCOPT $src || compile_errors=`expr $compile_errors + 1` OBJ="$OBJ $obj" done