use libltc and libtimecode as static libs, and upgrade to waf 1.7
[ardour.git] / libs / surfaces / control_protocol / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 import os
4
5 # Library version (UNIX style major, minor, micro)
6 # major increment <=> incompatible changes
7 # minor increment <=> compatible changes (additions)
8 # micro increment <=> no interface changes
9 APPNAME = 'libardour_cp'
10 LIBARDOUR_CP_LIB_VERSION = '4.1.0'
11
12 # Mandatory variables
13 top = '.'
14 out = 'build'
15
16 controlcp_sources = [
17     'basic_ui.cc',
18     'control_protocol.cc',
19     ]
20
21 def options(opt):
22     autowaf.set_options(opt)
23
24 def configure(conf):
25     autowaf.configure(conf)
26
27 def build(bld):
28     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
29         obj              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=controlcp_sources)
30         # defines for this library
31         obj.defines      = [ 'LIBCONTROLCP_DLL=1', 'LIBCONTROLCP_DLL_EXPORTS=1' ]
32         # internal shared libs that we use
33         obj.defines     += [ 'LIBPBD_DLL=1', 'LIBARDOUR_DLL=1', 'LIBEVORAL_DLL=1' ]
34         obj.cxxflags     = [ '-fvisibility=hidden' ]
35         obj.cflags       = [ '-fvisibility=hidden' ]
36     else:
37         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources)
38         obj.cxxflags     = [ '-fPIC' ]
39         obj.defines      = [ ]
40
41     obj.export_includes = ['.', './control_protocol' ]
42     obj.defines    +=  [ 'PACKAGE="ardour_cp"' ]
43     obj.includes     = ['.', './control_protocol']
44     obj.name         = 'libardour_cp'
45     obj.target       = 'ardourcp'
46     obj.use          = 'ardour'
47     obj.vnum         = LIBARDOUR_CP_LIB_VERSION
48     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
49
50 def shutdown():
51     autowaf.shutdown()