aboutsummaryrefslogtreecommitdiff
path: root/odb/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-03-26 12:16:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-03-26 12:16:49 +0200
commit161efedd3ddca75c1cd3ad7f8592653c5070614e (patch)
treee31316ac4f52ed6e217f784bbb1ef2b08ccfc489 /odb/makefile
parent929918703db8943894a24efbd6fdcb67899f7953 (diff)
Add option file and the build infrastructure
Diffstat (limited to 'odb/makefile')
-rw-r--r--odb/makefile21
1 files changed, 18 insertions, 3 deletions
diff --git a/odb/makefile b/odb/makefile
index f1dd9be..7ca87d2 100644
--- a/odb/makefile
+++ b/odb/makefile
@@ -22,14 +22,18 @@ semantics/union.cxx \
semantics/union-template.cxx \
semantics/unit.cxx
-# Driver units
+# Driver units.
#
cxx_dtun := odb.cxx
+# Options file.
+#
+cli_tun := options.cli
+
#
#
-cxx_pobj := $(addprefix $(out_base)/,$(cxx_ptun:.cxx=.o))
-cxx_dobj := $(addprefix $(out_base)/,$(cxx_dtun:.cxx=.o))
+cxx_pobj := $(addprefix $(out_base)/,$(cxx_ptun:.cxx=.o) $(cli_tun:.cli=.o))
+cxx_dobj := $(addprefix $(out_base)/,$(cxx_dtun:.cxx=.o) $(cli_tun:.cli=.o))
cxx_pod := $(cxx_pobj:.o=.o.d)
cxx_dod := $(cxx_dobj:.o=.o.d)
@@ -41,6 +45,10 @@ install := $(out_base)/.install
# Import.
#
$(call import,\
+ $(scf_root)/import/cli/stub.make,\
+ cli: cli,cli-rules: cli_rules)
+
+$(call import,\
$(scf_root)/import/libcutl/stub.make,\
l: cutl.l,cpp-options: cutl.l.cpp-options)
@@ -52,6 +60,12 @@ $(odb_so): $(cxx_pobj) $(cutl.l)
$(cxx_dobj) $(cxx_dod): cpp_options := -I$(src_base)
$(cxx_pobj) $(cxx_dobj) $(cxx_pod) $(cxx_dod): $(cutl.l.cpp-options)
+genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
+
+$(gen): cli := $(cli)
+$(gen): cli_options := --generate-file-scanner --guard-prefix ODB
+
$(call include-dep,$(cxx_pod))
$(call include-dep,$(cxx_dod))
@@ -89,6 +103,7 @@ endif
# Rules.
#
$(call include,$(bld_root)/install.make)
+$(call include,$(cli_rules))
$(call include,$(bld_root)/cxx/cxx-d.make)
$(call include,$(bld_root)/cxx/cxx-o.make)
$(call include,$(bld_root)/cxx/o-e.make)