Accept .cpp source.
This commit is contained in:
parent
0edb5a7547
commit
d3ceae7ee0
|
|
@ -277,6 +277,7 @@ static int parse(int argc, char *argv[])
|
||||||
|
|
||||||
char dot_c_ext[] = ".c";
|
char dot_c_ext[] = ".c";
|
||||||
char dot_cc_ext[] = ".cc";
|
char dot_cc_ext[] = ".cc";
|
||||||
|
char dot_cpp_ext[] = ".cpp";
|
||||||
char dot_o_ext[] = ".o";
|
char dot_o_ext[] = ".o";
|
||||||
char name_option[] = "--name=";
|
char name_option[] = "--name=";
|
||||||
char lib_option[] = "-l";
|
char lib_option[] = "-l";
|
||||||
|
|
@ -301,6 +302,13 @@ static int parse(int argc, char *argv[])
|
||||||
if (!*gstr.pOUT)
|
if (!*gstr.pOUT)
|
||||||
assignn(&gstr.pOUT,argv[idx],strlen(argv[idx])-strlen(dot_cc_ext));
|
assignn(&gstr.pOUT,argv[idx],strlen(argv[idx])-strlen(dot_cc_ext));
|
||||||
}
|
}
|
||||||
|
else if (endsIn(dot_cpp_ext,argv[idx])) { /* check for C++ source files */
|
||||||
|
++srcFileCnt;
|
||||||
|
append(&gstr.pCXSRC,argv[idx]);
|
||||||
|
append(&gstr.pCXSRC," ");
|
||||||
|
if (!*gstr.pOUT)
|
||||||
|
assignn(&gstr.pOUT,argv[idx],strlen(argv[idx])-strlen(dot_cpp_ext));
|
||||||
|
}
|
||||||
else if (endsIn(dot_o_ext,argv[idx])) { /* check for compiled object files */
|
else if (endsIn(dot_o_ext,argv[idx])) { /* check for compiled object files */
|
||||||
++srcFileCnt;
|
++srcFileCnt;
|
||||||
append(&gstr.pOBJ,argv[idx]);
|
append(&gstr.pOBJ,argv[idx]);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
# 59 Temple Place - Suite 330
|
# 59 Temple Place - Suite 330
|
||||||
# Boston, MA 02111-1307, USA
|
# Boston, MA 02111-1307, USA
|
||||||
#
|
#
|
||||||
#ident "$Id: iverilog-vpi.sh,v 1.15 2006/02/21 02:38:44 steve Exp $"
|
#ident "$Id: iverilog-vpi.sh,v 1.16 2006/09/26 18:54:42 steve Exp $"
|
||||||
|
|
||||||
# These are the variables used for compiling files
|
# These are the variables used for compiling files
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
|
@ -69,6 +69,13 @@ do
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*.cpp) CXSRC="$CXSRC $parm"
|
||||||
|
LD=$CXX
|
||||||
|
if [ x$OUT = x ]; then
|
||||||
|
OUT=`basename $parm .cpp`
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
*.o) OBJ="$OBJ $parm"
|
*.o) OBJ="$OBJ $parm"
|
||||||
if [ x$OUT = x ]; then
|
if [ x$OUT = x ]; then
|
||||||
OUT=`basename $parm .o`
|
OUT=`basename $parm .o`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue