diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-11-13 04:06:32 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-11-13 04:06:32 +0000 |
commit | c72e9212c52f96f2a799df625fa63e62cd31f3d8 (patch) | |
tree | 690ac1f791e9c29371bda4e30691473c286dc6e0 /Makefile.common | |
parent | 92c27757b331eceb9a989dce378cd6d2738d9ed0 (diff) | |
download | netpbm-mirror-c72e9212c52f96f2a799df625fa63e62cd31f3d8.tar.gz netpbm-mirror-c72e9212c52f96f2a799df625fa63e62cd31f3d8.tar.xz netpbm-mirror-c72e9212c52f96f2a799df625fa63e62cd31f3d8.zip |
Fix Darwin build/install
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@122 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/Makefile.common b/Makefile.common index 0d9ee5e2..ed9f2066 100644 --- a/Makefile.common +++ b/Makefile.common @@ -271,24 +271,34 @@ endif # # On IA32 Linux, at least, GNU ld takes -rpath. It also has a -R option, # but it is something else. - -ifneq ($(NETPBMLIB_RUNTIME_PATH)x,x) - ifeq ($(LINKERISCOMPILER),Y) - # Before Netpbm 10.14 (March 2003), it looks like we used -R - # instead of -Wl,-rpath on all but a few selected platforms as configured - # by Configure. But that doesn't make sense, because we also used - # LD=$(CC) always. Beebe's notes and Saunders' observation above - # above indicate that we need - # -Wl,... everywhere that a compiler is used, whether native or GNU, - # to link. - RPATH = -Wl,$(RPATHOPTNAME),$(NETPBMLIB_RUNTIME_PATH) - else - RPATH = $(RPATHOPTNAME)$(NETPBMLIB_RUNTIME_PATH) +# +# Alan Fry and Snowcrash demonstrated in 2006.11 that neither -rpath +# nor -R are recognized options on Mac OS X 'ld'. +# +# http://developer.apple.com/releasenotes/DeveloperTools/RN-dyld/index.html +# says that on Mac OS X, libraries aren't searched for in directories, +# but rather specified by full name, so that rpath doesn't make any +# sense. On Mac OS X, you use -install_name when you linkedit shared +# library S to give the complete installed name of S. This goes into +# S so that when something linkedits with S, the complete installed +# name of S goes into the object that uses S. + +ifeq ($(NEED_RUNTIME_PATH),Y) + ifneq ($(NETPBMLIB_RUNTIME_PATH)x,x) + ifeq ($(LINKERISCOMPILER),Y) + # Before Netpbm 10.14 (March 2003), it looks like we used -R + # instead of -Wl,-rpath on all but a few selected platforms as configured + # by Configure. But that doesn't make sense, because we also used + # LD=$(CC) always. Beebe's notes and Saunders' observation above + # above indicate that we need + # -Wl,... everywhere that a compiler is used, whether native or GNU, + # to link. + RPATH = -Wl,$(RPATHOPTNAME),$(NETPBMLIB_RUNTIME_PATH) + else + RPATH = $(RPATHOPTNAME)$(NETPBMLIB_RUNTIME_PATH) + endif endif -else - RPATH = endif - # Rules for conventional single-object file executables # Before Netpbm 10.21 (March 2004), we kept separate lists of binaries |