2019-10-28 12:36:35 +02:00
|
|
|
#! /usr/bin/python3
|
2008-06-02 22:20:24 +03:00
|
|
|
# encoding: utf-8
|
2018-01-01 09:48:34 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2015, 2017-2018 Karl Linden <karl.j.linden@gmail.com>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
#
|
2008-06-02 22:20:24 +03:00
|
|
|
|
|
|
|
test_programs = {
|
2008-11-25 10:05:04 +02:00
|
|
|
# For testing purposes
|
2022-04-13 20:29:29 +03:00
|
|
|
# 'synchroClient': ['testSynchroClient.cpp'],
|
|
|
|
# 'synchroServer': ['testSynchroServer.cpp'],
|
|
|
|
# 'synchroServerClient': ['testSynchroServerClient.cpp'],
|
|
|
|
# 'testSem': ['testSem.cpp'],
|
2008-11-25 10:05:04 +02:00
|
|
|
'jack_test': ['test.cpp'],
|
|
|
|
'jack_cpu': ['cpu.c'],
|
2011-03-09 16:59:47 +02:00
|
|
|
'jack_iodelay': ['iodelay.cpp'],
|
2022-04-13 20:29:29 +03:00
|
|
|
'jack_multiple_metro': ['external_metro.cpp'],
|
2008-06-02 22:20:24 +03:00
|
|
|
}
|
|
|
|
|
2022-04-13 20:29:29 +03:00
|
|
|
|
2008-06-02 22:20:24 +03:00
|
|
|
def build(bld):
|
2012-02-09 19:13:53 +02:00
|
|
|
for test_program, test_program_sources in list(test_programs.items()):
|
2022-04-13 20:29:29 +03:00
|
|
|
prog = bld(features='cxx cxxprogram')
|
2009-02-11 14:31:20 +02:00
|
|
|
if bld.env['IS_MACOSX']:
|
2022-04-13 20:29:29 +03:00
|
|
|
prog.includes = ['..', '../macosx', '../posix', '../common/jack', '../common']
|
2009-02-11 14:31:20 +02:00
|
|
|
if bld.env['IS_LINUX']:
|
2022-04-13 20:29:29 +03:00
|
|
|
prog.includes = ['..', '../linux', '../posix', '../common/jack', '../common']
|
2020-11-27 13:42:28 +02:00
|
|
|
if bld.env['IS_FREEBSD']:
|
2022-04-13 20:29:29 +03:00
|
|
|
prog.includes = ['..', '../freebsd', '../posix', '../common/jack', '../common']
|
2009-02-11 14:31:20 +02:00
|
|
|
if bld.env['IS_SUN']:
|
2022-04-13 20:29:29 +03:00
|
|
|
prog.includes = ['..', '../solaris', '../posix', '../common/jack', '../common']
|
2008-06-02 22:20:24 +03:00
|
|
|
prog.source = test_program_sources
|
2008-11-14 03:07:46 +02:00
|
|
|
if bld.env['IS_LINUX']:
|
2008-06-17 23:58:00 +03:00
|
|
|
prog.uselib = 'RT'
|
2012-02-15 21:36:44 +02:00
|
|
|
prog.use = 'clientlib'
|
2008-06-02 22:20:24 +03:00
|
|
|
prog.target = test_program
|