#!/usr/bin/env python

Import('env')
env = env.Clone()

libshout_sources = [
  'src/common/avl/avl.c',
  'src/common/net/sock.c',
  'src/common/net/resolver.c',
  'src/common/timing/timing.c',
  'src/common/httpp/httpp.c',
  'src/common/httpp/encoding.c',
  'src/common/thread/thread.c',
  'src/shout.c',
  'src/util.c',
  'src/queue.c',
  'src/proto_http.c',
  'src/proto_xaudiocast.c',
  'src/proto_icy.c',
  'src/proto_roaraudio.c',
  'src/format_ogg.c',
  'src/format_webm.c',
  'src/format_mp3.c',
  'src/codec_vorbis.c',
  'src/codec_opus.c',
  'src/codec_theora.c',
  'src/codec_speex.c',
  'src/tls.c'
]

env.Append(CPPDEFINES='HAVE_CONFIG_H')
env.Append(CPPPATH='src/common')
env.Append(CPPPATH='include')

libshout_mixxx = env.StaticLibrary(target='libshout_mixxx', source=libshout_sources)

# Install the libraries if needed.
if 'LIB_OUTPUT' in env.Dictionary():
    env.Install('$LIB_OUTPUT', source=[libshout_mixxx])
