summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-12 17:59:10 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-12 17:59:10 (GMT)
commit283a6801fd11aeaf38b2298399c2bf622f743cf4 (patch)
treea63e3401309793844c29b08512d7a9dc12636fb3 /Slimber
parent2a28c1be20477ddf25a233ee34c991951295058b (diff)
downloadswift-283a6801fd11aeaf38b2298399c2bf622f743cf4.zip
swift-283a6801fd11aeaf38b2298399c2bf622f743cf4.tar.bz2
Added Slimber & valgrind testing to SCons.
Diffstat (limited to 'Slimber')
-rw-r--r--Slimber/CLI/Makefile.inc15
-rw-r--r--Slimber/CLI/SConscript8
-rw-r--r--Slimber/CLI/main.cpp4
-rw-r--r--Slimber/Makefile.inc26
-rw-r--r--Slimber/SConscript28
-rw-r--r--Slimber/UnitTest/Makefile.inc3
6 files changed, 39 insertions, 45 deletions
diff --git a/Slimber/CLI/Makefile.inc b/Slimber/CLI/Makefile.inc
deleted file mode 100644
index 974b835..0000000
--- a/Slimber/CLI/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-SLIMBER_CLI_TARGET = Slimber/CLI/slimber
-SLIMBER_CLI_SOURCES = \
- Slimber/CLI/main.cpp
-SLIMBER_CLI_OBJECTS = \
- $(SLIMBER_CLI_SOURCES:.cpp=.o)
-
-$(SLIMBER_CLI_TARGET): $(SWIFTEN_TARGET) $(SLIMBER_TARGET) $(SLIMBER_CLI_OBJECTS)
- $(QUIET_LINK)$(CXX) -o $(SLIMBER_CLI_TARGET) $(SLIMBER_CLI_OBJECTS) $(LDFLAGS) $(SLIMBER_TARGET) $(SWIFTEN_TARGET) $(LIBS)
-
-#TARGETS += $(SLIMBER_CLI_TARGET)
-SLIMBER_TARGETS += $(SLIMBER_CLI_TARGET)
-CLEANFILES += \
- $(SLIMBER_CLI_TARGET)
-DEPS += \
- $(SLIMBER_CLI_SOURCES:.cpp=.dep) \
diff --git a/Slimber/CLI/SConscript b/Slimber/CLI/SConscript
new file mode 100644
index 0000000..b65843d
--- /dev/null
+++ b/Slimber/CLI/SConscript
@@ -0,0 +1,8 @@
+Import("env")
+
+myenv = env.Clone()
+myenv.MergeFlags(env["SLIMBER_FLAGS"])
+myenv.MergeFlags(env["SWIFTEN_FLAGS"])
+myenv.MergeFlags(env["BOOST_FLAGS"])
+
+myenv.Program("slimber", ["main.cpp"])
diff --git a/Slimber/CLI/main.cpp b/Slimber/CLI/main.cpp
index b82ffcd..0dd2c04 100644
--- a/Slimber/CLI/main.cpp
+++ b/Slimber/CLI/main.cpp
@@ -7,7 +7,7 @@
#include "Swiften/LinkLocal/LinkLocalServiceBrowser.h"
#include "Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h"
#include "Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h"
-#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.h"
+//#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.h"
#include "Swiften/EventLoop/SimpleEventLoop.h"
#include "Swiften/Application/Platform/PlatformApplication.h"
@@ -15,10 +15,12 @@ using namespace Swift;
int main() {
SimpleEventLoop eventLoop;
+ /*
boost::shared_ptr<BonjourQuerier> querier(new BonjourQuerier());
querier->start();
LinkLocalServiceBrowser browser(querier);
browser.start();
+ */
/*
FileVCardCollection vCardCollection(PlatformApplication("Slimber").getSettingsDir());
diff --git a/Slimber/Makefile.inc b/Slimber/Makefile.inc
deleted file mode 100644
index 2821d18..0000000
--- a/Slimber/Makefile.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-SLIMBER_TARGET = Slimber/Slimber.a
-SLIMBER_SOURCES = \
- Slimber/LinkLocalPresenceManager.cpp \
- Slimber/FileVCardCollection.cpp \
- Slimber/VCardCollection.cpp \
- Slimber/Server.cpp \
- Slimber/MainController.cpp \
- Slimber/MenuletController.cpp \
- Slimber/Menulet.cpp
-SLIMBER_OBJECTS = \
- $(SLIMBER_SOURCES:.cpp=.o)
-
-DEPS += $(SLIMBER_SOURCES:.cpp=.dep)
-UNITTEST_LIBS += $(SLIMBER_TARGET)
-
-include Slimber/UnitTest/Makefile.inc
-include Slimber/CLI/Makefile.inc
-ifeq ($(MACOSX),1)
-include Slimber/Cocoa/Makefile.inc
-endif
-
-.PHONY: slimber
-slimber: $(SLIMBER_TARGETS)
-
-$(SLIMBER_TARGET): $(SLIMBER_OBJECTS)
- $(QUIET_AR)$(AR) $(ARFLAGS) $@ $(SLIMBER_OBJECTS)
diff --git a/Slimber/SConscript b/Slimber/SConscript
new file mode 100644
index 0000000..504aa1b
--- /dev/null
+++ b/Slimber/SConscript
@@ -0,0 +1,28 @@
+Import("env")
+
+env["SLIMBER_FLAGS"] = {
+ "LIBPATH": [Dir(".")],
+ "LIBS": ["Slimber"]
+ }
+
+myenv = env.Clone()
+myenv.MergeFlags(env["BOOST_FLAGS"])
+myenv.MergeFlags(env["SWIFTEN_FLAGS"])
+myenv.StaticLibrary("Slimber", [
+ "LinkLocalPresenceManager.cpp",
+ "FileVCardCollection.cpp",
+ "VCardCollection.cpp",
+ "Server.cpp",
+ "MainController.cpp",
+ "MenuletController.cpp",
+ "Menulet.cpp"
+ ])
+
+env.Append(UNITTEST_SOURCES = [
+ File("UnitTest/LinkLocalPresenceManagerTest.cpp"),
+ File("UnitTest/MenuletControllerTest.cpp")
+ ])
+
+SConscript("CLI/SConscript")
+if env["PLATFORM"] == "darwin" :
+ SConscript("Cocoa/SConscript")
diff --git a/Slimber/UnitTest/Makefile.inc b/Slimber/UnitTest/Makefile.inc
deleted file mode 100644
index 5bc0c8a..0000000
--- a/Slimber/UnitTest/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-UNITTEST_SOURCES += \
- Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp \
- Slimber/UnitTest/MenuletControllerTest.cpp