summaryrefslogtreecommitdiff
path: root/cli/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-27 19:17:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-27 19:17:22 +0200
commitc2b7e8a5a7bc98bcf5e03b32eefaa664442c26fe (patch)
tree9d900b5da803aaf55870c8364d4f605aa786d103 /cli/makefile
parente7cd4db81539a04935f00ee01c81541ec1e9b464 (diff)
Add option file for the CLI compiler itself
Diffstat (limited to 'cli/makefile')
-rw-r--r--cli/makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/cli/makefile b/cli/makefile
index f281167..86df489 100644
--- a/cli/makefile
+++ b/cli/makefile
@@ -8,6 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
cxx_tun := cli.cxx lexer.cxx parser.cxx
cxx_tun += \
+options.cxx \
context.cxx \
header.cxx \
inline.cxx \
@@ -32,9 +33,11 @@ traversal/namespace.cxx \
traversal/option.cxx \
traversal/unit.cxx
+cli_tun := options.cli
+
#
#
-cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
+cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o))
cxx_od := $(cxx_obj:.o=.o.d)
cli := $(out_base)/cli
@@ -52,9 +55,14 @@ $(call import,\
#
$(cli): $(cxx_obj) $(cutl.l)
-$(cxx_obj) $(cxx_od): cpp_options := -I$(src_base)
+$(cxx_obj) $(cxx_od): cpp_options := -I$(src_base) -I$(out_base)
$(cxx_obj) $(cxx_od): $(cutl.l.cpp-options)
+genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx)
+gen := $(addprefix $(out_base)/,$(genf))
+
+$(gen): cli := $(out_root)/cli/cli
+
$(call include-dep,$(cxx_od))
# Alias for default target.
@@ -80,7 +88,7 @@ $(install): $(cli)
.PHONY: $(clean)
$(clean): \
- $(cli).o.clean \
+ $(cli).o.clean \
$(addsuffix .cxx.clean,$(cxx_obj)) \
$(addsuffix .cxx.clean,$(cxx_od))
@@ -102,4 +110,5 @@ endif
$(call include,$(bld_root)/cxx/o-e.make)
$(call include,$(bld_root)/cxx/cxx-o.make)
$(call include,$(bld_root)/cxx/cxx-d.make)
+$(call include,$(scf_root)/cli/cli-cxx.make)
$(call include,$(bld_root)/install.make)