Completely refactor install targets
[senf.git] / Packets / SConscript
index 37de48e..64aa7a7 100644 (file)
@@ -5,26 +5,15 @@ import SENFSCons, glob
 
 ###########################################################################
 
-def makeAllIncludesHH(target, headers):
-    file(env.File(target).abspath,"w").write("".join([ '#include "%s"\n' % f
-                                                       for f in headers ]))
-
-###########################################################################
-
-source_headers = [ f for f in glob.glob("*.hh")
-                   if 'defined(SENF_PACKETS_DECL_ONLY)' in file(f).read() ]
-source_headers.sort()
-makeAllIncludesHH('all_includes.hh', source_headers)
-env.Clean('all','all_includes.hh')
+sources, includes = SENFSCons.Glob(env)
 
 SENFSCons.StandardTargets(env)
-SENFSCons.Lib(env,
-              library = 'Packets',
-              sources = SENFSCons.GlobSources(),
-              LIBS = [ 'Socket', 'Utils' ])
+SENFSCons.Lib(env, sources)
 SENFSCons.Doxygen(env, extra_sources = [
-    env.Dia2Png("structure.dia")
+    env.Dia2Png("structure.dia"),
+    env.Dia2Png("MPEGDVBBundle/TLV.dia")
 ])
+SENFSCons.InstallIncludeFiles(env, includes)
 
 SConscript(glob.glob("*/SConscript"))