#need glob to get all the source filesimportglobimportos#create an environment that uses mingw tools#FIXME: clobbers env['TOOLS']env=Environment(ENV=os.environ,tools=['mingw'])#the target will be myprogram.exe (in win32)#the source files will be every file in the #current directory that matches "*.cpp"env.Program(target='myprogram',source=glob.glob('*.cpp'))

errata: don't need the .exe in the target name

errata: don't need to Split() the glob

errata: don't forget to set the ENV argument in the call to Environment(); import os also

errata: don't set tools= in the Environment(), use Tool('mingw')(env) to avoid clobbering env['TOOLS']