Commit 86d2adb4 authored by nedko's avatar nedko
Browse files

waf: build drivers; improve configure summary

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2399 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 6d0596e6
#! /usr/bin/env python
# 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')
......@@ -33,11 +12,7 @@ def configure(conf):
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)
conf.env['BUILD_JACKDBUS'] = conf.is_defined('HAVE_EXPAT') and conf.is_defined('HAVE_DBUS_1')
def build(bld):
if bld.env()["BUILD_JACKDBUS"] != True:
......
#! /usr/bin/env python
# encoding: utf-8
def configure(conf):
conf.check_pkg('alsa', vnum = '1.0.0')
conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')
#print "--> Disabling 'alsa' backend since no useful ALSA installation found"
#print "--> Disabling 'freebob' backend since no useful FreeBoB installation found"
#print "--> Disabling 'firewire' backend since no useful FFADO installation found"
#echo \| Build with ALSA support............................... : $HAVE_ALSA
#echo \| Build with old FireWire \(FreeBob\) support............. : $HAVE_FREEBOB
#echo \| Build with new FireWire \(FFADO\) support............... : $HAVE_FIREWIRE
conf.check_pkg('libfreebob', vnum = '1.0.0')
conf.env['BUILD_DRIVER_FREEBOB'] = conf.is_defined('HAVE_LIBFREEBOB')
conf.check_pkg('libffado', vnum = '1.999.17')
conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')
def build(bld):
obj = bld.create_obj('cpp', 'program')
obj.includes = ['../common/jack']
obj.source = ['../common/Jackdmp.cpp']
obj.uselib = 'PTHREAD DL RT'
obj.uselib_local = 'serverlib'
obj.target = 'jackd'
jackd = bld.create_obj('cpp', 'program')
jackd.includes = ['../common/jack']
jackd.source = ['../common/Jackdmp.cpp']
jackd.uselib = 'PTHREAD DL RT'
jackd.uselib_local = 'serverlib'
jackd.target = 'jackd'
def configure(conf):
conf.check_pkg('dbus-1', mandatory=True)
driver_dummy = bld.create_obj('cpp', 'shlib')
driver_dummy.env['shlib_PATTERN'] = '%s.so'
driver_dummy.defines = 'HAVE_CONFIG_H'
driver_dummy.includes = ['../common/jack']
driver_dummy.target = 'dummy'
driver_dummy.source = '../common/JackDummyDriver.cpp'
if bld.env()['BUILD_DRIVER_ALSA'] == True:
driver_alsa = bld.create_obj('cpp', 'shlib')
driver_alsa.features.append('cc')
driver_alsa.env['shlib_PATTERN'] = '%s.so'
driver_alsa.defines = 'HAVE_CONFIG_H JACKMP'
driver_alsa.includes = ['.', '../common', '../common/jack']
driver_alsa.target = 'alsa'
driver_alsa.source = [
'alsa/JackAlsaDriver.cpp',
'alsa/alsa_rawmidi.c',
'alsa/alsa_seqmidi.c',
'alsa/alsa_midi_jackmp.cpp',
'alsa/memops.c',
'alsa/generic_hw.c',
'alsa/hdsp.c',
'alsa/hammerfall.c',
'alsa/ice1712.c'
]
if bld.env()['BUILD_DRIVER_FREEBOB'] == True:
driver_freebob = bld.create_obj('cpp', 'shlib')
driver_freebob.env['shlib_PATTERN'] = '%s.so'
driver_freebob.defines = 'HAVE_CONFIG_H'
driver_freebob.includes = ['.', '../common', '../common/jack']
driver_freebob.target = 'freebob'
driver_freebob.source = 'freebob/JackFreebobDriver.cpp'
if bld.env()['BUILD_DRIVER_FFADO'] == True:
driver_ffado = bld.create_obj('cpp', 'shlib')
driver_ffado.env['shlib_PATTERN'] = '%s.so'
driver_ffado.defines = 'HAVE_CONFIG_H'
driver_ffado.includes = ['.', '../common', '../common/jack']
driver_ffado.target = 'firewire'
driver_ffado.source = 'firewire/JackFFADODriver.cpp'
......@@ -3,6 +3,9 @@
import Params
import commands
import Params
from Configure import g_maxlen
#g_maxlen = 40
VERSION='1.9.0'
APPNAME='jack'
......@@ -11,6 +14,22 @@ APPNAME='jack'
srcdir = '.'
blddir = 'build'
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 fetch_svn_revision(path):
cmd = "LANG= "
cmd += "svnversion "
......@@ -26,6 +45,7 @@ def configure(conf):
conf.check_tool('compiler_cxx')
conf.check_tool('compiler_cc')
conf.sub_config('linux')
conf.sub_config('linux/dbus')
conf.env['LIB_PTHREAD'] = ['pthread']
......@@ -40,8 +60,12 @@ def configure(conf):
conf.define('JACK_SVNREVISION', fetch_svn_revision('.'))
conf.write_config_header('config.h')
#print Params.g_options
#print conf.env
print
display_feature('Build with ALSA support', conf.env['BUILD_DRIVER_ALSA'] == True)
display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
display_feature('Build D-Bus JACK (jackdbus)', conf.env['BUILD_JACKDBUS'] == True)
print
def build(bld):
# process subfolders from here
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment