-guardal_env = Environment()
+#!/usr/bin/python
-# Import the C flags set in the SConstruct file
-Import ('cflags')
-Import ('cxxflags')
-Import ('defines')
-guardal_env.Append (CCFLAGS = cflags)
-guardal_env.Append (CXXFLAGS = cxxflags)
-guardal_env.Append (CPPDEFINES = defines)
+Import('env')
-source_files = ['intern/mallocn.c']
+sources = env.Glob('intern/*.c')
+incs = '.'
-guardal_env.Append (CPPPATH = ['.'])
-
-guardal_env.Library (target='#/lib/blender_guardedalloc', source=source_files)
+env.BlenderLib ('bf_guardedalloc', sources, Split(incs), [], libtype=['intern', 'player'], priority = [10, 175] )