summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-06-17 08:12:59 +0000
committerAaron Marks <nymacro@gmail.com>2005-06-17 08:12:59 +0000
commit836536c2478cac29f905464ab0f53b98af77c6b1 (patch)
treee4db5a812ae93822a269a43267ad809084680550 /src
parent87b80322385aaa86317229e7e32f970a66f59de7 (diff)
downloadmanaserv-836536c2478cac29f905464ab0f53b98af77c6b1.tar.gz
manaserv-836536c2478cac29f905464ab0f53b98af77c6b1.tar.bz2
manaserv-836536c2478cac29f905464ab0f53b98af77c6b1.tar.xz
manaserv-836536c2478cac29f905464ab0f53b98af77c6b1.zip
Updated Makefile.am.
dataproviderfactory.cpp now conditionally includes related dataprovider header. (A problem exists with instantiating Being in dalstorage.cpp though)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am5
-rw-r--r--src/dal/dataproviderfactory.cpp7
-rw-r--r--src/storage.cpp2
3 files changed, 11 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2b450252..7c4d59e8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,8 +36,6 @@ tmwserv_SOURCES = main.cpp \
dal/dataprovider.cpp \
dal/dataproviderfactory.h \
dal/dataproviderfactory.cpp \
- dal/mysqldataprovider.h \
- dal/mysqldataprovider.cpp \
dal/sqlitedataprovider.h \
dal/sqlitedataprovider.cpp \
dal/recordset.h \
@@ -46,6 +44,9 @@ tmwserv_SOURCES = main.cpp \
dalstorage.h \
dalstorage.cpp
+# dal/mysqldataprovider.h
+# dal/mysqldataprovider.cpp
+
if BUILD_SQLITE
tmwserv_SOURCES += sqlite/SQLiteWrapper.cpp \
diff --git a/src/dal/dataproviderfactory.cpp b/src/dal/dataproviderfactory.cpp
index 98eb6667..7cd44e29 100644
--- a/src/dal/dataproviderfactory.cpp
+++ b/src/dal/dataproviderfactory.cpp
@@ -23,8 +23,15 @@
#include "dataproviderfactory.h"
+#ifdef MYSQL_SUPPORT
#include "mysqldataprovider.h"
+#else
+#ifdef SQLITE_SUPPORT
#include "sqlitedataprovider.h"
+#else
+#error "Database not specified"
+#endif
+#endif
namespace tmwserv
diff --git a/src/storage.cpp b/src/storage.cpp
index 4fd9a7e0..bb2bd6aa 100644
--- a/src/storage.cpp
+++ b/src/storage.cpp
@@ -40,7 +40,7 @@ Storage *Storage::getInstance()
{
if (instance == NULL)
{
- instance = new DALStorage(); //SQLiteStorage();
+ instance = new tmwserv::DALStorage(); //SQLiteStorage();
}
return instance;