From 6c63b913179127e09ed7d9da8920493ccceec6ce Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 2 Mar 2009 12:14:54 +0200 Subject: 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). --- dist/examples/cxx/hybrid/compositors/makefile | 53 ++++++++++++++++++++++ dist/examples/cxx/hybrid/compositors/nmakefile | 49 +++++++++++++++++++++ dist/examples/cxx/hybrid/filter/makefile | 57 ++++++++++++++++++++++++ dist/examples/cxx/hybrid/filter/nmakefile | 54 +++++++++++++++++++++++ dist/examples/cxx/hybrid/hello/makefile | 49 +++++++++++++++++++++ dist/examples/cxx/hybrid/hello/nmakefile | 47 ++++++++++++++++++++ dist/examples/cxx/hybrid/library/makefile | 51 +++++++++++++++++++++ dist/examples/cxx/hybrid/library/nmakefile | 48 ++++++++++++++++++++ dist/examples/cxx/hybrid/makefile | 36 +++++++++++++++ dist/examples/cxx/hybrid/minimal/makefile | 57 ++++++++++++++++++++++++ dist/examples/cxx/hybrid/minimal/nmakefile | 54 +++++++++++++++++++++++ dist/examples/cxx/hybrid/multiroot/makefile | 51 +++++++++++++++++++++ dist/examples/cxx/hybrid/multiroot/nmakefile | 49 +++++++++++++++++++++ dist/examples/cxx/hybrid/nmakefile | 31 +++++++++++++ dist/examples/cxx/hybrid/streaming/makefile | 61 ++++++++++++++++++++++++++ dist/examples/cxx/hybrid/streaming/nmakefile | 58 ++++++++++++++++++++++++ dist/examples/cxx/hybrid/wildcard/makefile | 59 +++++++++++++++++++++++++ dist/examples/cxx/hybrid/wildcard/nmakefile | 56 +++++++++++++++++++++++ 18 files changed, 920 insertions(+) create mode 100644 dist/examples/cxx/hybrid/compositors/makefile create mode 100644 dist/examples/cxx/hybrid/compositors/nmakefile create mode 100644 dist/examples/cxx/hybrid/filter/makefile create mode 100644 dist/examples/cxx/hybrid/filter/nmakefile create mode 100644 dist/examples/cxx/hybrid/hello/makefile create mode 100644 dist/examples/cxx/hybrid/hello/nmakefile create mode 100644 dist/examples/cxx/hybrid/library/makefile create mode 100644 dist/examples/cxx/hybrid/library/nmakefile create mode 100644 dist/examples/cxx/hybrid/makefile create mode 100644 dist/examples/cxx/hybrid/minimal/makefile create mode 100644 dist/examples/cxx/hybrid/minimal/nmakefile create mode 100644 dist/examples/cxx/hybrid/multiroot/makefile create mode 100644 dist/examples/cxx/hybrid/multiroot/nmakefile create mode 100644 dist/examples/cxx/hybrid/nmakefile create mode 100644 dist/examples/cxx/hybrid/streaming/makefile create mode 100644 dist/examples/cxx/hybrid/streaming/nmakefile create mode 100644 dist/examples/cxx/hybrid/wildcard/makefile create mode 100644 dist/examples/cxx/hybrid/wildcard/nmakefile (limited to 'dist/examples/cxx/hybrid') 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 -- cgit v1.1