From fbca97de7abe5ffb04a8181a28d4f3ff7b40bb65 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 10 Nov 2009 13:16:01 +0000 Subject: [PATCH] scons for exec git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@528 e16421f0-f15b-0410-abcd-98678b794739 --- SConstruct | 1 + exec/SConscript | 43 ++++++++++++++++++++++++++++++++++++++++++ tests/transfertest.cpp | 1 + 3 files changed, 45 insertions(+) create mode 100644 exec/SConscript diff --git a/SConstruct b/SConstruct index b0f8cb9..a2155b1 100644 --- a/SConstruct +++ b/SConstruct @@ -100,3 +100,4 @@ Export("libs") Export("libpath") Export("DEBUG") SConscript('tests/SConscript') +SConscript('exec/SConscript') diff --git a/exec/SConscript b/exec/SConscript new file mode 100644 index 0000000..acf407f --- /dev/null +++ b/exec/SConscript @@ -0,0 +1,43 @@ +import sys + +Import("DEBUG") +Import("env") +Import("libpath") + +cpppath = env["CPPPATH"] +libs = ['p2tp'] + +if sys.platform == "win32": + cpppath = ".." + libpath += '..;' + if DEBUG: + env.Append(CXXFLAGS="/Zi /Yd /MTd") +else: + cpppath = cpppath + ':..' + libpath += ':..' + if DEBUG: + env.Append(CXXFLAGS="-g") + +print "tests: libpath is",libpath + +env.Program( + target='seeder', + source=['seeder.cpp'], + CPPPATH=cpppath, + LIBS=libs, + LIBPATH=libpath ) + +env.Program( + target='leecher', + source=['leecher.cpp'], + CPPPATH=cpppath, + LIBS=libs, + LIBPATH=libpath ) + +env.Program( + target='hasher', + source=['hasher.cpp'], + CPPPATH=cpppath, + LIBS=libs, + LIBPATH=libpath ) + diff --git a/tests/transfertest.cpp b/tests/transfertest.cpp index 521445e..4aea0f4 100644 --- a/tests/transfertest.cpp +++ b/tests/transfertest.cpp @@ -10,6 +10,7 @@ //#include #include "p2tp.h" #include "compat.h" +#include using namespace p2tp; -- 2.20.1