2005-05-13 16:47:18 -04:00
|
|
|
# -*- python -*-
|
|
|
|
|
2006-04-25 20:45:27 -04:00
|
|
|
import os
|
|
|
|
import os.path
|
2005-05-13 16:47:18 -04:00
|
|
|
import glob
|
|
|
|
|
2006-04-25 20:45:27 -04:00
|
|
|
Import('env libraries install_prefix')
|
2005-05-13 16:47:18 -04:00
|
|
|
|
|
|
|
midi2 = env.Copy()
|
2008-03-17 23:42:32 -04:00
|
|
|
midi2.Merge([ libraries['sigc2'],
|
|
|
|
libraries['xml'],
|
|
|
|
libraries['glibmm2'],
|
|
|
|
libraries['glib2'],
|
|
|
|
libraries['pbd'],
|
|
|
|
libraries['jack']
|
|
|
|
])
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2008-02-02 12:22:04 -05:00
|
|
|
if midi2['IS_OSX']:
|
|
|
|
midi2.Append (LINKFLAGS="-Xlinker -headerpad -Xlinker 2048")
|
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
domain = 'midipp'
|
|
|
|
|
|
|
|
midi2.Append(DOMAIN=domain,MAJOR=2,MINOR=1,MICRO=1)
|
|
|
|
|
|
|
|
sources = Split("""
|
|
|
|
fd_midiport.cc
|
|
|
|
fifomidi.cc
|
|
|
|
midi.cc
|
|
|
|
midichannel.cc
|
|
|
|
midifactory.cc
|
|
|
|
midimanager.cc
|
|
|
|
midiparser.cc
|
|
|
|
midiport.cc
|
|
|
|
mmc.cc
|
|
|
|
mtc.cc
|
|
|
|
version.cc
|
|
|
|
""")
|
|
|
|
|
|
|
|
sysdep_sources = Split ("""
|
2006-06-08 19:46:42 -04:00
|
|
|
jack_midiport.cc
|
2005-05-13 16:47:18 -04:00
|
|
|
alsa_sequencer_midiport.cc
|
|
|
|
coremidi_midiport.cc
|
|
|
|
""")
|
|
|
|
|
2006-06-08 19:46:42 -04:00
|
|
|
if env['SYSMIDI'] == 'JACK MIDI':
|
|
|
|
sysdep_src = [ 'jack_midiport.cc' ]
|
|
|
|
midi2.Append (CCFLAGS="-DWITH_JACK_MIDI")
|
|
|
|
elif env['SYSMIDI'] == 'ALSA Sequencer':
|
|
|
|
sysdep_src = [ 'alsa_sequencer_midiport.cc' ]
|
|
|
|
midi2.Append (CCFLAGS="-DWITH_ALSA")
|
|
|
|
elif env['SYSMIDI'] == 'CoreMIDI':
|
2005-05-13 16:47:18 -04:00
|
|
|
sysdep_src = [ 'coremidi_midiport.cc' ]
|
|
|
|
midi2.Append (CCFLAGS="-DWITH_COREMIDI")
|
2006-04-25 16:23:50 -04:00
|
|
|
midi2.Append (LINKFLAGS="-framework CoreMIDI")
|
|
|
|
midi2.Append (LINKFLAGS="-framework CoreFoundation")
|
2006-06-08 19:46:42 -04:00
|
|
|
|
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
|
|
|
|
midi2.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
|
|
|
|
midi2.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
|
|
|
|
2006-11-19 11:45:16 -05:00
|
|
|
midi2.VersionBuild(['version.cc','midi++/version.h'], [])
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-04-25 16:23:50 -04:00
|
|
|
libmidi2 = midi2.SharedLibrary('midi++', [ sources, sysdep_src ])
|
2006-03-04 06:26:25 -05:00
|
|
|
|
2005-05-13 16:47:18 -04:00
|
|
|
Default(libmidi2)
|
2006-01-09 23:25:47 -05:00
|
|
|
|
2008-02-21 14:30:01 -05:00
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour3'), libmidi2))
|
2006-04-25 20:45:27 -04:00
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
env.Alias('tarball', env.Distribute (env['DISTTREE'],
|
|
|
|
[ 'SConscript' ] + sources + sysdep_sources +
|
|
|
|
glob.glob('midi++/*.h')))
|