aboutsummaryrefslogtreecommitdiff
path: root/xsd/makefile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-17 07:15:29 +0200
commitf0510d2f90467de8e8f260b47d79a9baaf9bef17 (patch)
tree0b9929946f06a9cbe9b9e8f2a7600dae4e048f79 /xsd/makefile
Start tracking XSD with git
Diffstat (limited to 'xsd/makefile')
-rw-r--r--xsd/makefile132
1 files changed, 132 insertions, 0 deletions
diff --git a/xsd/makefile b/xsd/makefile
new file mode 100644
index 0000000..e09a737
--- /dev/null
+++ b/xsd/makefile
@@ -0,0 +1,132 @@
+# file : xsd/makefile
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make
+
+cxx_tun := xsd.cxx
+
+cxx_tun += cxx/elements.cxx
+
+cxx_tun += cxx/parser/elements.cxx \
+ cxx/parser/validator.cxx \
+ cxx/parser/name-processor.cxx \
+ cxx/parser/type-processor.cxx \
+ cxx/parser/state-processor.cxx \
+ cxx/parser/generator.cxx \
+ cxx/parser/parser-header.cxx \
+ cxx/parser/parser-inline.cxx \
+ cxx/parser/parser-source.cxx \
+ cxx/parser/parser-forward.cxx \
+ cxx/parser/impl-header.cxx \
+ cxx/parser/impl-source.cxx \
+ cxx/parser/driver-source.cxx \
+ cxx/parser/element-validation-source.cxx \
+ cxx/parser/attribute-validation-source.cxx \
+ cxx/parser/characters-validation-source.cxx
+
+cxx_tun += cxx/tree/elements.cxx \
+ cxx/tree/validator.cxx \
+ cxx/tree/counter.cxx \
+ cxx/tree/name-processor.cxx \
+ cxx/tree/generator.cxx \
+ cxx/tree/tree-forward.cxx \
+ cxx/tree/tree-header.cxx \
+ cxx/tree/tree-inline.cxx \
+ cxx/tree/tree-source.cxx \
+ cxx/tree/parser-header.cxx \
+ cxx/tree/parser-source.cxx \
+ cxx/tree/stream-header.cxx \
+ cxx/tree/stream-source.cxx \
+ cxx/tree/serialization-header.cxx \
+ cxx/tree/serialization-source.cxx \
+ cxx/tree/stream-insertion-header.cxx \
+ cxx/tree/stream-insertion-source.cxx \
+ cxx/tree/stream-extraction-source.cxx
+
+
+# Type map
+#
+cxx_tun += type-map/lexer.cxx \
+ type-map/parser.cxx
+
+# Processing
+#
+cxx_tun += processing/cardinality/processor.cxx \
+ processing/inheritance/processor.cxx
+
+
+cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o))
+cxx_od := $(cxx_obj:.o=.o.d)
+
+xsd := $(out_base)/xsd
+clean := $(out_base)/.clean
+install := $(out_base)/.install
+
+# Import.
+#
+$(call import,\
+ $(scf_root)/import/libcult/stub.make,\
+ l: cult.l,cpp-options: cult.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libbackend-elements/stub.make,\
+ l: be.l,cpp-options: be.l.cpp-options)
+
+# This is needed because libbe does not link properly to regex.
+#
+$(call import,\
+ $(scf_root)/import/libboost/regex/stub.make,\
+ l: re.l,cpp-options: re.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libboost/filesystem/stub.make,\
+ l: fs.l,cpp-options: fs.l.cpp-options)
+
+$(call import,\
+ $(scf_root)/import/libxsd-frontend/stub.make,\
+ l: xsd_fe.l,cpp-options: xsd_fe.l.cpp-options)
+
+# Build.
+#
+$(xsd): $(cxx_obj) $(xsd_fe.l) $(be.l) $(cult.l) $(fs.l) $(re.l) $(xerces_c.l)
+
+$(cxx_obj) $(cxx_od): cpp_options := -I$(src_base)
+$(cxx_obj) $(cxx_od): \
+ $(xsd_fe.l.cpp-options) \
+ $(be.l.cpp-options) \
+ $(cult.l.cpp-options) \
+ $(fs.l.cpp-options) \
+ $(re.l.cpp-options)
+
+$(call include-dep,$(cxx_od))
+
+# Alias for default target.
+#
+.PHONY: $(out_base)/
+$(out_base)/: $(xsd)
+
+# install
+#
+.PHONY: $(install)
+
+$(install): $(xsd)
+ $(call install-exec,$<,$(install_bin_dir)/xsd)
+
+# clean
+#
+.PHONY: $(clean)
+
+$(clean): \
+ $(xsd).o.clean \
+ $(addsuffix .cxx.clean,$(cxx_obj)) \
+ $(addsuffix .cxx.clean,$(cxx_od))
+
+
+# how to
+#
+$(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,$(bld_root)/install.make)