aboutsummaryrefslogtreecommitdiff
path: root/libcommon/common/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-06-21 10:39:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-06-21 10:39:59 +0200
commit6cd8b9f561b912f264ba4f723845935c40a3cb95 (patch)
tree5983e0af3d2ee621242ca6707a58c89b9914d8f0 /libcommon/common/makefile
parent236cd9bb1dd022e64d690c9b0080d1a15c5f61c7 (diff)
Add support for running tests in dynamic multi-database mode
Only possible in the development build system at this stage.
Diffstat (limited to 'libcommon/common/makefile')
-rw-r--r--libcommon/common/makefile44
1 files changed, 40 insertions, 4 deletions
diff --git a/libcommon/common/makefile b/libcommon/common/makefile
index 53df875..5d23fa9 100644
--- a/libcommon/common/makefile
+++ b/libcommon/common/makefile
@@ -12,10 +12,6 @@ cxx_od := $(cxx_obj:.o=.o.d)
common.l := $(out_base)/common.l
common.l.cpp-options := $(out_base)/common.l.cpp-options
-default := $(out_base)/
-dist := $(out_base)/.dist
-clean := $(out_base)/.clean
-
# Import.
#
$(call import,\
@@ -23,9 +19,47 @@ $(call import,\
l: odb.l,cpp-options: odb.l.cpp-options)
ifdef db_id
+ifneq ($(db_id),common)
$(call import,\
$(scf_root)/import/libodb-$(db_id)/stub.make,\
l: odb_db.l,cpp-options: odb_db.l.cpp-options)
+else
+# Import all database runtimes.
+#
+$(call import,\
+ $(scf_root)/import/libodb-mysql/stub.make,\
+ l: odb_mysql.l,cpp-options: odb_mysql.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libodb-sqlite/stub.make,\
+ l: odb_sqlite.l,cpp-options: odb_sqlite.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libodb-pgsql/stub.make,\
+ l: odb_pgsql.l,cpp-options: odb_pgsql.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libodb-oracle/stub.make,\
+ l: odb_oracle.l,cpp-options: odb_oracle.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libodb-mssql/stub.make,\
+ l: odb_mssql.l,cpp-options: odb_mssql.l.cpp-options)
+
+odb_db.l := \
+$(odb_mysql.l) \
+$(odb_sqlite.l) \
+$(odb_pgsql.l) \
+$(odb_oracle.l) \
+$(odb_mssql.l)
+
+odb_db.l.cpp-options := \
+$(odb_mysql.l.cpp-options) \
+$(odb_sqlite.l.cpp-options) \
+$(odb_pgsql.l.cpp-options) \
+$(odb_oracle.l.cpp-options) \
+$(odb_mssql.l.cpp-options)
+endif
endif
ifeq ($(odb_db.l.cpp-options),)
@@ -62,6 +96,8 @@ else ifeq ($(db_id),oracle)
@echo '#define DATABASE_ORACLE 1' >>$@
else ifeq ($(db_id),mssql)
@echo '#define DATABASE_MSSQL 1' >>$@
+else ifeq ($(db_id),common)
+ @echo '#define DATABASE_COMMON 1' >>$@
endif
ifeq ($(cxx_standard),c++11)
@echo '#define HAVE_CXX11 1' >>$@