aboutsummaryrefslogtreecommitdiff
path: root/dist/examples
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-03-02 12:14:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-03-02 12:14:54 +0200
commit6c63b913179127e09ed7d9da8920493ccceec6ce (patch)
tree95684b51b4ab60e6468a592a53e33c2cf00027ab /dist/examples
parent3fd3cfc36784be43f545f2f0973e3dc58f475996 (diff)
Add make support for creating binary distributions
Two new make targets, dist and dist-win, were added that allow one to create a binary distribution from the current build. The dist target creates a UNIX distribution while dist-win -- Windows. The simplified build systems for the runtime library and examples that were kept separately are now part of the project (the dist/ subdirectory).
Diffstat (limited to 'dist/examples')
-rw-r--r--dist/examples/cxx/hybrid/compositors/makefile53
-rw-r--r--dist/examples/cxx/hybrid/compositors/nmakefile49
-rw-r--r--dist/examples/cxx/hybrid/filter/makefile57
-rw-r--r--dist/examples/cxx/hybrid/filter/nmakefile54
-rw-r--r--dist/examples/cxx/hybrid/hello/makefile49
-rw-r--r--dist/examples/cxx/hybrid/hello/nmakefile47
-rw-r--r--dist/examples/cxx/hybrid/library/makefile51
-rw-r--r--dist/examples/cxx/hybrid/library/nmakefile48
-rw-r--r--dist/examples/cxx/hybrid/makefile36
-rw-r--r--dist/examples/cxx/hybrid/minimal/makefile57
-rw-r--r--dist/examples/cxx/hybrid/minimal/nmakefile54
-rw-r--r--dist/examples/cxx/hybrid/multiroot/makefile51
-rw-r--r--dist/examples/cxx/hybrid/multiroot/nmakefile49
-rw-r--r--dist/examples/cxx/hybrid/nmakefile31
-rw-r--r--dist/examples/cxx/hybrid/streaming/makefile61
-rw-r--r--dist/examples/cxx/hybrid/streaming/nmakefile58
-rw-r--r--dist/examples/cxx/hybrid/wildcard/makefile59
-rw-r--r--dist/examples/cxx/hybrid/wildcard/nmakefile56
-rw-r--r--dist/examples/cxx/makefile11
-rw-r--r--dist/examples/cxx/nmakefile9
-rw-r--r--dist/examples/cxx/parser/generated/makefile69
-rw-r--r--dist/examples/cxx/parser/generated/nmakefile68
-rw-r--r--dist/examples/cxx/parser/hello/makefile50
-rw-r--r--dist/examples/cxx/parser/hello/nmakefile47
-rw-r--r--dist/examples/cxx/parser/library/makefile55
-rw-r--r--dist/examples/cxx/parser/library/nmakefile53
-rw-r--r--dist/examples/cxx/parser/makefile53
-rw-r--r--dist/examples/cxx/parser/minimal/makefile60
-rw-r--r--dist/examples/cxx/parser/minimal/nmakefile56
-rw-r--r--dist/examples/cxx/parser/mixed/makefile43
-rw-r--r--dist/examples/cxx/parser/mixed/nmakefile40
-rw-r--r--dist/examples/cxx/parser/multiroot/makefile58
-rw-r--r--dist/examples/cxx/parser/multiroot/nmakefile54
-rw-r--r--dist/examples/cxx/parser/nmakefile48
-rw-r--r--dist/examples/cxx/parser/polymorphism/makefile51
-rw-r--r--dist/examples/cxx/parser/polymorphism/nmakefile49
-rw-r--r--dist/examples/cxx/parser/polyroot/makefile53
-rw-r--r--dist/examples/cxx/parser/polyroot/nmakefile51
-rw-r--r--dist/examples/cxx/parser/wildcard/makefile42
-rw-r--r--dist/examples/cxx/parser/wildcard/nmakefile39
-rw-r--r--dist/examples/cxx/serializer/hello/makefile50
-rw-r--r--dist/examples/cxx/serializer/hello/nmakefile47
-rw-r--r--dist/examples/cxx/serializer/library/makefile56
-rw-r--r--dist/examples/cxx/serializer/library/nmakefile53
-rw-r--r--dist/examples/cxx/serializer/makefile49
-rw-r--r--dist/examples/cxx/serializer/minimal/makefile60
-rw-r--r--dist/examples/cxx/serializer/minimal/nmakefile55
-rw-r--r--dist/examples/cxx/serializer/nmakefile44
-rw-r--r--dist/examples/cxx/serializer/polymorphism/makefile52
-rw-r--r--dist/examples/cxx/serializer/polymorphism/nmakefile49
-rw-r--r--dist/examples/cxx/serializer/polyroot/makefile52
-rw-r--r--dist/examples/cxx/serializer/polyroot/nmakefile49
-rw-r--r--dist/examples/cxx/serializer/wildcard/makefile45
-rw-r--r--dist/examples/cxx/serializer/wildcard/nmakefile42
-rw-r--r--dist/examples/makefile11
-rw-r--r--dist/examples/nmakefile9
56 files changed, 2702 insertions, 0 deletions
diff --git a/dist/examples/cxx/hybrid/compositors/makefile b/dist/examples/cxx/hybrid/compositors/makefile
new file mode 100644
index 0000000..fbc44f9
--- /dev/null
+++ b/dist/examples/cxx/hybrid/compositors/makefile
@@ -0,0 +1,53 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_STL),n)
+EXTRA_XSDFLAGS += --no-stl
+endif
+
+ifeq ($(XSDE_IOSTREAM),n)
+EXTRA_XSDFLAGS += --no-iostream
+endif
+
+ifeq ($(XSDE_EXCEPTIONS),n)
+EXTRA_XSDFLAGS += --no-exceptions
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o compositors.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx compositors.hxx
+compositors.o: compositors.cxx compositors.hxx
+
+.PRECIOUS: %.hxx %.cxx
+
+%.hxx %.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) $<
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f compositors.?xx compositors.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/compositors/nmakefile b/dist/examples/cxx/hybrid/compositors/nmakefile
new file mode 100644
index 0000000..9bc77b7
--- /dev/null
+++ b/dist/examples/cxx/hybrid/compositors/nmakefile
@@ -0,0 +1,49 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_STL)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl
+!endif
+
+!if "$(XSDE_IOSTREAM)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-iostream
+!endif
+
+!if "$(XSDE_EXCEPTIONS)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-exceptions
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj compositors.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx compositors.hxx
+compositors.obj: compositors.cxx
+
+compositors.cxx compositors.hxx: compositors.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) compositors.xsd
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+# Clean.
+#
+clean:
+ -del compositors.?xx compositors.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/filter/makefile b/dist/examples/cxx/hybrid/filter/makefile
new file mode 100644
index 0000000..f1ea235
--- /dev/null
+++ b/dist/examples/cxx/hybrid/filter/makefile
@@ -0,0 +1,57 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o people.o people-pskel.o people-pimpl.o people-sskel.o \
+people-simpl.o people-custom-pimpl.o people-custom-simpl.o \
+$(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx people.hxx people-pimpl.hxx people-simpl.hxx
+people.o: people.cxx people.hxx
+people-pskel.o: people-pskel.cxx
+people-pimpl.o: people-pimpl.cxx
+people-simpl.o: people-simpl.cxx
+people-simpl.o: people-simpl.cxx
+people-custom-pimpl.o: people-custom-pimpl.cxx people-custom-pimpl.hxx people.hxx
+people-custom-simpl.o: people-custom-simpl.cxx people-custom-simpl.hxx people.hxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx
+
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate \
+--custom-parser people=people_base_pimpl/people-custom-pimpl.hxx \
+--custom-serializer people=people_base_simpl/people-custom-simpl.hxx $<
+
+# Test.
+#
+.PHONY: test
+test: driver people.xml
+ ./driver people.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f people-pimpl.?xx people-pskel.?xx people-simpl.?xx \
+people-sskel.?xx people.?xx people-custom-pimpl.o people-custom-simpl.o \
+people-pimpl.o people-pskel.o people-simpl.o people-sskel.o \
+people.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/filter/nmakefile b/dist/examples/cxx/hybrid/filter/nmakefile
new file mode 100644
index 0000000..b93ac66
--- /dev/null
+++ b/dist/examples/cxx/hybrid/filter/nmakefile
@@ -0,0 +1,54 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj people.obj people-pskel.obj people-pimpl.obj \
+people-sskel.obj people-simpl.obj people-custom-pimpl.obj \
+people-custom-simpl.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx people.hxx people-pimpl.hxx people-simpl.hxx
+people.obj: people.cxx people.hxx
+people-pskel.obj: people-pskel.cxx
+people-pimpl.obj: people-pimpl.cxx
+people-simpl.obj: people-simpl.cxx
+people-simpl.obj: people-simpl.cxx
+people-custom-pimpl.obj: people-custom-pimpl.cxx people-custom-pimpl.hxx people.hxx
+people-custom-simpl.obj: people-custom-simpl.cxx people-custom-simpl.hxx people.hxx
+
+people.cxx people.hxx \
+people-pskel.cxx people-pskel.hxx people-pimpl.cxx people-pimpl.hxx \
+people-sskel.cxx people-sskel.hxx people-simpl.cxx people-simpl.hxx \
+: people.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate \
+--custom-parser people=people_base_pimpl/people-custom-pimpl.hxx \
+--custom-serializer people=people_base_simpl/people-custom-simpl.hxx people.xsd
+
+# Test.
+#
+test: driver.exe people.xml
+ .\driver.exe people.xml
+
+# Clean.
+#
+clean:
+ -del people-pimpl.?xx people-pskel.?xx people-simpl.?xx \
+people-sskel.?xx people.?xx people-custom-pimpl.obj people-custom-simpl.obj \
+people-pimpl.obj people-pskel.obj people-simpl.obj people-sskel.obj \
+people.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/hello/makefile b/dist/examples/cxx/hybrid/hello/makefile
new file mode 100644
index 0000000..f184264
--- /dev/null
+++ b/dist/examples/cxx/hybrid/hello/makefile
@@ -0,0 +1,49 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_STL),n)
+EXTRA_XSDFLAGS += --no-stl
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o hello.o hello-pskel.o hello-pimpl.o \
+$(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx hello.hxx hello-pimpl.hxx
+hello.o: hello.cxx
+hello-pskel.o: hello-pskel.cxx
+hello-pimpl.o: hello-pimpl.cxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-aggregate $<
+
+# Test.
+#
+.PHONY: test
+test: driver hello.xml
+ ./driver hello.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f hello-pimpl.?xx hello-pskel.?xx hello.?xx hello-pimpl.o \
+hello-pskel.o hello.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/hello/nmakefile b/dist/examples/cxx/hybrid/hello/nmakefile
new file mode 100644
index 0000000..4044cb1
--- /dev/null
+++ b/dist/examples/cxx/hybrid/hello/nmakefile
@@ -0,0 +1,47 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_STL)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj hello.obj hello-pskel.obj hello-pimpl.obj \
+$(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx hello.hxx hello-pimpl.hxx
+hello.obj: hello.cxx
+hello-pskel.obj: hello-pskel.cxx
+hello-pimpl.obj: hello-pimpl.cxx
+
+hello.cxx hello.hxx hello-pskel.cxx hello-pskel.hxx \
+hello-pimpl.cxx hello-pimpl.hxx: hello.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-aggregate hello.xsd
+
+# Test.
+#
+test: driver.exe hello.xml
+ .\driver.exe hello.xml
+
+# Clean.
+#
+clean:
+ -del hello-pimpl.?xx hello-pskel.?xx hello.?xx hello-pimpl.obj \
+hello-pskel.obj hello.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/library/makefile b/dist/examples/cxx/hybrid/library/makefile
new file mode 100644
index 0000000..8610879
--- /dev/null
+++ b/dist/examples/cxx/hybrid/library/makefile
@@ -0,0 +1,51 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o library.o library-pskel.o library-pimpl.o \
+library-sskel.o library-simpl.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx library.hxx library-pimpl.hxx library-simpl.hxx
+library.o: library.cxx library.hxx
+library-pskel.o: library-pskel.cxx
+library-pimpl.o: library-pimpl.cxx
+library-simpl.o: library-simpl.cxx
+library-simpl.o: library-simpl.cxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx
+
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate $<
+
+# Test.
+#
+.PHONY: test
+test: driver library.xml
+ ./driver library.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f library-pimpl.?xx library-pskel.?xx library-simpl.?xx \
+library-sskel.?xx library.?xx library-pimpl.o library-pskel.o \
+library-simpl.o library-sskel.o library.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/library/nmakefile b/dist/examples/cxx/hybrid/library/nmakefile
new file mode 100644
index 0000000..5585416
--- /dev/null
+++ b/dist/examples/cxx/hybrid/library/nmakefile
@@ -0,0 +1,48 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj library.obj library-pskel.obj library-pimpl.obj \
+library-sskel.obj library-simpl.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx library.hxx library-pimpl.hxx library-simpl.hxx
+library.obj: library.cxx
+library-pskel.obj: library-pskel.cxx
+library-pimpl.obj: library-pimpl.cxx
+library-sskel.obj: library-sskel.cxx
+library-simpl.obj: library-simpl.cxx
+
+library.cxx library.hxx \
+library-pskel.cxx library-pskel.hxx library-pimpl.cxx library-pimpl.hxx \
+library-sskel.cxx library-sskel.hxx library-simpl.cxx library-simpl.hxx \
+: library.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate library.xsd
+
+# Test.
+#
+test: driver.exe library.xml
+ .\driver.exe library.xml
+
+# Clean.
+#
+clean:
+ -del library-pimpl.?xx library-pskel.?xx library-simpl.?xx \
+library-sskel.?xx library.?xx library-pimpl.obj library-pskel.obj \
+library-simpl.obj library-sskel.obj library.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/makefile b/dist/examples/cxx/hybrid/makefile
new file mode 100644
index 0000000..fdcec1d
--- /dev/null
+++ b/dist/examples/cxx/hybrid/makefile
@@ -0,0 +1,36 @@
+root := ../../..
+
+include $(root)/build/config.make
+
+dirs := compositors
+
+ifeq ($(XSDE_IOSTREAM),y)
+ifeq ($(XSDE_EXCEPTIONS),y)
+
+dirs += hello multiroot streaming
+
+ifeq ($(XSDE_STL),y)
+dirs += library wildcard filter
+endif
+
+endif
+endif
+
+ifeq ($(XSDE_STL),n)
+ifeq ($(XSDE_EXCEPTIONS),n)
+dirs += minimal
+endif
+endif
+
+
+.PHONY: all $(dirs)
+
+all: $(dirs)
+
+$(dirs):
+ @$(MAKE) -C $@ $(MAKECMDGOALS)
+
+makefile: ;
+%.make:: ;
+
+%:: $(dirs) ;
diff --git a/dist/examples/cxx/hybrid/minimal/makefile b/dist/examples/cxx/hybrid/minimal/makefile
new file mode 100644
index 0000000..87e5325
--- /dev/null
+++ b/dist/examples/cxx/hybrid/minimal/makefile
@@ -0,0 +1,57 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+EXTRA_XSDFLAGS := --no-stl --no-exceptions
+
+ifeq ($(XSDE_IOSTREAM),n)
+EXTRA_XSDFLAGS += --no-iostream
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o people.o people-pskel.o people-pimpl.o \
+people-sskel.o people-simpl.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx people.hxx people-pimpl.hxx people-simpl.hxx
+people.o: people.cxx people.hxx
+people-pskel.o: people-pskel.cxx
+people-pimpl.o: people-pimpl.cxx
+people-simpl.o: people-simpl.cxx
+people-simpl.o: people-simpl.cxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx
+
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate $<
+
+# Test.
+#
+.PHONY: test
+test: driver people.xml
+ ./driver people.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f people-pimpl.?xx people-pskel.?xx people-simpl.?xx \
+people-sskel.?xx people.?xx people-pimpl.o people-pskel.o \
+people-simpl.o people-sskel.o people.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/minimal/nmakefile b/dist/examples/cxx/hybrid/minimal/nmakefile
new file mode 100644
index 0000000..6a1c736
--- /dev/null
+++ b/dist/examples/cxx/hybrid/minimal/nmakefile
@@ -0,0 +1,54 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+EXTRA_XSDFLAGS = --no-stl --no-exceptions
+
+!if "$(XSDE_IOSTREAM)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-iostream
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj people.obj people-pskel.obj people-pimpl.obj \
+people-sskel.obj people-simpl.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx people.hxx people-pimpl.hxx people-simpl.hxx
+people.obj: people.cxx
+people-pskel.obj: people-pskel.cxx
+people-pimpl.obj: people-pimpl.cxx
+people-sskel.obj: people-sskel.cxx
+people-simpl.obj: people-simpl.cxx
+
+people.cxx people.hxx \
+people-pskel.cxx people-pskel.hxx people-pimpl.cxx people-pimpl.hxx \
+people-sskel.cxx people-sskel.hxx people-simpl.cxx people-simpl.hxx \
+: people.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate people.xsd
+
+# Test.
+#
+test: driver.exe people.xml
+ .\driver.exe people.xml
+
+# Clean.
+#
+clean:
+ -del people-pimpl.?xx people-pskel.?xx people-simpl.?xx \
+people-sskel.?xx people.?xx people-pimpl.obj people-pskel.obj \
+people-simpl.obj people-sskel.obj people.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/multiroot/makefile b/dist/examples/cxx/hybrid/multiroot/makefile
new file mode 100644
index 0000000..28423c1
--- /dev/null
+++ b/dist/examples/cxx/hybrid/multiroot/makefile
@@ -0,0 +1,51 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_STL),n)
+EXTRA_XSDFLAGS += --no-stl
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o protocol.o protocol-pskel.o protocol-pimpl.o \
+$(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx protocol.hxx protocol-pimpl.hxx
+protocol.o: protocol.cxx
+protocol-pskel.o: protocol-pskel.cxx
+protocol-pimpl.o: protocol-pimpl.cxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-aggregate --root-element-all $<
+
+# Test.
+#
+.PHONY: test
+test: driver balance.xml withdraw.xml deposit.xml
+ ./driver balance.xml
+ ./driver withdraw.xml
+ ./driver deposit.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f protocol-pimpl.?xx protocol-pskel.?xx protocol.?xx \
+protocol-pimpl.o protocol-pskel.o protocol.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/multiroot/nmakefile b/dist/examples/cxx/hybrid/multiroot/nmakefile
new file mode 100644
index 0000000..a647e50
--- /dev/null
+++ b/dist/examples/cxx/hybrid/multiroot/nmakefile
@@ -0,0 +1,49 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_STL)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj protocol.obj protocol-pskel.obj protocol-pimpl.obj \
+$(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx protocol.hxx protocol-pimpl.hxx
+protocol.obj: protocol.cxx
+protocol-pskel.obj: protocol-pskel.cxx
+protocol-pimpl.obj: protocol-pimpl.cxx
+
+protocol.cxx protocol.hxx protocol-pskel.cxx protocol-pskel.hxx \
+protocol-pimpl.cxx protocol-pimpl.hxx: protocol.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-aggregate --root-element-all protocol.xsd
+
+# Test.
+#
+test: driver.exe balance.xml withdraw.xml deposit.xml
+ .\driver balance.xml
+ .\driver withdraw.xml
+ .\driver deposit.xml
+
+# Clean.
+#
+clean:
+ -del protocol-pimpl.?xx protocol-pskel.?xx protocol.?xx \
+protocol-pimpl.obj protocol-pskel.obj protocol.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/nmakefile b/dist/examples/cxx/hybrid/nmakefile
new file mode 100644
index 0000000..5d0b337
--- /dev/null
+++ b/dist/examples/cxx/hybrid/nmakefile
@@ -0,0 +1,31 @@
+root = ..\..\..
+
+!include $(root)\build\config.nmake
+
+dirs = compositors
+
+!if "$(XSDE_IOSTREAM)" == "y"
+!if "$(XSDE_EXCEPTIONS)" == "y"
+
+dirs = $(dirs) hello multiroot streaming
+
+!if "$(XSDE_STL)" == "y"
+dirs = $(dirs) library wildcard filter
+!endif
+
+!endif
+!endif
+
+!if "$(XSDE_STL)" == "n"
+!if "$(XSDE_EXCEPTIONS)" == "n"
+dirs = $(dirs) minimal
+!endif
+!endif
+
+all:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile"
+
+test clean:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile $@"
diff --git a/dist/examples/cxx/hybrid/streaming/makefile b/dist/examples/cxx/hybrid/streaming/makefile
new file mode 100644
index 0000000..b4bff7a
--- /dev/null
+++ b/dist/examples/cxx/hybrid/streaming/makefile
@@ -0,0 +1,61 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_STL),n)
+EXTRA_XSDFLAGS += --no-stl
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o position.o position-pskel.o position-pimpl.o \
+position-sskel.o position-simpl.o object-pimpl.o object-simpl.o \
+$(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx position.hxx position-pimpl.hxx position-simpl.hxx
+position.o: position.cxx position.hxx
+position-pskel.o: position-pskel.cxx
+position-pimpl.o: position-pimpl.cxx
+position-simpl.o: position-simpl.cxx
+position-simpl.o: position-simpl.cxx
+object-pimpl.o: object-pimpl.cxx object-pimpl.hxx position.hxx
+object-simpl.o: object-simpl.cxx object-simpl.hxx position.hxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx
+
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate \
+--custom-parser object=/object-pimpl.hxx \
+--custom-serializer object=/object-simpl.hxx $<
+
+# Test.
+#
+.PHONY: test
+test: driver position.xml
+ ./driver position.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f position-pimpl.?xx position-pskel.?xx position-simpl.?xx \
+position-sskel.?xx position.?xx object-pimpl.o object-simpl.o \
+position-pimpl.o position-pskel.o position-simpl.o position-sskel.o \
+position.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/streaming/nmakefile b/dist/examples/cxx/hybrid/streaming/nmakefile
new file mode 100644
index 0000000..c3ae34a
--- /dev/null
+++ b/dist/examples/cxx/hybrid/streaming/nmakefile
@@ -0,0 +1,58 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_STL)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj position.obj position-pskel.obj position-pimpl.obj \
+position-sskel.obj position-simpl.obj object-pimpl.obj object-simpl.obj \
+$(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx position.hxx position-pimpl.hxx position-simpl.hxx
+position.obj: position.cxx position.hxx
+position-pskel.obj: position-pskel.cxx
+position-pimpl.obj: position-pimpl.cxx
+position-simpl.obj: position-simpl.cxx
+position-simpl.obj: position-simpl.cxx
+object-pimpl.obj: object-pimpl.cxx object-pimpl.hxx position.hxx
+object-simpl.obj: object-simpl.cxx object-simpl.hxx position.hxx
+
+position.cxx position.hxx \
+position-pskel.cxx position-pskel.hxx position-pimpl.cxx position-pimpl.hxx \
+position-sskel.cxx position-sskel.hxx position-simpl.cxx position-simpl.hxx \
+: position.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate \
+--custom-parser object=/object-pimpl.hxx \
+--custom-serializer object=/object-simpl.hxx position.xsd
+
+# Test.
+#
+test: driver.exe position.xml
+ .\driver.exe position.xml
+
+# Clean.
+#
+clean:
+ -del position-pimpl.?xx position-pskel.?xx position-simpl.?xx \
+position-sskel.?xx position.?xx object-pimpl.obj object-simpl.obj \
+position-pimpl.obj position-pskel.obj position-simpl.obj position-sskel.obj \
+position.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/hybrid/wildcard/makefile b/dist/examples/cxx/hybrid/wildcard/makefile
new file mode 100644
index 0000000..9d4dfa2
--- /dev/null
+++ b/dist/examples/cxx/hybrid/wildcard/makefile
@@ -0,0 +1,59 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+driver: driver.o email.o body.o email-pskel.o email-pimpl.o \
+email-sskel.o email-simpl.o envelope-pimpl.o envelope-simpl.o \
+$(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx email.hxx body.hxx email-pimpl.hxx email-simpl.hxx
+email.o: email.cxx email.hxx
+body.o: body.cxx body.hxx email.hxx
+email-pskel.o: email-pskel.cxx
+email-pimpl.o: email-pimpl.cxx
+email-simpl.o: email-simpl.cxx
+email-simpl.o: email-simpl.cxx
+envelope-pimpl.o: envelope-pimpl.cxx envelope-pimpl.hxx email.hxx body.hxx
+envelope-simpl.o: envelope-simpl.cxx envelope-simpl.hxx email.hxx body.hxx
+
+.PRECIOUS: %.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx
+
+%.hxx %.cxx %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx \
+%-sskel.hxx %-sskel.cxx %-simpl.hxx %-simpl.cxx: %.xsd
+ $(root)/bin/xsde cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate \
+--root-element-all --custom-data envelope \
+--custom-parser envelope=envelope_base_pimpl/envelope-pimpl.hxx \
+--custom-serializer envelope=envelope_base_simpl/envelope-simpl.hxx $<
+
+# Test.
+#
+.PHONY: test
+test: driver email.xml
+ ./driver email.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f email-pimpl.?xx email-pskel.?xx email-simpl.?xx \
+email-sskel.?xx email.?xx envelope-pimpl.o envelope-simpl.o \
+email-pimpl.o email-pskel.o email-simpl.o email-sskel.o \
+body.o email.o driver.o driver
diff --git a/dist/examples/cxx/hybrid/wildcard/nmakefile b/dist/examples/cxx/hybrid/wildcard/nmakefile
new file mode 100644
index 0000000..acdb033
--- /dev/null
+++ b/dist/examples/cxx/hybrid/wildcard/nmakefile
@@ -0,0 +1,56 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+driver.exe: driver.obj email.obj body.obj email-pskel.obj email-pimpl.obj \
+email-sskel.obj email-simpl.obj envelope-pimpl.obj envelope-simpl.obj \
+$(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx email.hxx body.hxx email-pimpl.hxx email-simpl.hxx
+email.obj: email.cxx email.hxx
+body.obj: body.cxx body.hxx email.hxx
+email-pskel.obj: email-pskel.cxx
+email-pimpl.obj: email-pimpl.cxx
+email-simpl.obj: email-simpl.cxx
+email-simpl.obj: email-simpl.cxx
+envelope-pimpl.obj: envelope-pimpl.cxx envelope-pimpl.hxx email.hxx body.hxx
+envelope-simpl.obj: envelope-simpl.cxx envelope-simpl.hxx email.hxx body.hxx
+
+email.cxx email.hxx \
+email-pskel.cxx email-pskel.hxx email-pimpl.cxx email-pimpl.hxx \
+email-sskel.cxx email-sskel.hxx email-simpl.cxx email-simpl.hxx \
+: email.xsd
+ $(root)\bin\xsde.exe cxx-hybrid $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-parser --generate-serializer --generate-aggregate \
+--root-element-all --custom-data envelope \
+--custom-parser envelope=envelope_base_pimpl/envelope-pimpl.hxx \
+--custom-serializer envelope=envelope_base_simpl/envelope-simpl.hxx email.xsd
+
+# Test.
+#
+test: driver.exe email.xml
+ .\driver.exe email.xml
+
+# Clean.
+#
+clean:
+ -del email-pimpl.?xx email-pskel.?xx email-simpl.?xx \
+email-sskel.?xx email.?xx envelope-pimpl.obj envelope-simpl.obj \
+email-pimpl.obj email-pskel.obj email-simpl.obj email-sskel.obj \
+body.obj email.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/makefile b/dist/examples/cxx/makefile
new file mode 100644
index 0000000..4e08939
--- /dev/null
+++ b/dist/examples/cxx/makefile
@@ -0,0 +1,11 @@
+dirs := hybrid parser serializer
+
+.PHONY: all $(dirs)
+
+all: $(dirs)
+
+$(dirs):
+ @$(MAKE) -C $@ $(MAKECMDGOALS)
+
+makefile: ;
+% :: $(dirs) ;
diff --git a/dist/examples/cxx/nmakefile b/dist/examples/cxx/nmakefile
new file mode 100644
index 0000000..a137db9
--- /dev/null
+++ b/dist/examples/cxx/nmakefile
@@ -0,0 +1,9 @@
+dirs = hybrid parser serializer
+
+all:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile"
+
+test clean:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile $@"
diff --git a/dist/examples/cxx/parser/generated/makefile b/dist/examples/cxx/parser/generated/makefile
new file mode 100644
index 0000000..6e5e960
--- /dev/null
+++ b/dist/examples/cxx/parser/generated/makefile
@@ -0,0 +1,69 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+EXTRA_XSDFLAGS := --generate-print-impl --generate-test-driver
+
+# If you are basing your own code on this example and make changes
+# to the sample implementation and/or test driver, make sure you
+# remove this option or your changes will be lost forever.
+#
+EXTRA_XSDFLAGS += --force-overwrite
+
+ifeq ($(XSDE_STL),n)
+EXTRA_XSDFLAGS += --no-stl
+endif
+
+ifeq ($(XSDE_IOSTREAM),n)
+EXTRA_XSDFLAGS += --no-iostream
+endif
+
+ifeq ($(XSDE_EXCEPTIONS),n)
+EXTRA_XSDFLAGS += --no-exceptions
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+library-pdriver: library-pdriver.o library-pskel.o library-pimpl.o $(root)/libxsde/xsde/libxsde.a
+
+library-pdriver.o: library-pdriver.cxx library-pimpl.hxx library-pskel.hxx
+library-pimpl.o: library-pimpl.cxx library-pimpl.hxx library-pskel.hxx
+library-pskel.o: library-pskel.cxx library-pskel.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx %-pdriver.cxx
+
+%-pskel.hxx %-pskel.cxx %-pimpl.hxx %-pimpl.cxx %-pdriver.cxx: %.xsd
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) $<
+
+
+# Test.
+#
+.PHONY: test
+test: library-pdriver library.xml
+ ./library-pdriver library.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f library-pdriver.?xx library-pimpl.?xx library-pskel.?xx
+ rm -f library-pdriver.o library-pimpl.o library-pskel.o library-pdriver
diff --git a/dist/examples/cxx/parser/generated/nmakefile b/dist/examples/cxx/parser/generated/nmakefile
new file mode 100644
index 0000000..ee4597e
--- /dev/null
+++ b/dist/examples/cxx/parser/generated/nmakefile
@@ -0,0 +1,68 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+EXTRA_XSDFLAGS = --generate-print-impl --generate-test-driver
+
+# If you are basing your own code on this example and make changes
+# to the sample implementation and/or test driver, make sure you
+# remove this option or your changes will be lost forever.
+#
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --force-overwrite
+
+!if "$(XSDE_STL)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-stl
+!endif
+
+!if "$(XSDE_IOSTREAM)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-iostream
+!endif
+
+!if "$(XSDE_EXCEPTIONS)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-exceptions
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+library-pdriver.exe: library-pdriver.obj library-pskel.obj library-pimpl.obj $(root)\libxsde\xsde\xsde.lib
+
+library-pdriver.obj: library-pdriver.cxx library-pimpl.hxx library-pskel.hxx
+library-pimpl.obj: library-pimpl.cxx library-pimpl.hxx library-pskel.hxx
+library-pskel.obj: library-pskel.cxx library-pskel.hxx
+
+
+library-pskel.hxx library-pskel.cxx \
+library-pimpl.hxx library-pimpl.cxx \
+library-pdriver.cxx: library.xsd
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) library.xsd
+
+
+# Test.
+#
+test: library-pdriver.exe library.xml
+ .\library-pdriver.exe library.xml
+
+
+# Clean.
+#
+clean:
+ -del library-pdriver.?xx library-pimpl.?xx library-pskel.?xx
+ -del library-pdriver.obj library-pimpl.obj library-pskel.obj library-pdriver.exe
diff --git a/dist/examples/cxx/parser/hello/makefile b/dist/examples/cxx/parser/hello/makefile
new file mode 100644
index 0000000..d31ecff
--- /dev/null
+++ b/dist/examples/cxx/parser/hello/makefile
@@ -0,0 +1,50 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),none)
+EXTRA_XSDFLAGS += --reuse-style-none
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+driver: driver.o hello-pskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx hello-pskel.hxx
+hello-pskel.o: hello-pskel.cxx hello-pskel.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+%-pskel.hxx %-pskel.cxx: %.xsd
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) $<
+
+# Test.
+#
+.PHONY: test
+test: driver hello.xml
+ ./driver hello.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f hello-pskel.?xx hello-pskel.o driver.o driver
+
diff --git a/dist/examples/cxx/parser/hello/nmakefile b/dist/examples/cxx/parser/hello/nmakefile
new file mode 100644
index 0000000..e8b6ccf
--- /dev/null
+++ b/dist/examples/cxx/parser/hello/nmakefile
@@ -0,0 +1,47 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "none"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-none
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+driver.exe: driver.obj hello-pskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx hello-pskel.hxx
+hello-pskel.obj: hello-pskel.cxx hello-pskel.hxx
+
+hello-pskel.cxx hello-pskel.hxx: hello.xsd
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) hello.xsd
+
+# Test.
+#
+test: driver.exe hello.xml
+ .\driver.exe hello.xml
+
+
+# Clean.
+#
+clean:
+ -del hello-pskel.?xx hello-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/parser/library/makefile b/dist/examples/cxx/parser/library/makefile
new file mode 100644
index 0000000..a0ed792
--- /dev/null
+++ b/dist/examples/cxx/parser/library/makefile
@@ -0,0 +1,55 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := library-pimpl-mixin
+else
+impl := library-pimpl-tiein
+endif
+
+driver: driver.o library-pskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx library-pskel.hxx library.hxx
+$(impl).o: $(impl).cxx $(impl).hxx library-pskel.hxx library.hxx
+library-pskel.o: library-pskel.cxx library-pskel.hxx library.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+
+%-pskel.hxx %-pskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver library.xml
+ ./driver library.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f library-pskel.?xx $(impl).o library-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/library/nmakefile b/dist/examples/cxx/parser/library/nmakefile
new file mode 100644
index 0000000..42d2a71
--- /dev/null
+++ b/dist/examples/cxx/parser/library/nmakefile
@@ -0,0 +1,53 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = library-pimpl-mixin
+!else
+impl = library-pimpl-tiein
+!endif
+
+driver.exe: driver.obj library-pskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx library-pskel.hxx library.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx library-pskel.hxx library.hxx
+library-pskel.obj: library-pskel.cxx library-pskel.hxx library.hxx
+
+
+library-pskel.hxx library-pskel.cxx: library.xsd library.map
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map library.map library.xsd
+
+
+# Test.
+#
+test: driver.exe library.xml
+ .\driver.exe library.xml
+
+
+# Clean.
+#
+clean:
+ -del library-pskel.?xx $(impl).obj library-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/parser/makefile b/dist/examples/cxx/parser/makefile
new file mode 100644
index 0000000..c286089
--- /dev/null
+++ b/dist/examples/cxx/parser/makefile
@@ -0,0 +1,53 @@
+root := ../../..
+
+include $(root)/build/config.make
+
+dirs :=
+
+ifneq ($(XSDE_REUSE_STYLE),none)
+dirs += generated
+endif
+
+ifeq ($(XSDE_STL),y)
+ifeq ($(XSDE_IOSTREAM),y)
+ifeq ($(XSDE_EXCEPTIONS),y)
+
+dirs += hello
+
+ifneq ($(XSDE_REUSE_STYLE),none)
+dirs += library multiroot
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+dirs += polymorphism polyroot
+endif
+
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),tiein)
+dirs += mixed wildcard
+endif
+
+endif
+endif
+endif
+
+ifeq ($(XSDE_STL),n)
+ifeq ($(XSDE_EXCEPTIONS),n)
+ifneq ($(XSDE_REUSE_STYLE),none)
+dirs += minimal
+endif
+endif
+endif
+
+
+.PHONY: all $(dirs)
+
+all: $(dirs)
+
+$(dirs):
+ @$(MAKE) -C $@ $(MAKECMDGOALS)
+
+makefile: ;
+%.make:: ;
+
+%:: $(dirs) ;
diff --git a/dist/examples/cxx/parser/minimal/makefile b/dist/examples/cxx/parser/minimal/makefile
new file mode 100644
index 0000000..bf1ac74
--- /dev/null
+++ b/dist/examples/cxx/parser/minimal/makefile
@@ -0,0 +1,60 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+EXTRA_XSDFLAGS := --no-stl --no-exceptions
+
+ifeq ($(XSDE_IOSTREAM),n)
+EXTRA_XSDFLAGS += --no-iostream
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := people-pimpl-mixin
+else
+impl := people-pimpl-tiein
+endif
+
+driver: driver.o people-pskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx people-pskel.hxx gender.hxx
+people-pskel.o: people-pskel.cxx people-pskel.hxx gender.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+
+%-pskel.hxx %-pskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+# Test.
+#
+.PHONY: test
+test: driver people.xml
+ ./driver people.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f people-pskel.?xx people-pskel.o driver.o driver
+
diff --git a/dist/examples/cxx/parser/minimal/nmakefile b/dist/examples/cxx/parser/minimal/nmakefile
new file mode 100644
index 0000000..4230425
--- /dev/null
+++ b/dist/examples/cxx/parser/minimal/nmakefile
@@ -0,0 +1,56 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+EXTRA_XSDFLAGS = --no-stl --no-exceptions
+
+!if "$(XSDE_IOSTREAM)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-iostream
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = people-pimpl-mixin
+!else
+impl = people-pimpl-tiein
+!endif
+
+driver.exe: driver.obj people-pskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx people-pskel.hxx gender.hxx
+people-pskel.obj: people-pskel.cxx people-pskel.hxx gender.hxx
+
+people-pskel.cxx people-pskel.hxx: people.xsd people.map
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map people.map people.xsd
+
+# Test.
+#
+test: driver.exe people.xml
+ .\driver.exe people.xml
+
+
+# Clean.
+#
+clean:
+ -del people-pskel.?xx people-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/parser/mixed/makefile b/dist/examples/cxx/parser/mixed/makefile
new file mode 100644
index 0000000..412edfe
--- /dev/null
+++ b/dist/examples/cxx/parser/mixed/makefile
@@ -0,0 +1,43 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+driver: driver.o text-pskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx text-pskel.hxx anchor.hxx
+text-pskel.o: text-pskel.cxx text-pskel.hxx anchor.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+
+%-pskel.hxx %-pskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+# Test.
+#
+.PHONY: test
+test: driver text.xml
+ ./driver text.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f text-pskel.?xx text-pskel.o driver.o driver
+
diff --git a/dist/examples/cxx/parser/mixed/nmakefile b/dist/examples/cxx/parser/mixed/nmakefile
new file mode 100644
index 0000000..5f9ebc9
--- /dev/null
+++ b/dist/examples/cxx/parser/mixed/nmakefile
@@ -0,0 +1,40 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+driver.exe: driver.obj text-pskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx text-pskel.hxx anchor.hxx
+text-pskel.obj: text-pskel.cxx text-pskel.hxx anchor.hxx
+
+text-pskel.hxx text-pskel.cxx: text.xsd text.map
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map text.map text.xsd
+
+# Test.
+#
+test: driver.exe text.xml
+ .\driver.exe text.xml
+
+
+# Clean.
+#
+clean:
+ -del text-pskel.?xx text-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/parser/multiroot/makefile b/dist/examples/cxx/parser/multiroot/makefile
new file mode 100644
index 0000000..d4d6363
--- /dev/null
+++ b/dist/examples/cxx/parser/multiroot/makefile
@@ -0,0 +1,58 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := protocol-pimpl-mixin
+else
+impl := protocol-pimpl-tiein
+endif
+
+
+driver: driver.o protocol-pskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx protocol-pskel.hxx protocol.hxx
+$(impl).o: $(impl).cxx $(impl).hxx protocol-pskel.hxx protocol.hxx
+protocol-pskel.o: protocol-pskel.cxx protocol-pskel.hxx protocol.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+
+%-pskel.hxx %-pskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver balance.xml withdraw.xml deposit.xml
+ ./driver balance.xml
+ ./driver withdraw.xml
+ ./driver deposit.xml
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f protocol-pskel.?xx $(impl).o protocol-pskel.o driver.o driver
+
diff --git a/dist/examples/cxx/parser/multiroot/nmakefile b/dist/examples/cxx/parser/multiroot/nmakefile
new file mode 100644
index 0000000..05e6a7d
--- /dev/null
+++ b/dist/examples/cxx/parser/multiroot/nmakefile
@@ -0,0 +1,54 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = protocol-pimpl-mixin
+!else
+impl = protocol-pimpl-tiein
+!endif
+
+
+driver.exe: driver.obj protocol-pskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx protocol-pskel.hxx protocol.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx protocol-pskel.hxx protocol.hxx
+protocol-pskel.obj: protocol-pskel.cxx protocol-pskel.hxx protocol.hxx
+
+
+protocol-pskel.hxx protocol-pskel.cxx: protocol.xsd protocol.map
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map protocol.map protocol.xsd
+
+
+# Test.
+#
+test: driver.exe balance.xml withdraw.xml deposit.xml
+ .\driver balance.xml
+ .\driver withdraw.xml
+ .\driver deposit.xml
+
+# Clean.
+#
+clean:
+ -del protocol-pskel.?xx $(impl).obj protocol-pskel.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/parser/nmakefile b/dist/examples/cxx/parser/nmakefile
new file mode 100644
index 0000000..9964a64
--- /dev/null
+++ b/dist/examples/cxx/parser/nmakefile
@@ -0,0 +1,48 @@
+root = ..\..\..
+
+!include $(root)\build\config.nmake
+
+dirs =
+
+!if "$(XSDE_REUSE_STYLE)" != "none"
+dirs = $(dirs) generated
+!endif
+
+!if "$(XSDE_STL)" == "y"
+!if "$(XSDE_IOSTREAM)" == "y"
+!if "$(XSDE_EXCEPTIONS)" == "y"
+
+dirs = $(dirs) hello
+
+!if "$(XSDE_REUSE_STYLE)" != "none"
+dirs = $(dirs) library multiroot
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+dirs = $(dirs) polymorphism polyroot
+!endif
+
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "tiein"
+dirs = $(dirs) mixed wildcard
+!endif
+
+!endif
+!endif
+!endif
+
+!if "$(XSDE_STL)" == "n"
+!if "$(XSDE_EXCEPTIONS)" == "n"
+!if "$(XSDE_REUSE_STYLE)" != "none"
+dirs = $(dirs) minimal
+!endif
+!endif
+!endif
+
+all:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile"
+
+test clean:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile $@"
diff --git a/dist/examples/cxx/parser/polymorphism/makefile b/dist/examples/cxx/parser/polymorphism/makefile
new file mode 100644
index 0000000..f0717a4
--- /dev/null
+++ b/dist/examples/cxx/parser/polymorphism/makefile
@@ -0,0 +1,51 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := supermen-pimpl-mixin
+else
+impl := supermen-pimpl-tiein
+endif
+
+driver: driver.o supermen-pskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx supermen-pskel.hxx
+$(impl).o: $(impl).cxx $(impl).hxx supermen-pskel.hxx
+supermen-pskel.o: supermen-pskel.cxx supermen-pskel.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+
+%-pskel.hxx %-pskel.cxx: %.xsd
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver supermen.xml
+ ./driver supermen.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f supermen-pskel.?xx $(impl).o supermen-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/polymorphism/nmakefile b/dist/examples/cxx/parser/polymorphism/nmakefile
new file mode 100644
index 0000000..7047eb1
--- /dev/null
+++ b/dist/examples/cxx/parser/polymorphism/nmakefile
@@ -0,0 +1,49 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = supermen-pimpl-mixin
+!else
+impl = supermen-pimpl-tiein
+!endif
+
+driver.exe: driver.obj supermen-pskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx supermen-pskel.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx supermen-pskel.hxx
+supermen-pskel.obj: supermen-pskel.cxx supermen-pskel.hxx
+
+
+supermen-pskel.hxx supermen-pskel.cxx: supermen.xsd
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic supermen.xsd
+
+
+# Test.
+#
+test: driver.exe supermen.xml
+ .\driver.exe supermen.xml
+
+
+# Clean.
+#
+clean:
+ -del supermen-pskel.?xx $(impl).obj supermen-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/parser/polyroot/makefile b/dist/examples/cxx/parser/polyroot/makefile
new file mode 100644
index 0000000..d89e527
--- /dev/null
+++ b/dist/examples/cxx/parser/polyroot/makefile
@@ -0,0 +1,53 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := supermen-pimpl-mixin
+else
+impl := supermen-pimpl-tiein
+endif
+
+driver: driver.o supermen-pskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx supermen-pskel.hxx
+$(impl).o: $(impl).cxx $(impl).hxx supermen-pskel.hxx
+supermen-pskel.o: supermen-pskel.cxx supermen-pskel.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+
+%-pskel.hxx %-pskel.cxx: %.xsd
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver person.xml batman.xml superman.xml
+ ./driver person.xml
+ ./driver batman.xml
+ ./driver superman.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f supermen-pskel.?xx $(impl).o supermen-pskel.o driver.o driver
diff --git a/dist/examples/cxx/parser/polyroot/nmakefile b/dist/examples/cxx/parser/polyroot/nmakefile
new file mode 100644
index 0000000..02146ad
--- /dev/null
+++ b/dist/examples/cxx/parser/polyroot/nmakefile
@@ -0,0 +1,51 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = supermen-pimpl-mixin
+!else
+impl = supermen-pimpl-tiein
+!endif
+
+driver.exe: driver.obj supermen-pskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx supermen-pskel.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx supermen-pskel.hxx
+supermen-pskel.obj: supermen-pskel.cxx supermen-pskel.hxx
+
+
+supermen-pskel.hxx supermen-pskel.cxx: supermen.xsd
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic supermen.xsd
+
+
+# Test.
+#
+test: driver.exe person.xml batman.xml superman.xml
+ .\driver person.xml
+ .\driver batman.xml
+ .\driver superman.xml
+
+
+# Clean.
+#
+clean:
+ -del supermen-pskel.?xx $(impl).obj supermen-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/parser/wildcard/makefile b/dist/examples/cxx/parser/wildcard/makefile
new file mode 100644
index 0000000..34830b9
--- /dev/null
+++ b/dist/examples/cxx/parser/wildcard/makefile
@@ -0,0 +1,42 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_PARSER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+driver: driver.o email-pskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx email-pskel.hxx
+email-pskel.o: email-pskel.cxx email-pskel.hxx
+
+.PRECIOUS: %-pskel.hxx %-pskel.cxx
+%-pskel.hxx %-pskel.cxx: %.xsd
+ $(root)/bin/xsde cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) $<
+
+# Test.
+#
+.PHONY: test
+test: driver email.xml
+ ./driver email.xml
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f email-pskel.?xx email-pskel.o driver.o driver
+
diff --git a/dist/examples/cxx/parser/wildcard/nmakefile b/dist/examples/cxx/parser/wildcard/nmakefile
new file mode 100644
index 0000000..c1f333b
--- /dev/null
+++ b/dist/examples/cxx/parser/wildcard/nmakefile
@@ -0,0 +1,39 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_PARSER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+driver.exe: driver.obj email-pskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx email-pskel.hxx
+email-pskel.obj: email-pskel.cxx email-pskel.hxx
+
+email-pskel.cxx email-pskel.hxx: email.xsd
+ $(root)\bin\xsde.exe cxx-parser $(XSDFLAGS) $(EXTRA_XSDFLAGS) email.xsd
+
+# Test.
+#
+test: driver.exe email.xml
+ .\driver.exe email.xml
+
+
+# Clean.
+#
+clean:
+ -del email-pskel.?xx email-pskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/serializer/hello/makefile b/dist/examples/cxx/serializer/hello/makefile
new file mode 100644
index 0000000..fb26bde
--- /dev/null
+++ b/dist/examples/cxx/serializer/hello/makefile
@@ -0,0 +1,50 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS := -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),none)
+EXTRA_XSDFLAGS += --reuse-style-none
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+driver: driver.o hello-sskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx hello-sskel.hxx
+hello-sskel.o: hello-sskel.cxx hello-sskel.hxx
+
+.PRECIOUS: %-sskel.hxx %-sskel.cxx
+%-sskel.hxx %-sskel.cxx: %.xsd
+ $(root)/bin/xsde cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) $<
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f hello-sskel.?xx hello-sskel.o driver.o driver
+
diff --git a/dist/examples/cxx/serializer/hello/nmakefile b/dist/examples/cxx/serializer/hello/nmakefile
new file mode 100644
index 0000000..f6b83ce
--- /dev/null
+++ b/dist/examples/cxx/serializer/hello/nmakefile
@@ -0,0 +1,47 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "none"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-none
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+driver.exe: driver.obj hello-sskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx hello-sskel.hxx
+hello-sskel.obj: hello-sskel.cxx hello-sskel.hxx
+
+hello-sskel.cxx hello-sskel.hxx: hello.xsd
+ $(root)\bin\xsde.exe cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) hello.xsd
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+
+# Clean.
+#
+clean:
+ -del hello-sskel.?xx hello-sskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/serializer/library/makefile b/dist/examples/cxx/serializer/library/makefile
new file mode 100644
index 0000000..58f9dcd
--- /dev/null
+++ b/dist/examples/cxx/serializer/library/makefile
@@ -0,0 +1,56 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := library-simpl-mixin
+else
+impl := library-simpl-tiein
+endif
+
+driver: driver.o library-sskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx library-sskel.hxx library.hxx
+$(impl).o: $(impl).cxx $(impl).hxx library-sskel.hxx library.hxx
+library-sskel.o: library-sskel.cxx library-sskel.hxx library.hxx
+
+.PRECIOUS: %-sskel.hxx %-sskel.cxx
+
+%-sskel.hxx %-sskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f library-sskel.?xx $(impl).o library-sskel.o driver.o driver
+
diff --git a/dist/examples/cxx/serializer/library/nmakefile b/dist/examples/cxx/serializer/library/nmakefile
new file mode 100644
index 0000000..406374a
--- /dev/null
+++ b/dist/examples/cxx/serializer/library/nmakefile
@@ -0,0 +1,53 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = library-simpl-mixin
+!else
+impl = library-simpl-tiein
+!endif
+
+driver.exe: driver.obj library-sskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx library-sskel.hxx library.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx library-sskel.hxx library.hxx
+library-sskel.obj: library-sskel.cxx library-sskel.hxx library.hxx
+
+
+library-sskel.hxx library-sskel.cxx: library.xsd library.map
+ $(root)\bin\xsde.exe cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map library.map library.xsd
+
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+
+# Clean.
+#
+clean:
+ -del library-sskel.?xx $(impl).obj library-sskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/serializer/makefile b/dist/examples/cxx/serializer/makefile
new file mode 100644
index 0000000..7677036
--- /dev/null
+++ b/dist/examples/cxx/serializer/makefile
@@ -0,0 +1,49 @@
+root := ../../..
+
+include $(root)/build/config.make
+
+dirs :=
+
+ifeq ($(XSDE_STL),y)
+ifeq ($(XSDE_IOSTREAM),y)
+ifeq ($(XSDE_EXCEPTIONS),y)
+
+dirs += hello
+
+ifneq ($(XSDE_REUSE_STYLE),none)
+dirs += library
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+dirs += polymorphism polyroot
+endif
+
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),tiein)
+dirs += wildcard
+endif
+
+endif
+endif
+endif
+
+ifeq ($(XSDE_STL),n)
+ifeq ($(XSDE_EXCEPTIONS),n)
+ifneq ($(XSDE_REUSE_STYLE),none)
+dirs += minimal
+endif
+endif
+endif
+
+
+.PHONY: all $(dirs)
+
+all: $(dirs)
+
+$(dirs):
+ @$(MAKE) -C $@ $(MAKECMDGOALS)
+
+makefile: ;
+%.make:: ;
+
+%:: $(dirs) ;
diff --git a/dist/examples/cxx/serializer/minimal/makefile b/dist/examples/cxx/serializer/minimal/makefile
new file mode 100644
index 0000000..ff94a42
--- /dev/null
+++ b/dist/examples/cxx/serializer/minimal/makefile
@@ -0,0 +1,60 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+EXTRA_XSDFLAGS := --no-stl --no-exceptions
+
+ifeq ($(XSDE_IOSTREAM),n)
+EXTRA_XSDFLAGS += --no-iostream
+endif
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := people-simpl-mixin
+else
+impl := people-simpl-tiein
+endif
+
+driver: driver.o people-sskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx people-sskel.hxx people.hxx
+people-sskel.o: people-sskel.cxx people-sskel.hxx people.hxx
+
+.PRECIOUS: %-sskel.hxx %-sskel.cxx
+
+%-sskel.hxx %-sskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f people-sskel.?xx people-sskel.o driver.o driver
+
diff --git a/dist/examples/cxx/serializer/minimal/nmakefile b/dist/examples/cxx/serializer/minimal/nmakefile
new file mode 100644
index 0000000..d85fade
--- /dev/null
+++ b/dist/examples/cxx/serializer/minimal/nmakefile
@@ -0,0 +1,55 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+EXTRA_XSDFLAGS = --no-stl --no-exceptions
+
+!if "$(XSDE_IOSTREAM)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-iostream
+!endif
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = people-simpl-mixin
+!else
+impl = people-simpl-tiein
+!endif
+
+driver.exe: driver.obj people-sskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx people-sskel.hxx people.hxx
+people-sskel.obj: people-sskel.cxx people-sskel.hxx people.hxx
+
+people-sskel.cxx people-sskel.hxx: people.xsd people.map
+ $(root)\bin\xsde.exe cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map people.map people.xsd
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+
+# Clean.
+#
+clean:
+ -del people-sskel.?xx people-sskel.obj driver.obj driver.exe
diff --git a/dist/examples/cxx/serializer/nmakefile b/dist/examples/cxx/serializer/nmakefile
new file mode 100644
index 0000000..b207482
--- /dev/null
+++ b/dist/examples/cxx/serializer/nmakefile
@@ -0,0 +1,44 @@
+root = ..\..\..
+
+!include $(root)\build\config.nmake
+
+dirs =
+
+!if "$(XSDE_STL)" == "y"
+!if "$(XSDE_IOSTREAM)" == "y"
+!if "$(XSDE_EXCEPTIONS)" == "y"
+
+dirs = $(dirs) hello
+
+!if "$(XSDE_REUSE_STYLE)" != "none"
+dirs = $(dirs) library
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+dirs = $(dirs) polymorphism polyroot
+!endif
+
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "tiein"
+dirs = $(dirs) wildcard
+
+!endif
+!endif
+!endif
+!endif
+
+!if "$(XSDE_STL)" == "n"
+!if "$(XSDE_EXCEPTIONS)" == "n"
+!if "$(XSDE_REUSE_STYLE)" != "none"
+dirs = $(dirs) minimal
+!endif
+!endif
+!endif
+
+all:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile"
+
+test clean:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile $@"
diff --git a/dist/examples/cxx/serializer/polymorphism/makefile b/dist/examples/cxx/serializer/polymorphism/makefile
new file mode 100644
index 0000000..eab3e3e
--- /dev/null
+++ b/dist/examples/cxx/serializer/polymorphism/makefile
@@ -0,0 +1,52 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := supermen-simpl-mixin
+else
+impl := supermen-simpl-tiein
+endif
+
+driver: driver.o supermen-sskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+$(impl).o: $(impl).cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+supermen-sskel.o: supermen-sskel.cxx supermen-sskel.hxx supermen.hxx
+
+.PRECIOUS: %-sskel.hxx %-sskel.cxx
+
+%-sskel.hxx %-sskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic --type-map $*.map $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f supermen-sskel.?xx $(impl).o supermen-sskel.o driver.o driver
+
diff --git a/dist/examples/cxx/serializer/polymorphism/nmakefile b/dist/examples/cxx/serializer/polymorphism/nmakefile
new file mode 100644
index 0000000..8bb5d26
--- /dev/null
+++ b/dist/examples/cxx/serializer/polymorphism/nmakefile
@@ -0,0 +1,49 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = supermen-simpl-mixin
+!else
+impl = supermen-simpl-tiein
+!endif
+
+driver.exe: driver.obj supermen-sskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+supermen-sskel.obj: supermen-sskel.cxx supermen-sskel.hxx supermen.hxx
+
+
+supermen-sskel.hxx supermen-sskel.cxx: supermen.xsd supermen.map
+ $(root)\bin\xsde.exe cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic --type-map supermen.map supermen.xsd
+
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+
+# Clean.
+#
+clean:
+ -del supermen-sskel.?xx $(impl).obj supermen-sskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/serializer/polyroot/makefile b/dist/examples/cxx/serializer/polyroot/makefile
new file mode 100644
index 0000000..eab3e3e
--- /dev/null
+++ b/dist/examples/cxx/serializer/polyroot/makefile
@@ -0,0 +1,52 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+EXTRA_XSDFLAGS += --reuse-style-mixin
+endif
+
+ifeq ($(XSDE_REUSE_STYLE),mixin)
+impl := supermen-simpl-mixin
+else
+impl := supermen-simpl-tiein
+endif
+
+driver: driver.o supermen-sskel.o $(impl).o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+$(impl).o: $(impl).cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+supermen-sskel.o: supermen-sskel.cxx supermen-sskel.hxx supermen.hxx
+
+.PRECIOUS: %-sskel.hxx %-sskel.cxx
+
+%-sskel.hxx %-sskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic --type-map $*.map $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f supermen-sskel.?xx $(impl).o supermen-sskel.o driver.o driver
+
diff --git a/dist/examples/cxx/serializer/polyroot/nmakefile b/dist/examples/cxx/serializer/polyroot/nmakefile
new file mode 100644
index 0000000..8bb5d26
--- /dev/null
+++ b/dist/examples/cxx/serializer/polyroot/nmakefile
@@ -0,0 +1,49 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --reuse-style-mixin
+!endif
+
+!if "$(XSDE_REUSE_STYLE)" == "mixin"
+impl = supermen-simpl-mixin
+!else
+impl = supermen-simpl-tiein
+!endif
+
+driver.exe: driver.obj supermen-sskel.obj $(impl).obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+$(impl).obj: $(impl).cxx $(impl).hxx supermen-sskel.hxx supermen.hxx
+supermen-sskel.obj: supermen-sskel.cxx supermen-sskel.hxx supermen.hxx
+
+
+supermen-sskel.hxx supermen-sskel.cxx: supermen.xsd supermen.map
+ $(root)\bin\xsde.exe cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--generate-polymorphic --type-map supermen.map supermen.xsd
+
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+
+# Clean.
+#
+clean:
+ -del supermen-sskel.?xx $(impl).obj supermen-sskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/cxx/serializer/wildcard/makefile b/dist/examples/cxx/serializer/wildcard/makefile
new file mode 100644
index 0000000..96a73e8
--- /dev/null
+++ b/dist/examples/cxx/serializer/wildcard/makefile
@@ -0,0 +1,45 @@
+root := ../../../..
+
+include $(root)/build/cxx/rules.make
+
+# Build.
+#
+EXTRA_CPPFLAGS += -I$(root)/libxsde
+
+ifeq ($(XSDE_LONGLONG),n)
+EXTRA_XSDFLAGS += --no-long-long
+endif
+
+ifeq ($(XSDE_SERIALIZER_VALIDATION),n)
+EXTRA_XSDFLAGS += --suppress-validation
+endif
+
+ifeq ($(XSDE_POLYMORPHIC),y)
+EXTRA_XSDFLAGS += --runtime-polymorphic
+endif
+
+driver: driver.o email-sskel.o $(root)/libxsde/xsde/libxsde.a
+
+driver.o: driver.cxx email-sskel.hxx email.hxx
+email-sskel.o: email-sskel.cxx email-sskel.hxx email.hxx
+
+.PRECIOUS: %-sskel.hxx %-sskel.cxx
+
+%-sskel.hxx %-sskel.cxx: %.xsd %.map
+ $(root)/bin/xsde cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map $*.map $<
+
+
+# Test.
+#
+.PHONY: test
+test: driver
+ ./driver
+
+
+# Clean.
+#
+.PHONY: clean
+clean:
+ rm -f email-sskel.?xx email-sskel.o driver.o driver
+
diff --git a/dist/examples/cxx/serializer/wildcard/nmakefile b/dist/examples/cxx/serializer/wildcard/nmakefile
new file mode 100644
index 0000000..a84347e
--- /dev/null
+++ b/dist/examples/cxx/serializer/wildcard/nmakefile
@@ -0,0 +1,42 @@
+root = ..\..\..\..
+
+!include $(root)\build\cxx\rules.nmake
+
+# Build.
+#
+EXTRA_CPPFLAGS = /I$(root)\libxsde
+
+!if "$(XSDE_LONGLONG)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --no-long-long
+!endif
+
+!if "$(XSDE_SERIALIZER_VALIDATION)" == "n"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --suppress-validation
+!endif
+
+!if "$(XSDE_POLYMORPHIC)" == "y"
+EXTRA_XSDFLAGS = $(EXTRA_XSDFLAGS) --runtime-polymorphic
+!endif
+
+driver.exe: driver.obj email-sskel.obj $(root)\libxsde\xsde\xsde.lib
+
+driver.obj: driver.cxx email-sskel.hxx email.hxx
+email-sskel.obj: email-sskel.cxx email-sskel.hxx email.hxx
+
+
+email-sskel.hxx email-sskel.cxx: email.xsd email.map
+ $(root)\bin\xsde.exe cxx-serializer $(XSDFLAGS) $(EXTRA_XSDFLAGS) \
+--type-map email.map email.xsd
+
+
+# Test.
+#
+test: driver.exe
+ .\driver.exe
+
+
+# Clean.
+#
+clean:
+ -del email-sskel.?xx email-sskel.obj driver.obj driver.exe
+
diff --git a/dist/examples/makefile b/dist/examples/makefile
new file mode 100644
index 0000000..5b8947e
--- /dev/null
+++ b/dist/examples/makefile
@@ -0,0 +1,11 @@
+dirs := cxx
+
+.PHONY: all $(dirs)
+
+all: $(dirs)
+
+$(dirs):
+ $(MAKE) -C $@ $(MAKECMDGOALS)
+
+makefile: ;
+% :: $(dirs) ;
diff --git a/dist/examples/nmakefile b/dist/examples/nmakefile
new file mode 100644
index 0000000..1f3db7e
--- /dev/null
+++ b/dist/examples/nmakefile
@@ -0,0 +1,9 @@
+dirs = cxx
+
+all:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile"
+
+test clean:
+ @for %i in ( $(dirs) ) do \
+@cmd /c "cd %i & $(MAKE) /nologo /f nmakefile $@"