1 |
#!/usr/bin/python |
---|
2 |
# |
---|
3 |
# Copyright (C) 2007-2008 Arnold Krille |
---|
4 |
# Copyright (C) 2007-2008 Pieter Palmers |
---|
5 |
# Copyright (C) 2012 Jonathan Woithe |
---|
6 |
# |
---|
7 |
# This file is part of FFADO |
---|
8 |
# FFADO = Free FireWire (pro-)audio drivers for Linux |
---|
9 |
# |
---|
10 |
# FFADO is based upon FreeBoB. |
---|
11 |
# |
---|
12 |
# This program is free software: you can redistribute it and/or modify |
---|
13 |
# it under the terms of the GNU General Public License as published by |
---|
14 |
# the Free Software Foundation, either version 2 of the License, or |
---|
15 |
# (at your option) version 3 of the License. |
---|
16 |
# |
---|
17 |
# This program is distributed in the hope that it will be useful, |
---|
18 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 |
# GNU General Public License for more details. |
---|
21 |
# |
---|
22 |
# You should have received a copy of the GNU General Public License |
---|
23 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
24 |
# |
---|
25 |
import os |
---|
26 |
from string import Template |
---|
27 |
|
---|
28 |
Import( 'env' ) |
---|
29 |
|
---|
30 |
e = env.Clone() |
---|
31 |
|
---|
32 |
# Needed to build ffado-set-nickname |
---|
33 |
e.MergeFlags( "-I#/ -I#/src -L%ssrc -lffado" % env['build_base'] ) |
---|
34 |
if not e.GetOption( "clean" ): |
---|
35 |
if not env['SERIALIZE_USE_EXPAT']: |
---|
36 |
if 'LIBXML30_FLAGS' in env : |
---|
37 |
e.MergeFlags( env['LIBXML30_FLAGS'].decode() ) |
---|
38 |
if not('LIBXML30_FLAGS' in env) : |
---|
39 |
e.MergeFlags( env['LIBXML26_FLAGS'].decode() ) |
---|
40 |
else: |
---|
41 |
e.PrependUnique( LIBS=["expat"] ) |
---|
42 |
|
---|
43 |
e.Command( "static_info.txt", "ffado-diag", "support/tools/ffado-diag --static > $TARGET" ) |
---|
44 |
|
---|
45 |
e.ScanReplace( "ffado-diag.in" ) |
---|
46 |
|
---|
47 |
e.Install( "$bindir", "ffado-diag" ) |
---|
48 |
e.Install( "$libdatadir", "static_info.txt" ) |
---|
49 |
|
---|
50 |
if env['ENABLE_DICE']: |
---|
51 |
e.Program( target = "ffado-set-nickname", source = "ffado-set-nickname.cpp" ) |
---|
52 |
e.Install( "$bindir", "ffado-set-nickname" ) |
---|
53 |
|
---|
54 |
# Install manpages in section 1 |
---|
55 |
dest = os.path.join("$mandir", "man1", "ffado-diag.1") |
---|
56 |
env.InstallAs(source="ffado-diag.1", target=dest) |
---|