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.

79 lines
2.5KB

  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. #
  27. # Source files section
  28. #
  29. example_programs = {
  30. 'jack_freewheel' : 'freewheel.c',
  31. 'jack_connect' : 'connect.c',
  32. 'jack_lsp' : 'lsp.c',
  33. 'jack_metro' : 'metro.c',
  34. 'jack_midiseq' : 'midiseq.c',
  35. 'jack_midisine' : 'midisine.c',
  36. 'jack_showtime' : 'showtime.c',
  37. 'jack_simple_client' : 'simple_client.c',
  38. 'jack_zombie' : 'zombie.c',
  39. 'jack_load' : 'ipload.c',
  40. 'jack_unload' : 'ipunload.c',
  41. }
  42. example_libs = {
  43. 'inprocess' : 'inprocess.c',
  44. }
  45. # Libraries to link
  46. extra_libs = {}
  47. for example_program in example_programs:
  48. extra_libs[example_program] = [env['CLIENTLIB']]
  49. # TODO: we need to really test for READLINE... pkgconfig ?
  50. env['HAS_READLINE']=True
  51. if env['HAS_READLINE']:
  52. example_programs['jack_transport'] = 'transport.c'
  53. extra_libs['jack_transport'] = ['readline', env['CLIENTLIB']]
  54. #
  55. # Build/install section
  56. #
  57. if env['BUILD_EXAMPLES']:
  58. clientenv = env.Copy()
  59. clientenv.PrependUnique(LIBPATH=env['build_base'])
  60. for example_program, example_program_source in example_programs.items():
  61. clientenv.Program(example_program, example_program_source, LIBS=extra_libs[example_program])
  62. if env['INSTALL_EXAMPLES']:
  63. clientenv.Install(env['BINDIR'], example_program)
  64. for example_lib, example_lib_source in example_libs.items():
  65. lib = clientenv.SharedLibrary(example_lib, example_lib_source)
  66. if clientenv['INSTALL_EXAMPLES']:
  67. clientenv.InstallAs(clientenv['ADDON_DIR'] + '/' + example_lib + '.so', lib)
  68. clientenv.Alias('install', clientenv['ADDON_DIR'] + '/' + example_lib + '.so')