37de48eb36c6d8de6e00faa82ee6658587be1df7
[senf.git] / Packets / SConscript
1 # -*- python -*-
2
3 Import('env')
4 import SENFSCons, glob
5
6 ###########################################################################
7
8 def makeAllIncludesHH(target, headers):
9     file(env.File(target).abspath,"w").write("".join([ '#include "%s"\n' % f
10                                                        for f in headers ]))
11
12 ###########################################################################
13
14 source_headers = [ f for f in glob.glob("*.hh")
15                    if 'defined(SENF_PACKETS_DECL_ONLY)' in file(f).read() ]
16 source_headers.sort()
17 makeAllIncludesHH('all_includes.hh', source_headers)
18 env.Clean('all','all_includes.hh')
19
20 SENFSCons.StandardTargets(env)
21 SENFSCons.Lib(env,
22               library = 'Packets',
23               sources = SENFSCons.GlobSources(),
24               LIBS = [ 'Socket', 'Utils' ])
25 SENFSCons.Doxygen(env, extra_sources = [
26     env.Dia2Png("structure.dia")
27 ])
28
29 SConscript(glob.glob("*/SConscript"))
30