Permalink
Browse files

scons buils scripts for linux

port to gcc 4.3
  • Loading branch information...
1 parent cb0a8fc commit e0df15525dacdcb4954f15e0d646205d6d7abc9f @opencollada-sebastian opencollada-sebastian committed Oct 16, 2009
@@ -0,0 +1,28 @@
+
+Import('env')
+
+libName = 'OpenCOLLADABaseUtils'
+
+
+srcDirs = [ 'src/', 'src/Math/']
+
+variantDir = env['objDir'] + env['configurationBaseName'] + '/'
+outputDir = env['libDir'] + env['configurationBaseName'] + '/'
+targetPath = outputDir + libName
+
+
+incDirs = ['include/', 'include/Math/', '../Externals/UTF/include/']
+
+if not env['PCRENATIVE']:
+ incDirs += ['../Externals/pcre/include']
+
+
+src = []
+for srcDir in srcDirs:
+ src += [ variantDir + str(p) for p in Glob(srcDir + '*.cpp')]
+ VariantDir(variant_dir=variantDir + srcDir, src_dir=srcDir, duplicate=False)
+
+if env['SHAREDLIB']:
+ SharedLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
+else:
+ StaticLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
@@ -516,7 +516,7 @@ namespace COLLADABU
Real dot = dotProduct( rhs );
Real angle_radian = acos( dot );
- return abs( angle_radian ) <= tolerance_radian;
+ return fabs( angle_radian ) <= tolerance_radian;
}
@@ -0,0 +1,26 @@
+
+Import('env')
+
+libName = 'OpenCOLLADAFramework'
+
+
+srcDir = 'src/'
+
+variantDir = env['objDir'] + env['configurationBaseName'] + '/'
+outputDir = env['libDir'] + env['configurationBaseName'] + '/'
+targetPath = outputDir + libName
+
+
+incDirs = ['include/',
+ '../COLLADABaseUtils/include/',
+ '../Externals/MathMLSolver/include/',
+ '../Externals/MathMLSolver/include/AST']
+
+src = [ variantDir + str(p) for p in Glob(srcDir + '*.cpp')]
+VariantDir(variant_dir=variantDir + srcDir, src_dir=srcDir, duplicate=False)
+
+if env['SHAREDLIB']:
+ SharedLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
+else:
+ StaticLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
+
@@ -15,6 +15,7 @@ for details please see LICENSE file or the website
#include "COLLADAFWArray.h"
#include <string.h>
#include <cassert>
+#include <stdlib.h>
namespace COLLADAFW
@@ -0,0 +1,46 @@
+
+Import('env')
+
+libName = 'OpenCOLLADASaxFrameworkLoader'
+
+
+srcDirs = [ 'src/',
+ 'src/generated14/',
+ 'src/generated15/']
+
+variantDir = env['objDir'] + env['configurationBaseName'] + env['xmlParserConfName'] + env['validationConfName'] + '/'
+outputDir = env['libDir'] + env['configurationBaseName'] + env['xmlParserConfName'] + env['validationConfName'] + '/'
+targetPath = outputDir + libName
+
+
+incDirs = [ 'include',
+ 'include/generated14',
+ 'include/generated15',
+ '../COLLADABaseUtils/include',
+ '../GeneratedSaxParser/include',
+ '../COLLADAFramework/include',
+ '../Externals/LibXML/include',
+ '../Externals/MathMLSolver/include',
+ '../Externals/MathMLSolver/include/AST']
+
+if not env['PCRENATIVE']:
+ incDirs += ['../Externals/pcre/include']
+
+src = []
+for srcDir in srcDirs:
+ src += [ variantDir + str(p) for p in Glob(srcDir + '*.cpp')]
+ VariantDir(variant_dir=variantDir + srcDir, src_dir=srcDir, duplicate=False)
+
+if (env['XMLPARSER'] == 'expat') or (env['XMLPARSER'] == 'expatnative'):
+ env['CPPFLAGS'] += ' -DGENERATEDSAXPARSER_XMLPARSER_EXPAT'
+else:
+ env['CPPFLAGS'] += ' -DGENERATEDSAXPARSER_XMLPARSER_LIBXML'
+
+if not env['NOVALIDATION']:
+ env['CPPFLAGS'] += ' -DGENERATEDSAXPARSER_VALIDATION'
+
+
+if env['SHAREDLIB']:
+ SharedLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
+else:
+ StaticLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
@@ -0,0 +1,24 @@
+
+Import('env')
+
+libName = 'OpenCOLLADAStreamWriter'
+
+
+srcDir = 'src/'
+
+variantDir = env['objDir'] + env['configurationBaseName'] + '/'
+outputDir = env['libDir'] + env['configurationBaseName'] + '/'
+targetPath = outputDir + libName
+
+
+incDirs = ['include/',
+ '../COLLADABaseUtils/include/']
+
+src = [ variantDir + str(p) for p in Glob(srcDir + '*.cpp')]
+VariantDir(variant_dir=variantDir + srcDir, src_dir=srcDir, duplicate=False)
+
+if env['SHAREDLIB']:
+ SharedLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
+else:
+ StaticLibrary(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'])
+
@@ -15,6 +15,7 @@
#include "COLLADASWIBufferFlusher.h"
+#include <string.h>
namespace COLLADASW
{
@@ -25,6 +25,7 @@
#include <vector>
#include <limits>
#include <algorithm>
+#include <string.h>
#define WHITESPACESTRINGLENGTH 1000
@@ -0,0 +1,59 @@
+
+Import('env')
+
+progName = 'OpenCOLLADAValidator'
+
+
+srcDir = 'src/'
+
+variantDir = env['objDir'] + env['configurationBaseName'] + env['xmlParserConfName'] + env['validationConfName'] + '/'
+outputDir = env['binDir'] + env['configurationBaseName'] + env['xmlParserConfName'] + env['validationConfName'] + '/'
+targetPath = outputDir + progName
+
+incDirs = [ 'include',
+ '../COLLADABaseUtils/include',
+ '../COLLADAFramework/include',
+ '../COLLADASaxFrameworkLoader/include',
+ '../GeneratedSaxParser/include']
+
+src = [ variantDir + str(p) for p in Glob(srcDir + '*.cpp')]
+VariantDir(variant_dir=variantDir + srcDir, src_dir=srcDir, duplicate=False)
+
+libs = [ 'OpenCOLLADASaxFrameworkLoader',
+ 'MathMLSolver',
+ 'OpenCOLLADAFramework',
+ 'OpenCOLLADABaseUtils',
+ 'GeneratedSaxParser',
+ 'pcre',
+ 'UTF' ]
+
+libPath = [ '../COLLADABaseUtils/' + env['libDir'] + env['configurationBaseName'],
+ '../COLLADAFramework/' + env['libDir'] + env['configurationBaseName'],
+ '../Externals/MathMLSolver/' + env['libDir'] + env['configurationBaseName'],
+ '../Externals/UTF/' + env['libDir'] + env['configurationBaseName'],
+ '../COLLADASaxFrameworkLoader/' + env['libDir'] + env['configurationBaseName'] + env['xmlParserConfName'] + env['validationConfName'],
+ '../GeneratedSaxParser/' + env['libDir'] + env['configurationBaseName'] + env['xmlParserConfName'] ]
+
+if not env['PCRENATIVE']:
+ libPath += '../Externals/pcre/' + env['libDir'] + env['configurationBaseName'],
+
+if (env['XMLPARSER'] == 'expat') or (env['XMLPARSER'] == 'expatnative'):
+ env['CPPFLAGS'] += ' -DXMLPARSER_EXPAT'
+ libs += ['expat']
+ if env['XMLPARSER'] == 'expat':
+ libPath += ['../Externals/expat/' + env['libDir'] + env['configurationBaseName']]
+else:
+ env['CPPFLAGS'] += ' -DXMLPARSER_LIBXML'
+ if env['XMLPARSER'] == 'libxml':
+ libPath += ['../Externals/libxml/' + env['libDir'] + env['configurationBaseName']]
+ libs += ['xml']
+ else:
+ libs += ['xml2']
+
+if env['PG']:
+ linkFlags = ['-pg']
+else:
+ linkFlags = []
+
+Program(target=targetPath, source=src, CPPPATH=incDirs, CCFLAGS=env['CPPFLAGS'], LIBS=libs, LIBPATH=libPath, LINKFLAGS=linkFlags)
+
Oops, something went wrong.

0 comments on commit e0df155

Please sign in to comment.