diff --git a/Makefile.in b/Makefile.in index 4d37235c0..c9908d6ad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.103 2001/08/10 00:40:00 steve Exp $" +#ident "$Id: Makefile.in,v 1.104 2001/09/20 03:21:01 steve Exp $" # # SHELL = /bin/sh @@ -37,6 +37,7 @@ includedir = $(prefix)/include dllib=@DLLIB@ rdynamic=@rdynamic@ +strip_dynamic=@strip_dynamic@ CC = @CC@ CXX = @CXX@ @@ -132,6 +133,7 @@ Makefile: Makefile.in config.h.in config.status libvpi.a: vpithunk.o rm -f $@ ar cvq $@ vpithunk.o + ranlib $@ # The vpithunk.c file (that makes up the libvpi.a library) needs to # be make with PIC flags, because shared objects load it. @@ -197,7 +199,7 @@ $(libdir)/libvpi.a : ./libvpi.a $(libdir)/ivl/ivl@EXEEXT@: ./ivl@EXEEXT@ $(INSTALL_PROGRAM) ./ivl@EXEEXT@ $(libdir)/ivl/ivl@EXEEXT@ - $(STRIP) $(libdir)/ivl/ivl@EXEEXT@ + $(STRIP) $(strip_dynamic) $(libdir)/ivl/ivl@EXEEXT@ $(libdir)/ivl/iverilog.conf: $(srcdir)/iverilog.conf $(INSTALL_DATA) $(srcdir)/iverilog.conf $(libdir)/ivl/iverilog.conf diff --git a/README.txt b/README.txt index f0591c14c..12360e2b1 100644 --- a/README.txt +++ b/README.txt @@ -447,6 +447,9 @@ removed from the list) send e-mail to me. Macintosh -- MacO/S Yasuhisa Kato + Mac O/S X + Timothy J. Wood + NetBSD/* Dan McMahill diff --git a/configure.in b/configure.in index 55b11ea1a..fceabf67b 100644 --- a/configure.in +++ b/configure.in @@ -152,6 +152,12 @@ esac AC_SUBST(EXTRALIBS) AC_MSG_RESULT($EXTRALIBS) +# Darwin requires -no-cpp-precomp +case "${host}" in + *-*-darwin*) + CFLAGS="-no-cpp-precomp" + ;; +esac # The -rdynamic flag is used by iverilog when compiling the target, # to know how to export symbols of the main program to loadable modules @@ -176,9 +182,17 @@ case "${host}" in *-*-hpux*) rdynamic="-E" ;; + + *-*-darwin*) + rdynamic="-Wl,-all_load" + strip_dynamic="-SX" + ;; + esac AC_SUBST(rdynamic) AC_MSG_RESULT($rdynamic) +AC_SUBST(strip_dynamic) +AC_MSG_RESULT($strip_dynamic) AC_MSG_CHECKING("for shared library link flag") shared=-shared @@ -195,6 +209,9 @@ case "${host}" in shared="-b" ;; + *-*-darwin*) + shared="-bundle -undefined suppress" + ;; esac AC_SUBST(shared) diff --git a/macosx.txt b/macosx.txt new file mode 100644 index 000000000..e68a9cd8b --- /dev/null +++ b/macosx.txt @@ -0,0 +1,28 @@ + + This file describes the procedure to build and install Icarus Verilog on Mac OS X. I assume that you have experience with Unix and Terminal.app. + + +1) Obtain and install a libdl compatibility library. + + If you don't already have /usr/local/lib/libdl.{a,dylib} and /usr/local/include/dlfcn.h, you can obtain the source for a compatibility layer from at least one of two places: + + http://download.sourceforge.net/fink/dlcompat-20010831.tar.gz + http://www.omnigroup.com/~bungi/dlcompat-20010831.tar.gz + + Unpack this tar file and read the README and Makefile. Install the library according to the instructions. Installation in /usr/local is strongly recommended since otherwise autoconf very likely won't be able to find it. + +2) Configure, build and install the Icarus Verilog sources. + + The only change you need to make here is to use a configure command like: + + % CC="cc -no-cpp-precomp" ./configure + + This assumes you are using 'sh', 'zsh', or 'bash'. If you are using 'csh' or 'tcsh', then you'll want something like: + + % setenv CC "cc -no-cpp-precomp" + % ./configure + + You can, of course, add other configure options. + +3) Done! + diff --git a/tgt-fpga/configure.in b/tgt-fpga/configure.in index 0c725d81f..a0c78465f 100644 --- a/tgt-fpga/configure.in +++ b/tgt-fpga/configure.in @@ -47,6 +47,11 @@ case "${host}" in shared="-b" ;; + + *-*-darwin*) + shared="-bundle -undefined suppress" + ;; + esac AC_SUBST(shared) AC_MSG_RESULT($shared) diff --git a/tgt-vvp/configure.in b/tgt-vvp/configure.in index a6537b56f..dcff06dfe 100644 --- a/tgt-vvp/configure.in +++ b/tgt-vvp/configure.in @@ -47,6 +47,10 @@ case "${host}" in shared="-b" ;; + *-*-darwin*) + shared="-bundle -undefined suppress" + ;; + esac AC_SUBST(shared) AC_MSG_RESULT($shared) diff --git a/vpi/Makefile.in b/vpi/Makefile.in index 4be1da28b..4e02ee350 100644 --- a/vpi/Makefile.in +++ b/vpi/Makefile.in @@ -18,7 +18,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.28 2001/06/15 05:05:04 steve Exp $" +#ident "$Id: Makefile.in,v 1.29 2001/09/20 03:21:02 steve Exp $" # # SHELL = /bin/sh @@ -35,6 +35,8 @@ bindir = @bindir@ libdir = @libdir@ includedir = $(prefix)/include +strip_dynamic=@strip_dynamic@ + CC = @CC@ CXX = @CXX@ INSTALL = @INSTALL@ @@ -75,7 +77,7 @@ install: all installdirs $(libdir)/ivl/system.vpi $(libdir)/ivl/system.vpi: ./system.vpi $(INSTALL_PROGRAM) ./system.vpi $(libdir)/ivl/system.vpi - $(STRIP) $(libdir)/ivl/system.vpi + $(STRIP) $(strip_dynamic) $(libdir)/ivl/system.vpi installdirs: ../mkinstalldirs $(srcdir)/../mkinstalldirs $(libdir)/ivl diff --git a/vpip/configure.in b/vpip/configure.in index 4e4566af6..c8ae96422 100644 --- a/vpip/configure.in +++ b/vpip/configure.in @@ -24,6 +24,9 @@ case "${host}" in *-*-hpux*) shared="-b" ;; + *-*-darwin*) + shared="-bundle -undefined suppress" + ;; esac AC_SUBST(shared) AC_MSG_RESULT($shared) diff --git a/vvp/configure.in b/vvp/configure.in index 8bb84d640..581a28afb 100644 --- a/vvp/configure.in +++ b/vvp/configure.in @@ -77,6 +77,11 @@ case "${host}" in *-*-hpux*) rdynamic="-E" ;; + + *-*-darwin*) + rdynamic="-Wl,-all_load" + ;; + esac AC_SUBST(rdynamic) AC_MSG_RESULT($rdynamic)