diff options
| author | Steven Knight <knight@baldmt.com> | 2004-08-18 00:13:37 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-08-18 00:13:37 (GMT) |
| commit | 934d0ae6ee48b6c1639faa1a4366c50b078091eb (patch) | |
| tree | 2937262006c1a96fa80d1a3adc8d306a99d35162 /src/engine/SCons | |
| parent | e18d45e027a965547bbb698c0e6784254298f8b1 (diff) | |
| download | SCons-934d0ae6ee48b6c1639faa1a4366c50b078091eb.zip SCons-934d0ae6ee48b6c1639faa1a4366c50b078091eb.tar.gz SCons-934d0ae6ee48b6c1639faa1a4366c50b078091eb.tar.bz2 | |
Add support for the darwin (Mac OS X) platform. (James Juhasz)
Diffstat (limited to 'src/engine/SCons')
| -rw-r--r-- | src/engine/SCons/Platform/__init__.py | 2 | ||||
| -rw-r--r-- | src/engine/SCons/Platform/darwin.py | 38 | ||||
| -rw-r--r-- | src/engine/SCons/Tool/gnulink.py | 2 |
3 files changed, 42 insertions, 0 deletions
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py index e8a4a19..0856775 100644 --- a/src/engine/SCons/Platform/__init__.py +++ b/src/engine/SCons/Platform/__init__.py @@ -73,6 +73,8 @@ def platform_default(): return 'hpux' elif string.find(sys.platform, 'aix') != -1: return 'aix' + elif string.find(sys.platform, 'darwin') != -1: + return 'darwin' else: return 'posix' elif os.name == 'os2': diff --git a/src/engine/SCons/Platform/darwin.py b/src/engine/SCons/Platform/darwin.py new file mode 100644 index 0000000..c239c4a --- /dev/null +++ b/src/engine/SCons/Platform/darwin.py @@ -0,0 +1,38 @@ +"""engine.SCons.Platform.darwin + +Platform-specific initialization for Mac OS X systems. + +There normally shouldn't be any need to import this module directly. It +will usually be imported through the generic SCons.Platform.Platform() +selection method. +""" + +# +# Copyright (c) 2001, 2002, 2003, 2004 Steven Knight +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +import posix +import os + +def generate(env): + posix.generate(env) + env['SHLIBSUFFIX'] = '.dylib' diff --git a/src/engine/SCons/Tool/gnulink.py b/src/engine/SCons/Tool/gnulink.py index b900202..6276fbe 100644 --- a/src/engine/SCons/Tool/gnulink.py +++ b/src/engine/SCons/Tool/gnulink.py @@ -45,6 +45,8 @@ def generate(env): if env['PLATFORM'] == 'hpux': env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared -fPIC') + elif env['PLATFORM'] == 'darwin': + env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -dynamiclib') # __RPATH is set to $_RPATH in the platform specification if that # platform supports it. |
