aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/config.hxx9
-rw-r--r--odb/makefile23
2 files changed, 26 insertions, 6 deletions
diff --git a/odb/details/config.hxx b/odb/details/config.hxx
index c5b97df..8237d88 100644
--- a/odb/details/config.hxx
+++ b/odb/details/config.hxx
@@ -10,12 +10,11 @@
#ifdef _MSC_VER
# include <odb/details/config-vc.h>
+#elif defined(ODB_COMPILER)
+# define ODB_THREADS_NONE
+# define LIBODB_STATIC_LIB
#else
-# ifdef HAVE_CONFIG_H
-# include <odb/details/config.h>
-# else
-# define ODB_THREADS_POSIX
-# endif
+# include <odb/details/config.h>
#endif
// no post
diff --git a/odb/makefile b/odb/makefile
index 0fb038d..6f459a6 100644
--- a/odb/makefile
+++ b/odb/makefile
@@ -51,11 +51,21 @@ clean := $(out_base)/.clean
#
$(odb.l): $(cxx_obj) -lpthread
-$(cxx_obj) $(cxx_od): $(odb.l.cpp-options)
+$(cxx_obj) $(cxx_od): $(odb.l.cpp-options) $(out_base)/details/config.h
$(odb.l.cpp-options): value := -I$(out_root) -I$(src_root)
$(call include-dep,$(cxx_od))
+$(out_base)/details/config.h:
+ @echo '// file : odb/details/config.h' >$@
+ @echo '// author : automatically generated' >>$@
+ @echo '' >>$@
+ @echo '#ifndef ODB_DETAILS_CONFIG_H' >>$@
+ @echo '#define ODB_DETAILS_CONFIG_H' >>$@
+ @echo '' >>$@
+ @echo '#define ODB_THREADS_POSIX 1' >>$@
+ @echo '' >>$@
+ @echo '#endif // ODB_DETAILS_CONFIG_H' >>$@
# Convenience alias for default target.
#
@@ -97,7 +107,18 @@ $(clean): $(odb.l).o.clean \
$(odb.l.cpp-options).clean \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od))
+ $(call message,rm $$1,rm -f $$1,$(out_base)/details/config.h)
+# Generated .gitignore.
+#
+ifeq ($(out_base),$(src_base))
+$(odb.l): | $(out_base)/.gitignore
+
+$(out_base)/.gitignore: files := details/config.h
+$(clean): $(out_base)/.gitignore.clean
+
+$(call include,$(bld_root)/git/gitignore.make)
+endif
# How to.
#