Skip to content

Commit

Permalink
Scons: Impove OS detection
Browse files Browse the repository at this point in the history
  • Loading branch information
kallisti5 committed Aug 28, 2014
1 parent bf0063d commit 7148067
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
import sys
import platform
import platform as _platform
env = Environment(ENV = os.environ)
env['platform'] = _platform.system().lower();

env["CC"] = os.getenv("CC") or env["CC"]
env["CXX"] = os.getenv("CXX") or env["CXX"]
Expand All @@ -11,12 +12,16 @@ env.Append(CPPPATH = ['#src'])
env.Append(LIBPATH = ['#src'])
env.Append(CFLAGS = ['-g'])

if platform == 'HP-UX':
print "===================================================="
print "Compiling Electric Fence for " + env['platform']
print "===================================================="

if env['platform'] == 'hp-ux':
env.Append(CFLAGS = ['-Aa', '-D_HPUX_SOURCE', '-DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS'])
elif platform == 'AIX':
elif env['platform'] == 'aix':
# COMPILE THE PROGRAMS YOU ARE DEBUGGING WITH THESE FLAGS, TOO.
env.Append(CFLAGS = ['-bnso', '-bnodelcsect', '-bI:/lib/syscalls.exp'])
elif platform == 'Solaris':
elif env['platform'] == 'sunos':
# Note the definition of PAGE_PROTECTION_VIOLATED_SIGNAL. This may vary
# depend on what version of Sun hardware you have.
# You'll probably have to link the program you are debugging with -Bstatic
Expand Down

0 comments on commit 7148067

Please sign in to comment.