Import('use')

mixer = use.Clone()

try:
    if mixer['HAVE_OGG']:
        mixer.Append(CPPDEFINES = ['OGG_MUSIC'])
except KeyError:
    pass

try:
    if mixer['HAVE_MP3_MAD']:
        mixer.Append(CPPDEFINES = ['MP3_MAD_MUSIC'])
except KeyError:
    pass

source = Split(""" music.c mixer.c music_ogg.c music_flac.c music_mad.c
dynamic_ogg.c effect_position.c effects_internal.c effect_stereoreverse.c
load_voc.c load_ogg.c load_aiff.c wavestream.c convert.cpp""")

library = mixer.StaticLibrary('sdl-mixer', source)
Return('library')
