Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update configure and Makefiles for cross compiling.

There are still a couple issues with cross compiling, but this patch
addresses most of the issues.
  • Loading branch information...
commit 76c835a00e39840af4780d8925a47c2a0aa93547 1 parent 8df745a
@caryr caryr authored
View
5 Makefile.in
@@ -70,6 +70,7 @@ dllib=@DLLIB@
CC = @CC@
HOSTCC = @CC@
CXX = @CXX@
+DLLTOOL = @DLLTOOL@
INSTALL = @INSTALL@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -120,7 +121,7 @@ all: dep config.h _pli_types.h version_tag.h ivl@EXEEXT@ version.exe iverilog-vp
ifeq (@MINGW32@,yes)
all: dosify.exe
dosify.exe: $(srcdir)/dosify.c
- $(CC) -o dosify.exe $(srcdir)/dosify.c
+ $(HOSTCC) -o dosify.exe $(srcdir)/dosify.c
endif
# This rule rules the compiler in the trivial hello.vl program to make
@@ -203,7 +204,7 @@ ifeq (@WIN32@,yes)
# that really exports the things that the import library imports.
ivl@EXEEXT@: $O $(srcdir)/ivl.def
$(CXX) -o ivl@EXEEXT@ $O $(dllib) @EXTRALIBS@
- dlltool --dllname ivl@EXEEXT@ --def $(srcdir)/ivl.def \
+ $(DLLTOOL) --dllname ivl@EXEEXT@ --def $(srcdir)/ivl.def \
--output-lib libivl.a --output-exp ivl.exp
$(CXX) $(LDFLAGS) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@
else
View
4 configure.in
@@ -21,7 +21,11 @@ AC_PREREQ([2.60])
AC_PROG_CC_C99
AC_PROG_CXX
AC_PROG_RANLIB
+AC_CHECK_TOOL(LD, ld, false)
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(STRIP, strip, true)
+AC_CHECK_TOOL(WINDRES,windres,false)
AC_CHECK_PROGS(XGPERF,gperf,none)
AC_CHECK_PROGS(MAN,man,none)
AC_CHECK_PROGS(PS2PDF,ps2pdf,none)
View
3  driver-vpi/Makefile.in
@@ -37,6 +37,7 @@ mandir = @mandir@
dllib=@DLLIB@
CC = @CC@
+WINDRES = @WINDRES@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -88,7 +89,7 @@ res.rc: $(srcdir)/res.rc.in ../version.exe
$(srcdir)/res.rc.in > $@
res.o: res.rc
- windres -i res.rc -o res.o
+ $(WINDRES) -i res.rc -o res.o
#
install: all installdirs $(bindir)/iverilog-vpi$(suffix)@EXEEXT@
View
6 libveriuser/Makefile.in
@@ -31,6 +31,9 @@ libdir = @libdir@
includedir = $(prefix)/include
CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+LD = @LD@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -44,7 +47,6 @@ endif
CPPFLAGS = $(INCLUDE_PATH) @CPPFLAGS@ @DEFS@ @PICFLAG@
CFLAGS = @WARNING_FLAGS@ @CFLAGS@
LDFLAGS = @LDFLAGS@
-RANLIB = @RANLIB@
A = a_close.o a_compare_handles.o a_configure.o a_fetch_argc.o \
a_fetch_argv.o a_fetch_dir.o a_fetch_fullname.o a_fetch_location.o \
@@ -90,7 +92,7 @@ libveriuser.o: $O
libveriuser.a: libveriuser.o
rm -f $@
- ar cvq $@ libveriuser.o
+ $(AR) cvq $@ libveriuser.o
$(RANLIB) $@
%.o: %.c config.h
View
14 vvp/Makefile.in
@@ -35,11 +35,13 @@ includedir = @includedir@
CC = @CC@
HOSTCC = @CC@
CXX = @CXX@
+DLLTOOL = @DLLTOOL@
+AR = @AR@
+RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-RANLIB = @RANLIB@
LEX = @LEX@
YACC = @YACC@
MAN = @MAN@
@@ -118,7 +120,7 @@ ifeq (@WIN32@,yes)
# executable to build the library.
vvp@EXEEXT@ libvpi.a: $O $(srcdir)/vvp.def
$(CXX) -o vvp$(suffix)@EXEEXT@ $(LDFLAGS) $O $(dllib) $(LIBS)
- dlltool --dllname vvp$(suffix)@EXEEXT@ --def $(srcdir)/vvp.def \
+ $(DLLTOOL) --dllname vvp$(suffix)@EXEEXT@ --def $(srcdir)/vvp.def \
--output-lib libvpi.a --output-exp vvp.exp
rm -f vvp$(suffix)@EXEEXT@
$(CXX) $(LDFLAGS) -o vvp@EXEEXT@ vvp.exp $(LDFLAGS) $O $(dllib) $(LIBS)
@@ -126,7 +128,7 @@ else
libvpi.a: libvpi.c
$(CC) $(CFLAGS) -c $<
rm -f libvpi.a
- ar cqv libvpi.a libvpi.o
+ $(AR) cqv libvpi.a libvpi.o
$(RANLIB) libvpi.a
vvp@EXEEXT@: $O
@@ -142,9 +144,9 @@ endif
mv $*.d dep/$*.d
tables.cc: $(srcdir)/draw_tt.c
- $(HOSTCC) @WARNING_FLAGS@ -o draw_tt $(srcdir)/draw_tt.c
- ./draw_tt > tables.cc
- rm draw_tt@EXEEXT@
+ $(HOSTCC) @WARNING_FLAGS@ -o draw_tt.exe $(srcdir)/draw_tt.c
+ ./draw_tt.exe > tables.cc
+ rm draw_tt.exe
lexor.o: lexor.cc parse.h
Please sign in to comment.
Something went wrong with that request. Please try again.