# -*- mode: python -*-
###############################################################
# Top level SConscript for the fluxus PLT modules
#
# Sets up common stuff, and calls each module SConscript 

import os 
Import("env", "CollectsInstall", "DataInstall", "MZDYN", "static_modules")

# run mzscheme to get (path->string (system-library-subpath))
file = os.popen("mzscheme -em \"(begin (display (path->string (system-library-subpath)))(exit))\"")
archpath = file.read()
file.close()

BinaryModulesLocation = CollectsInstall + "/compiled/native/"+archpath

if env['PLATFORM'] == 'win32':
	SConscript(dirs = ["fluxus-engine", 
				"scheme",
				"material"], 

				exports = ["env", "CollectsInstall", "DataInstall", "BinaryModulesLocation", "MZDYN", "static_modules"])
else:
	SConscript(dirs = ["fluxus-engine", 
				"fluxus-audio", 
				"fluxus-osc", 
				"fluxus-midi", 
				"scheme",
				"material"], 

				exports = ["env", "CollectsInstall", "DataInstall", "BinaryModulesLocation", "MZDYN", "static_modules"])

env.Install(CollectsInstall, "../docs/helpmap.scm")
