# -*- mode: python -*- # OpenPGM build script # $Id$ Import('env') e = env.Clone() e.Append(CCFLAGS = '-DGETTEXT_PACKAGE=\'"pgm-snmp"\''); e.MergeFlags(e['SNMP_FLAGS']); src = Split(""" snmp.c pgmMIB.c """) e.StaticLibrary('libpgmsnmp', src); e.StaticSharedLibrary('libpgmsnmp-pic', src); #----------------------------------------------------------------------------- # unit testing if env['WITH_CHECK'] == 'true': te = e.Clone(); newCCFLAGS = []; for flag in te['CCFLAGS']: if ("-W" != flag[:2]) and ("-pedantic" != flag[:9]): newCCFLAGS.append(flag); te['CCFLAGS'] = newCCFLAGS; te.ParseConfig ('pkg-config --cflags --libs check'); te.Program ('snmp_unittest.c'); te.Program (['pgmMIB_unittest.c', e.Object('snmp.c')]); # end of file