blob: 8e35aab637e9db5d9b65c50845b5e83f74008570 (
plain) (
blame)
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
|
# -*- 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
|