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.

76 lines
2.0KB

  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. import Params
  4. import commands
  5. import Params
  6. from Configure import g_maxlen
  7. #g_maxlen = 40
  8. VERSION='1.9.0'
  9. APPNAME='jack'
  10. # these variables are mandatory ('/' are converted automatically)
  11. srcdir = '.'
  12. blddir = 'build'
  13. def display_msg(msg, status = None, color = None):
  14. sr = msg
  15. global g_maxlen
  16. g_maxlen = max(g_maxlen, len(msg))
  17. if status:
  18. print "%s :" % msg.ljust(g_maxlen),
  19. Params.pprint(color, status)
  20. else:
  21. print "%s" % msg.ljust(g_maxlen)
  22. def display_feature(msg, build):
  23. if build:
  24. display_msg(msg, "yes", 'GREEN')
  25. else:
  26. display_msg(msg, "no", 'YELLOW')
  27. def fetch_svn_revision(path):
  28. cmd = "LANG= "
  29. cmd += "svnversion "
  30. cmd += path
  31. return commands.getoutput(cmd)
  32. def set_options(opt):
  33. # options provided by the modules
  34. opt.tool_options('compiler_cxx')
  35. opt.tool_options('compiler_cc')
  36. def configure(conf):
  37. conf.check_tool('compiler_cxx')
  38. conf.check_tool('compiler_cc')
  39. conf.sub_config('linux')
  40. conf.sub_config('linux/dbus')
  41. conf.env['LIB_PTHREAD'] = ['pthread']
  42. conf.env['LIB_DL'] = ['dl']
  43. conf.env['LIB_RT'] = ['rt']
  44. conf.define('ADDON_DIR', conf.env['PREFIX'] + '/lib/jack')
  45. conf.define('JACK_LOCATION', conf.env['PREFIX'] + '/bin')
  46. conf.define('SOCKET_RPC_FIFO_SEMA', 1)
  47. conf.define('__SMP__', 1)
  48. conf.define('USE_POSIX_SHM', 1)
  49. conf.define('JACK_SVNREVISION', fetch_svn_revision('.'))
  50. conf.write_config_header('config.h')
  51. print
  52. display_feature('Build with ALSA support', conf.env['BUILD_DRIVER_ALSA'] == True)
  53. display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
  54. display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
  55. display_feature('Build D-Bus JACK (jackdbus)', conf.env['BUILD_JACKDBUS'] == True)
  56. print
  57. def build(bld):
  58. # process subfolders from here
  59. bld.add_subdirs('common')
  60. bld.add_subdirs('linux')
  61. bld.add_subdirs('linux/dbus')