aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorcarmen rocco <ix9@users.sourceforge.net>2005-04-13 01:44:42 +0000
committercarmen rocco <ix9@users.sourceforge.net>2005-04-13 01:44:42 +0000
commit3b73629f4c17116c2ecff80cd8b638b79fef1693 (patch)
treef8520ff97a5fd89abeb7115ce032d2fb9d867d51 /externals
parent4088fb791ebb50ffead13cbe80d6dd0fc480fc0c (diff)
runtime OS check
svn path=/trunk/; revision=2751
Diffstat (limited to 'externals')
-rw-r--r--externals/build/SConstruct17
1 files changed, 15 insertions, 2 deletions
diff --git a/externals/build/SConstruct b/externals/build/SConstruct
index 34975c13..72ea5b41 100644
--- a/externals/build/SConstruct
+++ b/externals/build/SConstruct
@@ -3,11 +3,24 @@ import os
import re
prefix = "/usr/local/lib/pd"
-env = Environment(CPPPATH = Split(prefix + '/src /usr/local/include . src'), CPPDEFINES=['PD', 'UNIX'], SHLIBPREFIX = '', SHLIBSUFFIX = '.pd_linux', CCFLAGS = '-pipe -O2')
+platform = os.uname()[0]
+
+if re.match("Linux", platform) != None:
+ OSdefine = 'UNIX'
+ extSuffix = '.pd_linux'
+elif re.match("MINGW", platform) != None:
+ OSdefine = 'NT'
+ extSuffix = '.dll'
+elif re.match("Darwin", platform) != None:
+ OSdefine = 'UNIX'
+ extSuffix = '.pd_darwin'
+
+env = Environment(CPPPATH = Split(prefix + '/src /usr/include /usr/local/include . ../../pd/src ../../src src'), CPPDEFINES=['PD', OSdefine], SHLIBPREFIX = '', SHLIBSUFFIX = extSuffix, CCFLAGS = '-pipe -O2')
########### delete when namespace conflict issue is finally resolved
+##(cyclone has all of these, the other versions are from all over the place)
delete = """
-test -f src/prepend.c && rm src/urn.* && rm src/match.* && rm src/prepend.* && rm src/sinh.c && rm src/delta~.c && rm src/reson~.c && rm src/abs~.c &&rm src/svf~.c &&rm src/matrix~.c &&rm src/atan2~.c && rm src/avg~.c && echo "poof...no more conflicting externals..!!"
+cd src && test -f prepend.c && rm urn.* match.* prepend.* sinh.c delta~.c reson~.c abs~.c svf~.c matrix~.c atan2~.c avg~.c pmpd.c && echo "poof...no more conflicting externals..!!"
"""
print os.popen(delete).read()
###########