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.

wscript 3.7KB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #! /usr/bin/python3
  2. # encoding: utf-8
  3. example_programs = {
  4. 'jack_cpu_load': 'cpu_load.c',
  5. 'jack_latent_client': 'latent_client.c',
  6. 'jack_metro': 'metro.c',
  7. 'jack_midi_latency_test': 'midi_latency_test.c',
  8. 'jack_midiseq': 'midiseq.c',
  9. 'jack_midisine': 'midisine.c',
  10. 'jack_net_master': 'netmaster.c',
  11. 'jack_net_slave': 'netslave.c',
  12. 'jack_server_control': 'server_control.cpp',
  13. 'jack_showtime': 'showtime.c',
  14. 'jack_simdtests': 'simdtests.cpp',
  15. 'jack_simple_client': 'simple_client.c',
  16. 'jack_simple_session_client': 'simple_session_client.c',
  17. 'jack_thru': 'thru_client.c',
  18. 'jack_zombie': 'zombie.c',
  19. }
  20. example_libs = {
  21. 'inprocess': 'inprocess.c',
  22. }
  23. def configure(conf):
  24. conf.env['BUILD_EXAMPLE_CLIENT_REC'] = conf.env['SNDFILE']
  25. def build(bld):
  26. if bld.env['IS_LINUX']:
  27. os_incdir = ['../linux', '../posix']
  28. if bld.env['IS_MACOSX']:
  29. os_incdir = ['../macosx', '../posix']
  30. if bld.env['IS_FREEBSD']:
  31. os_incdir = ['../freebsd', '../posix']
  32. if bld.env['IS_SUN']:
  33. os_incdir = ['../solaris', '../posix']
  34. if bld.env['IS_WINDOWS']:
  35. os_incdir = ['../windows']
  36. for example_program, example_program_source in list(example_programs.items()):
  37. if example_program == 'jack_server_control':
  38. use = ['serverlib', 'STDC++']
  39. elif example_program == 'jack_net_slave':
  40. if not bld.env['BUILD_NETLIB']:
  41. continue
  42. use = ['netlib']
  43. elif example_program == 'jack_net_master':
  44. if not bld.env['BUILD_NETLIB']:
  45. continue
  46. use = ['netlib']
  47. else:
  48. use = ['clientlib']
  49. if example_program == 'jack_simdtests':
  50. ftrs = 'cxx cxxprogram'
  51. else:
  52. ftrs = 'c cprogram'
  53. if bld.env['IS_MACOSX']:
  54. prog = bld(features=ftrs, framework=['Foundation'])
  55. else:
  56. prog = bld(features=ftrs)
  57. prog.includes = os_incdir + ['../common/jack', '../common']
  58. prog.source = example_program_source
  59. prog.use = use
  60. if bld.env['IS_LINUX']:
  61. prog.use += ['RT', 'M']
  62. if bld.env['IS_SUN']:
  63. prog.use += ['M']
  64. if bld.env['IS_FREEBSD']:
  65. prog.use += ['M']
  66. if bld.env['IS_WINDOWS'] and bld.env['BUILD_STATIC']:
  67. prog.env['LIB_PTHREAD'] = [':libwinpthread.a']
  68. prog.target = example_program
  69. if bld.env['BUILD_EXAMPLE_CLIENT_REC']:
  70. prog = bld(features='c cprogram')
  71. prog.includes = os_incdir + ['../common/jack', '../common']
  72. prog.source = 'capture_client.c'
  73. prog.use = ['clientlib']
  74. if bld.env['IS_MACOSX']:
  75. prog.use += ['SNDFILE']
  76. if bld.env['IS_LINUX']:
  77. prog.use += ['RT', 'SNDFILE']
  78. if bld.env['IS_FREEBSD']:
  79. prog.use += ['SNDFILE']
  80. if bld.env['IS_SUN']:
  81. prog.use += ['RT', 'SNDFILE']
  82. if bld.env['IS_WINDOWS']:
  83. prog.uselib = ['SNDFILE']
  84. if bld.env['BUILD_STATIC']:
  85. prog.env['LIB_PTHREAD'] = [':libwinpthread.a']
  86. prog.target = 'jack_rec'
  87. for example_lib, example_lib_source in list(example_libs.items()):
  88. lib = bld(features='c cshlib')
  89. if not bld.env['IS_WINDOWS']:
  90. lib.env['cshlib_PATTERN'] = '%s.so'
  91. lib.includes = os_incdir + ['../common/jack', '../common']
  92. lib.target = example_lib
  93. lib.source = example_lib_source
  94. if bld.env['IS_SUN']:
  95. lib.env.append_value('LINKFLAGS', '-lm')
  96. if bld.env['IS_WINDOWS'] and bld.env['BUILD_STATIC']:
  97. prog.env['LIB_PTHREAD'] = [':libwinpthread.a']
  98. lib.use = 'serverlib'
  99. lib.install_path = '${ADDON_DIR}/'