#!/usr/bin/env python # encoding: utf-8 """ waf build script for Lighttpd 2.x License and Copyright: see COPYING file """ import Options, sys, Utils def configure(conf): if sys.platform.startswith('freebsd'): conf.check(lib='kvm', uselib_store='kvm', mandatory=True) pass def build(bld): source = ''' angel_connection.c angel_data.c buffer.c encoding.c events.c idlist.c ip_parsers.rl jobqueue.c memcached.c mempool.c module.c radix.c sys_memory.c tasklet.c utils.c waitqueue.c ''' if bld.env['WITH_PROFILER'] == 1: if sys.platform.startswith('freebsd'): libs += ['execinfo'] source += ''' profiler.c ''' if sys.platform.startswith('freebsd'): libs = ['kvm'] else: libs = [] libcommon = bld.new_task_gen( features = 'cc cshlib', source = source, defines = ['HAVE_CONFIG_H=1'], uselib = ['glib', 'gthread', 'gmodule', 'ev'] + libs, includes = ['#/include/'], target = 'common')