jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.9KB

  1. #
  2. # Copyright (C) 2007 Arnold Krille
  3. # Copyright (C) 2007 Pieter Palmers
  4. # Copyright (C) 2008 Marc-Olivier Barre
  5. #
  6. # This file originates from FFADO (www.ffado.org)
  7. #
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. #
  21. import os
  22. from string import Template
  23. Import('env')
  24. # paths where include files can be found
  25. env.AppendUnique(CPPPATH=['#/', '#/common'])
  26. # A symlinking command
  27. symlinkcmd = 'rm -f $TARGET;ln -nsf $SOURCE.name $TARGET'
  28. #
  29. # Source files section
  30. #
  31. example_programs = {
  32. 'jack_freewheel' : 'freewheel.c',
  33. 'jack_connect' : 'connect.c',
  34. 'jack_lsp' : 'lsp.c',
  35. 'jack_metro' : 'metro.c',
  36. 'jack_midiseq' : 'midiseq.c',
  37. 'jack_midisine' : 'midisine.c',
  38. 'jack_showtime' : 'showtime.c',
  39. 'jack_simple_client' : 'simple_client.c',
  40. 'jack_zombie' : 'zombie.c',
  41. 'jack_load' : 'ipload.c',
  42. 'jack_unload' : 'ipunload.c',
  43. }
  44. example_libs = {
  45. 'inprocess' : 'inprocess.c',
  46. }
  47. # Libraries to link
  48. extra_libs = {}
  49. for example_program in example_programs:
  50. extra_libs[example_program] = ['jack']
  51. # TODO: we need to test for READLINE... is that even possible ?
  52. env['HAS_READLINE']=True
  53. if env['HAS_READLINE']:
  54. example_programs['jack_transport'] = 'transport.c'
  55. extra_libs['jack_transport'] = ['readline', 'jack', 'ncurses']
  56. #
  57. # Build/install section
  58. #
  59. if env['BUILD_EXAMPLES']:
  60. clientenv = env.Copy()
  61. clientenv.PrependUnique(LIBPATH=env['build_base'])
  62. for example_program, example_program_source in example_programs.items():
  63. clientenv.Program(example_program, example_program_source, LIBS=extra_libs[example_program])
  64. if env['INSTALL_EXAMPLES']:
  65. clientenv.Install(env['INSTALL_BINDIR'], example_program)
  66. jack_disconnect_install_path = env['INSTALL_BINDIR'] + '/jack_disconnect'
  67. env.Command(jack_disconnect_install_path, 'jack_connect', symlinkcmd)
  68. env.Alias('install', jack_disconnect_install_path)
  69. for example_lib, example_lib_source in example_libs.items():
  70. lib = clientenv.SharedLibrary(example_lib, example_lib_source)
  71. if clientenv['INSTALL_EXAMPLES']:
  72. env.InstallAs(env['INSTALL_ADDON_DIR'] + '/' + example_lib + '.so', lib)
  73. env.Alias('install', env['INSTALL_ADDON_DIR'] + '/' + example_lib + '.so')
  74. if env['ENABLE_DBUS']:
  75. clientenv.Install(env['BINDIR'], 'jack_control')