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.

122 lines
5.2KB

  1. #
  2. # Copyright (C) 2007 Arnold Krille
  3. # Copyright (C) 2007 Pieter Palmers
  4. #
  5. # This file originally was part of FFADO
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. import os
  21. import glob
  22. from string import Template
  23. Import( 'env' )
  24. # paths where include files can be found
  25. env.AppendUnique( CPPPATH=["#/", "#/common", "#/common/jack"] )
  26. #HACK: this should not be here ideally
  27. env.AppendUnique( CPPPATH=["#/linux","#/macosx"] )
  28. #
  29. # Define the source files
  30. #
  31. srcfiles_common_serverlib = env.Split( '\
  32. JackActivationCount.cpp JackAPI.cpp JackAudioDriver.cpp JackClient.cpp JackConnectionManager.cpp \
  33. JackDriver.cpp JackEngine.cpp JackEngineControl.cpp JackError.c JackExternalClient.cpp JackFrameTimer.cpp \
  34. JackFreewheelDriver.cpp JackGlobalsServer.cpp JackGraphManager.cpp JackInternalClient.cpp JackPort.cpp JackPosixSemaphore.cpp \
  35. JackPosixThread.cpp JackFifo.cpp JackLoopbackDriver.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp \
  36. JackServer.cpp JackShmMem.cpp JackThreadedDriver.cpp shm.c JackSocket.cpp JackSocketServerChannel.cpp JackSocketNotifyChannel.cpp \
  37. JackSocketServerNotifyChannel.cpp JackTime.c JackServerAPI.cpp JackGlobals.cpp JackDriverLoader.cpp JackDebugClient.cpp \
  38. JackTransportEngine.cpp JackServerGlobals.cpp JackServerLaunch.cpp timestamps.c JackTools.cpp \
  39. ')
  40. # FIXME: this is not pretty
  41. srcfiles_common_serverlib.append('#/example-clients/internal_metro.cpp')
  42. srcfiles_common_clientlib = env.Split( '\
  43. JackActivationCount.cpp JackAPI.cpp JackClient.cpp JackConnectionManager.cpp ringbuffer.c JackServerLaunch.cpp\
  44. JackError.c JackFrameTimer.cpp JackGlobalsClient.cpp JackGraphManager.cpp JackLibClient.cpp JackLibAPI.cpp JackPort.cpp JackPosixSemaphore.cpp \
  45. JackFifo.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp JackMidiAPI.cpp JackEngineControl.cpp JackPosixThread.cpp JackShmMem.cpp \
  46. shm.c JackSocket.cpp JackSocketClientChannel.cpp JackTime.c JackGlobals.cpp JackDebugClient.cpp JackTransportEngine.cpp timestamps.c JackTools.cpp \
  47. ')
  48. srcfiles_common_wrapperlib = ['JackAPIWrapper.cpp', 'ringbuffer.c']
  49. jack_headers = env.Split( 'intclient.h jack.h midiport.h ringbuffer.h \
  50. statistics.h thread.h transport.h types.h')
  51. #
  52. # Start building
  53. #
  54. #pkgconfig = env.ScanReplace( "libjackmp.pc.in" )
  55. #env.Install( env['libdir'] + '/pkgconfig', pkgconfig )
  56. env.AppendUnique( LIBS=["rt", "pthread"] )
  57. # build the common stuff
  58. clientlib = env.SharedLibrary( "jackmp", srcfiles_common_clientlib )
  59. env.Install( "$libdir", clientlib )
  60. serverlib = env.SharedLibrary( "jackdmp", srcfiles_common_serverlib )
  61. env.Install( "$libdir", serverlib )
  62. wrapperlib = env.SharedLibrary( "jackwrapper", srcfiles_common_wrapperlib )
  63. env.Install( "$libdir", wrapperlib )
  64. # install the headers
  65. #if env['JACK_FLAGS']:
  66. #jack_include_dir = env['JACK_INCLUDEDIR']
  67. #if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_include_dir ):
  68. #if env.GetOption('clean'):
  69. #pass
  70. #else:
  71. #jack_old_includes_dir = env['includedir'] + '/jack_up'
  72. #print "moving old jack includes to %s..." % jack_old_includes_dir
  73. #env.Command(jack_old_includes_dir, jack_include_dir, Move("$TARGET", "$SOURCE"))
  74. for header in jack_headers:
  75. env.Alias("install", env.Install( env['includedir'] + '/jack', 'jack/' + header ))
  76. # install the libs
  77. env.Alias("install", env.Install(env['libdir'], serverlib))
  78. env.Alias("install", env.Install(env['libdir'], clientlib))
  79. env.Alias("install", env.Install(env['libdir'], wrapperlib))
  80. #jack_libdir = env['JACK_LIBDIR']
  81. #libjackdmp_location = env['libdir'] + '/libjackmp.so'
  82. #if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_libdir ):
  83. #if env.GetOption('clean'):
  84. ##note: is this executed before the actual uninstall?
  85. #lib_files = glob.glob(jack_libdir + '/libjack.so.*.up')
  86. #for old_name in lib_files:
  87. #new_name = old_name[:-3]
  88. #print "restoring old jack lib %s to %s..." % (old_name, new_name)
  89. #env.Command(Delete(new_name))
  90. #env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
  91. #else:
  92. #lib_files = glob.glob(jack_libdir + '/libjack.so.*')
  93. #env.Alias("install", env.Install(env['libdir'], serverlib))
  94. #env.Alias("install", env.Install(env['libdir'], clientlib))
  95. #for old_name in lib_files:
  96. #new_name = old_name + '.up'
  97. #print "moving old jack lib %s to %s..." % (old_name, new_name)
  98. #env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
  99. #print " linking to %s..." % (libjackdmp_location)
  100. #env.Command(old_name, libjackdmp_location, "ln -s $TARGET $SOURCE")