#Sconscript for FCValidate in FColladaTools.
#by Veronique Laforte and Alfred Leung, Aug. 27th 2007

#Create the Environment which creates the compile and linker command lines.
env = Environment()
ifdebug = ARGUMENTS.get('debug', 0)

#Add the compiler and linker flags and include search path
env.Append(CPPPATH = '../../../../../FCollada')

#Add the macros defined for all the builds
env.Append(CPPDEFINES = ['LINUX'])

#Add the macros and flags defined only for DEBUG, or RELEASE
if int(ifdebug):
    env.Append(CPPDEFINES = ['_DEBUG'])
    env.Append(CCFLAGS = ['-O0', '-g'])
else:
    env.Append(CPPDEFINES = ['NDEBUG'])
    env.Append(CCFLAGS = ['-O2'])


#List of the source code to compile, and make a library out of it
if int(ifdebug):
    libs = Split("""FColladaSUD
		    dl""")

else:
    libs = Split("""FColladaSUR
                    dl""")

list = Split("""FCValidate.cpp""")

#For LINUX only, the list of paths where to look for the libraries
#   to link with.
path = Split("""../../../../../FCollada/Output
					""")

if int(ifdebug):
    FCValidate = env.Program('FCValidateD', list, LIBS=libs, LIBPATH=path)
else:
    FCValidate = env.Program('FCValidateR', list, LIBS=libs, LIBPATH=path)

#Specifying the name and directory of output library
env.Install('../../', FCValidate)

