2008-09-30 11:34:54 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import Params
|
2008-10-12 22:43:14 -04:00
|
|
|
import autowaf
|
|
|
|
|
|
|
|
# Version of this package (even if built as a child)
|
|
|
|
EVORAL_VERSION = '0.0.0'
|
|
|
|
|
|
|
|
# Library version (UNIX style major, minor, micro)
|
|
|
|
# major increment <=> incompatible changes
|
|
|
|
# minor increment <=> compatible changes (additions)
|
|
|
|
# micro increment <=> no interface changes
|
|
|
|
# Version history:
|
|
|
|
# 0.0.0 = 0,0,0
|
|
|
|
EVORAL_LIB_VERSION = '0.0.0'
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
# Variables for 'waf dist'
|
|
|
|
APPNAME = 'evoral'
|
2008-10-12 22:43:14 -04:00
|
|
|
VERSION = EVORAL_VERSION
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
# Mandatory variables
|
|
|
|
srcdir = '.'
|
|
|
|
blddir = 'build'
|
|
|
|
|
|
|
|
def set_options(opt):
|
2008-10-12 22:43:14 -04:00
|
|
|
autowaf.set_options(opt)
|
|
|
|
opt.tool_options('compiler_cc')
|
2008-09-30 11:34:54 -04:00
|
|
|
opt.tool_options('compiler_cxx')
|
|
|
|
|
|
|
|
def configure(conf):
|
2008-10-12 22:43:14 -04:00
|
|
|
autowaf.configure(conf)
|
|
|
|
autowaf.check_tool(conf, 'compiler_cxx')
|
|
|
|
autowaf.check_pkg(conf, 'glibmm-2.4', destvar='GLIBMM', vnum='2.16.0', mandatory=True)
|
|
|
|
autowaf.check_pkg(conf, 'gthread-2.0', destvar='GTHREAD', vnum='2.16.0', mandatory=True)
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
def build(bld):
|
2008-10-12 22:43:14 -04:00
|
|
|
# Headers
|
|
|
|
#install_files('PREFIX', 'include/evoral', 'evoral/*.h')
|
|
|
|
#install_files('PREFIX', 'include/evoral', 'evoral/*.hpp')
|
2008-09-30 11:34:54 -04:00
|
|
|
|
2008-10-12 22:43:14 -04:00
|
|
|
# Pkgconfig file
|
|
|
|
#autowaf.build_pc(bld, 'EVORAL', EVORAL_VERSION, 'GLIBMM GTHREAD')
|
|
|
|
|
|
|
|
# Library
|
2008-09-30 11:34:54 -04:00
|
|
|
obj = bld.create_obj('cpp', 'shlib')
|
|
|
|
obj.source = '''
|
|
|
|
src/Control.cpp
|
|
|
|
src/ControlList.cpp
|
|
|
|
src/ControlSet.cpp
|
|
|
|
src/Curve.cpp
|
|
|
|
src/Event.cpp
|
|
|
|
src/MIDIEvent.cpp
|
|
|
|
src/Note.cpp
|
|
|
|
src/SMF.cpp
|
|
|
|
src/SMFReader.cpp
|
|
|
|
src/Sequence.cpp
|
|
|
|
'''
|
2008-10-12 22:43:14 -04:00
|
|
|
obj.includes = ['.']
|
2008-09-30 11:34:54 -04:00
|
|
|
obj.name = 'libevoral'
|
|
|
|
obj.target = 'evoral'
|
|
|
|
obj.uselib = 'GLIBMM GTHREAD'
|
2008-10-12 22:43:14 -04:00
|
|
|
obj.vnum = EVORAL_LIB_VERSION
|
|
|
|
obj.inst_var = 0
|
2008-09-30 11:34:54 -04:00
|
|
|
|
2008-10-12 22:43:14 -04:00
|
|
|
# Unit tests
|
|
|
|
obj = bld.create_obj('cpp', 'program')
|
2008-09-30 11:34:54 -04:00
|
|
|
obj.source = 'test/sequence.cpp'
|
|
|
|
obj.includes = '..'
|
|
|
|
obj.uselib_local = 'libevoral'
|
|
|
|
obj.target = 'sequence'
|
|
|
|
obj.inst_var = 0
|
|
|
|
|
2008-10-12 22:43:14 -04:00
|
|
|
def shutdown():
|
|
|
|
autowaf.shutdown()
|
|
|
|
|