Mercurial > hg > sv-dependency-builds
annotate src/portaudio_20140130/build/scons/SConscript_common @ 124:e3d5853d5918
Current stable PortAudio source
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 18 Oct 2016 13:11:05 +0100 |
parents | |
children |
rev | line source |
---|---|
cannam@124 | 1 import os.path, sys |
cannam@124 | 2 |
cannam@124 | 3 class ConfigurationError(Exception): |
cannam@124 | 4 def __init__(self, reason): |
cannam@124 | 5 Exception.__init__(self, "Configuration failed: %s" % reason) |
cannam@124 | 6 |
cannam@124 | 7 env = Environment() |
cannam@124 | 8 |
cannam@124 | 9 # sunos, aix, hpux, irix, sunos appear to be platforms known by SCons, assuming they're POSIX compliant |
cannam@124 | 10 Posix = ("linux", "darwin", "sunos", "aix", "hpux", "irix", "sunos", "netbsd") |
cannam@124 | 11 Windows = ("win32", "cygwin") |
cannam@124 | 12 |
cannam@124 | 13 if env["PLATFORM"] == "posix": |
cannam@124 | 14 if sys.platform[:5] == "linux": |
cannam@124 | 15 Platform = "linux" |
cannam@124 | 16 elif sys.platform[:6] == "netbsd": |
cannam@124 | 17 Platform = "netbsd" |
cannam@124 | 18 else: |
cannam@124 | 19 raise ConfigurationError("Unknown platform %s" % sys.platform) |
cannam@124 | 20 else: |
cannam@124 | 21 if not env["PLATFORM"] in ("win32", "cygwin") + Posix: |
cannam@124 | 22 raise ConfigurationError("Unknown platform %s" % env["PLATFORM"]) |
cannam@124 | 23 Platform = env["PLATFORM"] |
cannam@124 | 24 |
cannam@124 | 25 # Inspired by the versioning scheme followed by Qt, it seems sensible enough. There are three components: major, minor |
cannam@124 | 26 # and micro. Major changes with each subtraction from the API (backward-incompatible, i.e. V19 vs. V18), minor changes |
cannam@124 | 27 # with each addition to the API (backward-compatible), micro changes with each revision of the source code. |
cannam@124 | 28 ApiVer = "2.0.0" |
cannam@124 | 29 |
cannam@124 | 30 Export("Platform", "Posix", "ConfigurationError", "ApiVer") |