senfscons: Much improved install implementation
[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
19 SENFSCons.StandardTargets(env)
20 SENFSCons.Lib(env,
21               library = 'Packets',
22               sources = SENFSCons.GlobSources(),
23               LIBS = [ 'Socket', 'Utils' ])
24 SENFSCons.Doxygen(env, extra_sources = [
25     env.Dia2Png("structure.dia")
26 ])
27
28 SConscript(glob.glob("*/SConscript"))