From 42adc49e57a4f7d05876800f13f419aa00ad85f2 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 30 Jun 2001 04:23:02 +0000 Subject: [PATCH] Get include and lib paths right for mingw and vvm. --- driver/main.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/driver/main.c b/driver/main.c index 5df64463e..b676867ab 100644 --- a/driver/main.c +++ b/driver/main.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#ident "$Id: main.c,v 1.18 2001/06/30 00:59:24 steve Exp $" +#ident "$Id: main.c,v 1.19 2001/06/30 04:23:02 steve Exp $" const char HELP[] = "Usage: iverilog [-ESv] [-B base] [-C path] [-c cmdfile] @@ -204,9 +204,27 @@ static int t_vvm(char*cmd, unsigned ncmd) } } +#if defined(__MINGW32__) + /* In the Windows world, the path to headers and libraries + for vvm is relative the ivl_root, which is in something like: + + d:\iverilog\lib\ivl <-- ivl_root + d:\iverilog\include <-- vvm headers + d:\iverilog\lib <-- vvm libraries + + So we make up all the ugly references that are the g++ + command line to compile a .cc file generated by vvm. */ + sprintf(tmp, "%s " RDYNAMIC " -s -fno-exceptions -o %s " + "-I%s\\..\\..\\include -L%s\\.. %s.cc -lvvm -lvpip %s", + CXX, opath, ivl_root, ivl_root, opath, DLLIB); +#else + /* In the UNIX universe, life is easy. The configure script + has figured everything out and wrote it into the Makefile, + which passes it on as the IVL_INC and IVL_LIB defines. */ sprintf(tmp, "%s " RDYNAMIC " -s -fno-exceptions -o %s -I%s " "-L%s %s.cc -lvvm -lvpip %s", CXX, opath, IVL_INC, IVL_LIB, opath, DLLIB); +#endif if (verbose_flag) printf("compile: %s\n", tmp); @@ -619,6 +637,9 @@ int main(int argc, char **argv) /* * $Log: main.c,v $ + * Revision 1.19 2001/06/30 04:23:02 steve + * Get include and lib paths right for mingw and vvm. + * * Revision 1.18 2001/06/30 00:59:24 steve * Redo the ivl_root calculator for mingw. *