build_features = ['cstlib', 'cshlib']
elif ctx.env['DEST_OS'] in ['win32', 'win64']:
build_features = ['cshlib']
+elif ctx.env['DEST_OS'] in ['emscripten']:
+ build_features = ['cstlib']
else: #linux, darwin, android, mingw, ...
build_features = ['cshlib', 'cstlib']
ctx.env.CFLAGS += [ '-isysroot' , SDKROOT]
ctx.env.LINKFLAGS += [ '-isysroot' , SDKROOT]
+ if target_platform == 'emscripten':
+ import os.path
+ ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]
+ ctx.env.CFLAGS += ['-Oz']
+ ctx.env.cprogram_PATTERN = "%s.js"
+ if (ctx.options.enable_atlas != True):
+ ctx.options.enable_atlas = False
+
# check for required headers
ctx.check(header_name='stdlib.h')
ctx.check(header_name='stdio.h')