File: wscript

package info (click to toggle)
nekobee 0.1.8~repack1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 1,176 kB
  • ctags: 1,680
  • sloc: python: 11,173; ansic: 4,425; makefile: 37; sh: 1
file content (67 lines) | stat: -rw-r--r-- 1,933 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /usr/bin/env python
# encoding: utf-8

import os

# the following two variables are used by the target "waf dist"
VERSION='0.2'
APPNAME='nekobee'

# these variables are mandatory ('/' are converted automatically)
srcdir = '.'
blddir = 'build'

def set_options(opt):
    opt.tool_options('compiler_cc')

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

    conf.check_cfg(package='dssi', args='--cflags --libs')
    conf.check_cfg(package='liblo', args='--cflags --libs')
    conf.check_cfg(package='gtk+-2.0', args='--cflags --libs')

    conf.env['DSSI_DIR'] = os.path.normpath(os.path.join(conf.env['PREFIX'], 'lib', 'dssi'))
    conf.env['INSTALL_DIR'] = os.path.join(conf.env['DSSI_DIR'], 'nekobee')

    conf.define('INSTALL_DIR', conf.env['INSTALL_DIR'])
    conf.write_config_header('config.h')

def build(bld):
    # DSSI plugin
    plugin_dssi = bld.new_task_gen('cc', 'shlib')
    plugin_dssi.env['shlib_PATTERN'] = '%s.so'
    plugin_dssi.env.append_value("-module -avoid-version -Wc,-nostartfiles", "LINKFLAGS")
    plugin_dssi.includes = ['.', 'src']
    plugin_dssi.defines = 'HAVE_CONFIG_H'
    plugin_dssi.source = [
	'src/nekobee-dssi.c',
	'src/nekobee_data.c',
	'src/nekobee_ports.c',
	'src/nekobee_synth.c',
	'src/nekobee_voice.c',
	'src/nekobee_voice_render.c',
	'src/minblep_tables.c',
        ]
    plugin_dssi.target = 'nekobee'
    plugin_dssi.install_path = '${DSSI_DIR}/'
    bld.install_files('${INSTALL_DIR}', 'extra/*')

    # DSSI UI executable
    gui_gtk = bld.new_task_gen('cc', 'program')
    gui_gtk.includes = ['.', 'src']
    gui_gtk.defines = 'HAVE_CONFIG_H'
    gui_gtk.source = [
	'src/gui_callbacks.c',
	'src/gui_data.c',
	'src/gui_interface.c',
	'src/gtkknob.c',
#	'src/gtk/slider.c',
	'src/gui_main.c',
	'src/nekobee_data.c',
	'src/nekobee_ports.c',
        ]
    gui_gtk.uselib = 'GTK+-2.0 LIBLO'
    gui_gtk.target = 'nekobee_gtk'
    gui_gtk.install_path = '${INSTALL_DIR}/'