|
- #
- # Copyright (C) 2007 Arnold Krille
- # Copyright (C) 2007 Pieter Palmers
- # Copyright (C) 2008 Marc-Olivier Barre
- #
- # This file originates from FFADO (www.ffado.org)
- #
- # 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 3 of the License, or
- # (at your option) any later version.
- #
- # 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, see <http://www.gnu.org/licenses/>.
- #
-
- import os
- from string import Template
-
- Import('env')
-
- # paths where include files can be found
- env.AppendUnique(CPPPATH=['#/', '#/common'])
-
- #
- # Source files section
- #
-
- example_programs = {
- 'jack_freewheel' : 'freewheel.c',
- 'jack_connect' : 'connect.c',
- 'jack_lsp' : 'lsp.c',
- 'jack_metro' : 'metro.c',
- 'jack_midiseq' : 'midiseq.c',
- 'jack_midisine' : 'midisine.c',
- 'jack_showtime' : 'showtime.c',
- 'jack_simple_client' : 'simple_client.c',
- 'jack_zombie' : 'zombie.c',
- 'jack_load' : 'ipload.c',
- 'jack_unload' : 'ipunload.c',
- }
-
- example_libs = {
- 'inprocess' : 'inprocess.c',
- }
-
- # Libraries to link
- extra_libs = {}
- for example_program in example_programs:
- extra_libs[example_program] = [env['CLIENTLIB']]
-
- # TODO: we need to really test for READLINE... pkgconfig ?
- env['HAS_READLINE']=True
- if env['HAS_READLINE']:
- example_programs['jack_transport'] = 'transport.c'
- extra_libs['jack_transport'] = ['readline', env['CLIENTLIB']]
-
- #
- # Build/install section
- #
-
- if env['BUILD_EXAMPLES']:
- clientenv = env.Copy()
- clientenv.PrependUnique(LIBPATH=env['build_base'])
- for example_program, example_program_source in example_programs.items():
- clientenv.Program(example_program, example_program_source, LIBS=extra_libs[example_program])
- if env['INSTALL_EXAMPLES']:
- clientenv.Install(env['BINDIR'], example_program)
- for example_lib, example_lib_source in example_libs.items():
- lib = clientenv.SharedLibrary(example_lib, example_lib_source)
- if clientenv['INSTALL_EXAMPLES']:
- clientenv.InstallAs(clientenv['ADDON_DIR'] + '/' + example_lib + '.so', lib)
- clientenv.Alias('install', clientenv['ADDON_DIR'] + '/' + example_lib + '.so')
|