aboutsummaryrefslogtreecommitdiff
path: root/hello/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-21 16:55:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-21 16:55:21 +0200
commit9106867c0c70bae196c1b38e9594f0340dcc9698 (patch)
tree3f03d6b1b792c06e8a5674cc715190ca3e91baa9 /hello/makefile
parentf654efe02445c92661a20feffa9b2a9f40c996f5 (diff)
Factor out database macro setup
Diffstat (limited to 'hello/makefile')
-rw-r--r--hello/makefile6
1 files changed, 1 insertions, 5 deletions
diff --git a/hello/makefile b/hello/makefile
index a88232e..e1a2471 100644
--- a/hello/makefile
+++ b/hello/makefile
@@ -38,13 +38,9 @@ endif
# Build.
#
$(driver): $(cxx_obj) $(odb_db.l) $(odb.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base)
+$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -D$(db_macro)
$(cxx_obj) $(cxx_od): $(odb.l.cpp-options) $(odb_db.l.cpp-options)
-ifeq ($(db_id),mysql)
-$(cxx_obj) $(cxx_od): cpp_options += -DDATABASE_MYSQL
-endif
-
genf := $(addprefix $(odb_hdr:.hxx=-odb),.hxx .ixx .cxx) $(odb_hdr:.hxx=.sql)
gen := $(addprefix $(out_base)/,$(genf))