Browse Source

jackdbus executable buildable using waf

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2397 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
nedko 17 years ago
parent
commit
e085c138ea
2 changed files with 60 additions and 19 deletions
  1. +46
    -9
      linux/dbus/wscript
  2. +14
    -10
      wscript

+ 46
- 9
linux/dbus/wscript View File

@@ -1,9 +1,50 @@
#! /usr/bin/env python #! /usr/bin/env python
# encoding: utf-8 # encoding: utf-8


import Constants
import Params
from Configure import g_maxlen
#g_maxlen = 40

def display_msg(msg, status = None, color = None):
sr = msg
global g_maxlen
g_maxlen = max(g_maxlen, len(msg))
if status:
print "%s :" % msg.ljust(g_maxlen),
Params.pprint(color, status)
else:
print "%s" % msg.ljust(g_maxlen)

def display_feature(msg, build):
if build:
display_msg(msg, "yes", 'GREEN')
else:
display_msg(msg, "no", 'YELLOW')

def configure(conf):
conf.check_pkg('dbus-1')

e = conf.create_header_configurator()
e.name = 'expat.h'
e.define = 'HAVE_EXPAT'
e.run()

if conf.is_defined('HAVE_EXPAT'):
conf.env['LIB_EXPAT'] = ['expat']

build_jackdbus = False;
if conf.is_defined('HAVE_EXPAT') and conf.is_defined('HAVE_DBUS_1'):
build_jackdbus = True
conf.env['BUILD_JACKDBUS'] = build_jackdbus
display_feature('Build D-Bus JACK (jackdbus)', build_jackdbus)

def build(bld): def build(bld):
obj = bld.create_obj('cpp', 'program')
#obj.features.append('cc')
if bld.env()["BUILD_JACKDBUS"] != True:
return

obj = bld.create_obj('cc', 'program')
obj.includes = ['.', '../../common', '../../common/jack']
obj.source = [ obj.source = [
'jackdbus.c', 'jackdbus.c',
'controller.c', 'controller.c',
@@ -19,10 +60,6 @@ def build(bld):
'xml_write_raw.c', 'xml_write_raw.c',
'sigsegv.c', 'sigsegv.c',
] ]
obj.includes = '.'
obj.uselib = 'DBUS-1'
#obj.uselib_local = 'tony john testshlib' # 'tony john peter' # look for 'peter' above
obj.target = 'jackdbus_dyn_linked'

def configure(conf):
conf.check_pkg('dbus-1', mandatory=True)
obj.uselib = 'PTHREAD DL RT DBUS-1 EXPAT'
obj.uselib_local = 'serverlib'
obj.target = 'jackdbus'

+ 14
- 10
wscript View File

@@ -2,6 +2,7 @@
# encoding: utf-8 # encoding: utf-8


import Params import Params
import commands


VERSION='1.9.0' VERSION='1.9.0'
APPNAME='jack' APPNAME='jack'
@@ -10,29 +11,33 @@ APPNAME='jack'
srcdir = '.' srcdir = '.'
blddir = 'build' blddir = 'build'


def fetch_svn_revision(path):
cmd = "LANG= "
cmd += "svnversion "
cmd += path
return commands.getoutput(cmd)

def set_options(opt): def set_options(opt):
# options provided by the modules # options provided by the modules
opt.tool_options('compiler_cxx') opt.tool_options('compiler_cxx')
opt.tool_options('compiler_cc') opt.tool_options('compiler_cc')


#opt.add_option('--dbus', action='store_true', default=False, help='Compile D-Bus JACK')

def configure(conf): def configure(conf):
conf.check_tool('compiler_cxx') conf.check_tool('compiler_cxx')
conf.check_tool('compiler_cc') conf.check_tool('compiler_cc')


#if Params.g_options['dbus']:
# conf.sub_config('linux/dbus')
conf.sub_config('linux/dbus')


conf.env['LIB_PTHREAD'] = ['pthread'] conf.env['LIB_PTHREAD'] = ['pthread']
conf.env['LIB_DL'] = ['dl'] conf.env['LIB_DL'] = ['dl']
conf.env['LIB_RT'] = ['rt'] conf.env['LIB_RT'] = ['rt']


conf.define('ADDON_DIR', '/blabla')
conf.define('ADDON_DIR', conf.env['PREFIX'] + '/lib/jack')
conf.define('JACK_LOCATION', conf.env['PREFIX'] + '/bin') conf.define('JACK_LOCATION', conf.env['PREFIX'] + '/bin')
conf.define('SOCKET_RPC_FIFO_SEMA', 1) conf.define('SOCKET_RPC_FIFO_SEMA', 1)
conf.define('__SMP__', 1) conf.define('__SMP__', 1)
conf.define('USE_POSIX_SHM', 1) conf.define('USE_POSIX_SHM', 1)
conf.define('JACK_SVNREVISION', fetch_svn_revision('.'))
conf.write_config_header('config.h') conf.write_config_header('config.h')


#print Params.g_options #print Params.g_options
@@ -40,8 +45,7 @@ def configure(conf):


def build(bld): def build(bld):
# process subfolders from here # process subfolders from here
bld.add_subdirs([
'common',
'linux',
# 'linux/dbus',
])
bld.add_subdirs('common')
bld.add_subdirs('linux')

bld.add_subdirs('linux/dbus')

Loading…
Cancel
Save