# Hamigaki Audio Library Example Jamfile

#  Copyright Takeshi Mouri 2006.
#  Use, modification, and distribution are subject to the
#  Boost Software License, Version 1.0. (See accompanying file
#  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

subproject libs/audio/example ;

import ../build/ogg ;
import ../build/vorbis ;
import ../build/vorbisfile ;

{

template audio
    : # sources
      <lib>../build/hamigaki_audio
    : # build requirements
      <include>$(HAMIGAKI_ROOT)  <sysinclude>$(HAMIGAKI_ROOT)
      <include>$(BOOST_INCLUDE)  <sysinclude>$(BOOST_INCLUDE)
      <library-path>$(BOOST_LIBPATH)
      <vc-8_0><*><runtime-link>static
      <vc-8_0><*><cflags>-wd4996
      <vc-8_0><*><cflags>-wd4819
    : # build variants
    ;

template ogg
    : # sources
      <lib>../build/hamigaki_ogg
    : # build requirements
    : # build variants
    ;

template vorbis
    : # sources
      <lib>../build/hamigaki_vorbis
    : # build requirements
    : # build variants
    ;

template vorbisfile
    : # sources
      <template>basic
      <lib>../build/hamigaki_vorbisfile
    : # build requirements
    : # build variants
    ;


exe falcom_play
    :
        falcom_play.cpp
        <template>audio
        <template>ogg
        <template>vorbis
        <template>vorbisfile
    :
        <gcc><*><find-library>boost_thread-gcc-mt-s
    ;

exe ogg_play
    :
        ogg_play.cpp
        <template>audio
        <template>ogg
        <template>vorbis
        <template>vorbisfile
    :
        <gcc><*><find-library>boost_thread-gcc-mt-s
    ;

exe raw_play
    :
        raw_play.cpp
        <template>audio
    :
    ;

exe vorbis_file_example
    :
        vorbis_file_example.cpp
        <template>audio
        <template>ogg
        <template>vorbis
        <template>vorbisfile
    :
    ;

stage stage/bin
    : <exe>falcom_play
      <exe>ogg_play
      <exe>raw_play
      <exe>vorbis_file_example
    : # copy to a path rooted at HAMIGAKI_ROOT:
      <locate>$(HAMIGAKI_ROOT)
      <target>stage
      <target>all
    : # build variants
    ;

}
