# Copyright AllSeen Alliance. All rights reserved.
#
#    Permission to use, copy, modify, and/or distribute this software for any
#    purpose with or without fee is hereby granted, provided that the above
#    copyright notice and this permission notice appear in all copies.
#
#    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
#    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
#    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
#    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
#    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
#    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
#    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

Import('env')

test_env = env.Clone()

if test_env['BR'] == 'on':
    #Build apps with bundled daemon support
    test_env.Prepend(LIBS = [test_env['ajrlib']])

test_env.Prepend(LIBS = [test_env['ALLJOYN_C_LIB_STATIC']])

test_programs = ['bbcclient', 'bbcservice']
built_test_programs = []
for test_p in test_programs:
    test_obj = test_env.Object(test_p)
    built_test_programs.append(test_env.Program(test_p,  [test_obj]))

if test_env['OS_GROUP'] != 'windows':
    test_env.Install('$C_DISTDIR/bin', built_test_programs)
