#!/usr/bin/python
Import ('extra_includes')
Import ('user_options_dict')
Import ('library_env')

src_env = library_env.Copy ()
src_env.Append (CCFLAGS = user_options_dict['SDL_CFLAGS'])

source_files = ['B.blend.c',
                'Bfont.c',
                'blenderbuttons.c',
                'booleanops.c',
                'booleanops_mesh.c',
                'buttons_editing.c',
                'buttons_logic.c',
                'buttons_object.c',
                'buttons_scene.c',
                'buttons_script.c',
                'buttons_shading.c',
                'butspace.c',
                'cmap.tga.c',
                'cmovie.tga.c',
                'cursors.c',
                'drawaction.c',
                'drawimage.c',
                'drawimasel.c',
                'drawipo.c',
                'drawmesh.c',
                'drawnla.c',
                'drawobject.c',
                'drawoops.c',
                'drawscene.c',
                'drawscript.c',
                'drawseq.c',
                'drawsound.c',
                'drawtext.c',
                'drawview.c',
                'edit.c',
                'editaction.c',
                'editarmature.c',
                'editconstraint.c',
                'editcurve.c',
                'editdeform.c',
                'editface.c',
                'editfont.c',
                'editgroup.c',
                'editika.c',
                'editimasel.c',
                'editipo.c',
                'editkey.c',
                'editlattice.c',
                'editmball.c',
                'editmesh.c',
                'editnla.c',
                'editobject.c',
                'editoops.c',
                'editscreen.c',
                'editseq.c',
                'editsima.c',
                'editsound.c',
                'editview.c',
                'eventdebug.c',
                'filesel.c',
                'ghostwinlay.c',
                'glutil.c',
                'headerbuttons.c',
                'header_action.c',
                'header_buttonswin.c',
                'header_filesel.c',
                'header_image.c',
                'header_imasel.c',
                'header_info.c',
                'header_ipo.c',
                'header_nla.c',
                'header_oops.c',
                'header_script.c',
                'header_seq.c',
                'header_sound.c',
                'header_text.c',
                'header_view3d.c',
                'imasel.c',
                'interface.c',
                'interface_panel.c',
                'interface_draw.c',
                'keyval.c',
                'mainqueue.c',
                'mywindow.c',
                'oops.c',
                'splash.jpg.c',
                'playanim.c',
                'poseobject.c',
                'previewrender.c',
                'renderwin.c',
                'resources.c',
                'scrarea.c',
                'screendump.c',
                'sequence.c',
                'seqaudio.c',
                'space.c',
                'spacetypes.c',
                'swapbuffers.c',
                'toets.c',
                'toolbox.c',
                'unwrapper.c',
                'usiblender.c',
                'view.c',
                'vpaint.c',
                'writeavicodec.c',
                'writeimage.c',
                'writemovie.c',
                'language.c']

src_env.Append (CPPPATH = ['#/intern/guardedalloc',
                           '../blenlib',
                           '../makesdna',
                           '../blenkernel',
                           '../include',
                           '#/intern/bmfont',
                           '../imbuf',
                           '../render/extern/include',
                           '#/intern/bsp/extern',
                           '../renderconverter',
                           '../radiosity/extern/include',
                           '#/intern/decimation/extern',
                           '../blenloader',
                           '../python',
                           '../../kernel/gen_system',
                           '#/intern/SoundSystem',
                           '../readstreamglue',
                           '../img',
                           '../quicktime',
                           '#/intern/ghost',
                           '#/intern/opennl/extern'])

src_env.Append (CPPPATH = user_options_dict['PYTHON_INCLUDE'])
src_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
src_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])

if user_options_dict['USE_INTERNATIONAL'] == 1:
    src_env.Append (CPPPATH=['../ftfont'])
    src_env.Append (CPPDEFINES = 'INTERNATIONAL')
    src_env.Append (CPPDEFINES = 'FTGL_STATIC_LIBRARY')

if user_options_dict['USE_BUILDINFO'] == 1:
    src_env.Append (CPPDEFINES = 'NAN_BUILDINFO')

src_env.Append (CPPPATH=extra_includes)

src_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blendersrc', source=source_files)
