blob: dae46b91898bf08b8eed610cc4f594a4493c644b (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# -*- mode: python -*-
# OpenPGM build script
# $Id$
import os;
import string;
Import('env')
src = Split("""
thread.c
mem.c
string.c
list.c
slist.c
queue.c
hashtable.c
messages.c
error.c
math.c
packet_parse.c
packet_test.c
sockaddr.c
time.c
if.c
getifaddrs.c
getnodeaddr.c
indextoaddr.c
indextoname.c
nametoindex.c
inet_network.c
md5.c
rand.c
gsi.c
tsi.c
txw.c
rxw.c
skbuff.c
socket.c
source.c
receiver.c
recv.c
engine.c
timer.c
net.c
rate_control.c
checksum.c
reed_solomon.c
galois_tables.c
wsastrerror.c
histogram.c
""")
e = env.Clone();
e.Append(CCFLAGS = '-DGETTEXT_PACKAGE=\'"pgm"\'');
# Galois tables
e.Command ('galois_tables.c', 'galois_generator.pl', "perl $SOURCE > $TARGET");
# Version stamping
e.Command ('version.c', 'version_generator.py', "python $SOURCE > $TARGET");
e.Depends ('version.c', src);
src += ['version.c'];
# C89 degrading
c89source = Builder(action = 'perl -p -e "s/%z(u|d)/%l\\1/g" $SOURCE > $TARGET',
suffix = '.c89.c',
src_suffix = '.c',
single_source = 1);
e.Append(BUILDERS = {'C89Source' : c89source})
c89src = []
for c99file in src:
c89file = c99file.replace('.c', '.c89.c');
c89src += [ c89file ];
e.C89Source(c99file);
e.StaticLibrary('libpgm89', c89src);
e.StaticSharedLibrary('libpgm89-pic', c89src);
# end of file
|