Import("env") if env.get("UNBOUND_BUNDLED", False) : if env["PLATFORM"] == "win32" : cppflags = ["/I" + Dir("#/3rdParty/Unbound/src/src").abspath] else : cppflags = [("-isystem", Dir("#/3rdParty/Unbound/src/src").abspath)] ################################################################################ # Flags ################################################################################ if env["SCONS_STAGE"] == "flags" : env["UNBOUND_FLAGS"] = { "CPPPATH": [Dir("src/src/libunbound")], "CPPFLAGS": cppflags, "LIBPATH": [env.Dir(".")], "LIBS": ["Swiften_Unbound"], } ################################################################################ # Build ################################################################################ if env["SCONS_STAGE"] == "build" : myenv = env.Clone() myenv.Append(CPPDEFINES = [("UNBOUND_STATICLIB")]) myenv.Append(CPPPATH = ["../Ldns/src/include", "src/src", "."]) myenv.Install("include", [ ]) myenv.StaticLibrary("Swiften_Unbound", [ "src/src/daemon/acl_list.c", "src/src/daemon/cachedump.c", "src/src/daemon/daemon.c", "src/src/daemon/remote.c", "src/src/daemon/stats.c", "src/src/daemon/unbound.c", # duplicate symbols: "src/src/daemon/worker.c", "src/src/iterator/iter_delegpt.c", "src/src/iterator/iter_donotq.c", "src/src/iterator/iter_fwd.c", "src/src/iterator/iter_hints.c", "src/src/iterator/iter_priv.c", "src/src/iterator/iter_resptype.c", "src/src/iterator/iter_scrub.c", "src/src/iterator/iter_utils.c", "src/src/iterator/iterator.c", "src/src/libunbound/context.c", "src/src/libunbound/libunbound.c", "src/src/libunbound/libworker.c", "src/src/services/cache/dns.c", "src/src/services/cache/infra.c", "src/src/services/cache/rrset.c", "src/src/services/listen_dnsport.c", "src/src/services/localzone.c", "src/src/services/mesh.c", "src/src/services/modstack.c", "src/src/services/outbound_list.c", "src/src/services/outside_network.c", "src/src/util/alloc.c", "src/src/util/config_file.c", "src/src/util/configlexer.c", "src/src/util/configparser.c", "src/src/util/data/dname.c", "src/src/util/data/msgencode.c", "src/src/util/data/msgparse.c", "src/src/util/data/msgreply.c", "src/src/util/data/packed_rrset.c", "src/src/util/fptr_wlist.c", "src/src/util/locks.c", "src/src/util/log.c", "src/src/util/mini_event.c", "src/src/util/module.c", "src/src/util/net_help.c", "src/src/util/netevent.c", "src/src/util/random.c", "src/src/util/rbtree.c", "src/src/util/regional.c", "src/src/util/rtt.c", "src/src/util/storage/dnstree.c", "src/src/util/storage/lookup3.c", "src/src/util/storage/lruhash.c", "src/src/util/storage/slabhash.c", "src/src/util/timehist.c", "src/src/util/tube.c", #src/src/util/winsock_event.c "src/src/validator/autotrust.c", "src/src/validator/val_anchor.c", "src/src/validator/val_kcache.c", "src/src/validator/val_kentry.c", "src/src/validator/val_neg.c", "src/src/validator/val_nsec.c", "src/src/validator/val_nsec3.c", "src/src/validator/val_sigcrypt.c", "src/src/validator/val_utils.c", "src/src/validator/validator.c", ])