2008-06-02 21:35:57 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
sources = env.Glob('*.c')
|
2009-02-26 04:40:00 +00:00
|
|
|
|
2008-06-02 21:35:57 +00:00
|
|
|
incs = '.'
|
2009-01-26 08:34:40 +00:00
|
|
|
flags = []
|
|
|
|
defs = []
|
2008-06-02 21:35:57 +00:00
|
|
|
|
2009-07-16 19:41:28 +00:00
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
2008-11-04 23:04:15 +00:00
|
|
|
flags = []
|
2009-01-26 08:34:40 +00:00
|
|
|
defs.append('OPJ_STATIC')
|
2008-11-04 23:04:15 +00:00
|
|
|
else:
|
|
|
|
flags = ['-Wall', '-O3', '-ffast-math', '-std=c99']
|
2008-06-02 21:35:57 +00:00
|
|
|
|
2008-11-04 23:04:15 +00:00
|
|
|
oj_env = env.Clone()
|
2009-07-16 19:41:28 +00:00
|
|
|
if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
2008-11-04 23:04:15 +00:00
|
|
|
oj_env.Replace(CCFLAGS = '')
|
|
|
|
oj_env.Replace(BF_DEBUG_FLAGS = '')
|
2008-06-02 21:35:57 +00:00
|
|
|
|
|
|
|
oj_env.BlenderLib ( libname='extern_openjpeg',
|
|
|
|
sources=sources, includes=Split(incs),
|
2009-01-26 08:34:40 +00:00
|
|
|
defines=defs,
|
2009-09-05 01:58:02 +00:00
|
|
|
libtype=['extern','player'],
|
|
|
|
priority=[10,185], compileflags = flags)
|