AddOption('--release', action = 'store_true') env = Environment() conf = Configure(env) for lib in ('config', 'pcre', 'xml2'): if not conf.CheckLib(lib): print 'Could not find %s' % lib Exit(1) env = conf.Finish() env.Append(CCFLAGS = ['-std=c99', '-D_GNU_SOURCE']) if GetOption('release'): env.Append(CCFLAGS = ['-O2']) else: env.Append(CCFLAGS = ['-Wall', '-g']) env.ParseConfig('pkg-config --cflags --libs libconfig') env.ParseConfig('pcre-config --cflags --libs') env.ParseConfig('xml2-config --cflags --libs') env.Program('ircstats', Glob('*.c')) env.Program('usertimes', [x + '.c' for x in ('usertimes', 'nick', 'regexset', 'channel', 'config', 'word', 'sdbm')]) # vim: syn=python