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.

119 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 JackMidiAPI.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 ringbuffer.c \
  39. ')
  40. srcfiles_common_clientlib = env.Split( '\
  41. JackActivationCount.cpp JackAPI.cpp JackClient.cpp JackConnectionManager.cpp ringbuffer.c JackServerLaunch.cpp\
  42. JackError.c JackFrameTimer.cpp JackGlobalsClient.cpp JackGraphManager.cpp JackLibClient.cpp JackLibAPI.cpp JackPort.cpp JackPosixSemaphore.cpp \
  43. JackFifo.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp JackMidiAPI.cpp JackEngineControl.cpp JackPosixThread.cpp JackShmMem.cpp \
  44. shm.c JackSocket.cpp JackSocketClientChannel.cpp JackTime.c JackGlobals.cpp JackDebugClient.cpp JackTransportEngine.cpp timestamps.c JackTools.cpp \
  45. ')
  46. srcfiles_common_wrapperlib = ['JackAPIWrapper.cpp', 'ringbuffer.c']
  47. jack_headers = env.Split( 'intclient.h jack.h midiport.h ringbuffer.h \
  48. statistics.h thread.h transport.h types.h')
  49. #
  50. # Start building
  51. #
  52. #pkgconfig = env.ScanReplace( "libjackmp.pc.in" )
  53. #env.Install( env['libdir'] + '/pkgconfig', pkgconfig )
  54. env.AppendUnique( LIBS=["rt", "pthread"] )
  55. # build the common stuff
  56. clientlib = env.SharedLibrary( "jackmp", srcfiles_common_clientlib )
  57. env.Install( "$libdir", clientlib )
  58. serverlib = env.SharedLibrary( "jackdmp", srcfiles_common_serverlib )
  59. env.Install( "$libdir", serverlib )
  60. wrapperlib = env.SharedLibrary( "jackwrapper", srcfiles_common_wrapperlib )
  61. env.Install( "$libdir", wrapperlib )
  62. # install the headers
  63. #if env['JACK_FLAGS']:
  64. #jack_include_dir = env['JACK_INCLUDEDIR']
  65. #if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_include_dir ):
  66. #if env.GetOption('clean'):
  67. #pass
  68. #else:
  69. #jack_old_includes_dir = env['includedir'] + '/jack_up'
  70. #print "moving old jack includes to %s..." % jack_old_includes_dir
  71. #env.Command(jack_old_includes_dir, jack_include_dir, Move("$TARGET", "$SOURCE"))
  72. for header in jack_headers:
  73. env.Alias("install", env.Install( env['includedir'] + '/jack', 'jack/' + header ))
  74. # install the libs
  75. env.Alias("install", env.Install(env['libdir'], serverlib))
  76. env.Alias("install", env.Install(env['libdir'], clientlib))
  77. env.Alias("install", env.Install(env['libdir'], wrapperlib))
  78. #jack_libdir = env['JACK_LIBDIR']
  79. #libjackdmp_location = env['libdir'] + '/libjackmp.so'
  80. #if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_libdir ):
  81. #if env.GetOption('clean'):
  82. ##note: is this executed before the actual uninstall?
  83. #lib_files = glob.glob(jack_libdir + '/libjack.so.*.up')
  84. #for old_name in lib_files:
  85. #new_name = old_name[:-3]
  86. #print "restoring old jack lib %s to %s..." % (old_name, new_name)
  87. #env.Command(Delete(new_name))
  88. #env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
  89. #else:
  90. #lib_files = glob.glob(jack_libdir + '/libjack.so.*')
  91. #env.Alias("install", env.Install(env['libdir'], serverlib))
  92. #env.Alias("install", env.Install(env['libdir'], clientlib))
  93. #for old_name in lib_files:
  94. #new_name = old_name + '.up'
  95. #print "moving old jack lib %s to %s..." % (old_name, new_name)
  96. #env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
  97. #print " linking to %s..." % (libjackdmp_location)
  98. #env.Command(old_name, libjackdmp_location, "ln -s $TARGET $SOURCE")