diff options
127 files changed, 7561 insertions, 168 deletions
@@ -30,6 +30,19 @@ Building XSD/e $ make -f ../xsde-x.y.z/makefile +Creating Binary Distributions + + A binary distribution contains a pre-built XSD/e compiler binary for + a particular host development platform as well as the source code and + simple build systems for the libxsde runtime library and examples. + + The dist and dist-win make targets are used to create binary distributions, + for example: + + $ make dist_prefix=/tmp/xsde-3.1.0-i686-linux-gnu dist + $ make dist_prefix=/tmp/xsde-3.1.0-i686-windows dist-win + + Installing XSD/e Not supported in this version. diff --git a/build/bootstrap.make b/build/bootstrap.make index ad55b12..afd4e4e 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -19,36 +19,59 @@ ifdef %interactive% .PHONY: test $(out_base)/.test \ install $(out_base)/.install \ - clean $(out_base)/.clean + dist $(out_base)/.dist \ + dist-win $(out_base)/.dist-win \ + clean $(out_base)/.clean \ + cleandoc $(out_base)/.cleandoc test: $(out_base)/.test install: $(out_base)/.install +dist: $(out_base)/.dist +dist-win: $(out_base)/.dist-win clean: $(out_base)/.clean +cleandoc: $(out_base)/.cleandoc -ifeq ($(.DEFAULT_GOAL),test) +ifneq ($(filter $(.DEFAULT_GOAL),test install dist dist-win clean cleandoc),) .DEFAULT_GOAL := endif -ifeq ($(.DEFAULT_GOAL),install) -.DEFAULT_GOAL := endif -ifeq ($(.DEFAULT_GOAL),clean) -.DEFAULT_GOAL := -endif +# Make sure the distribution prefix is set if the goal is dist or dist-win. +# +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +ifeq ($(dist_prefix),) +$(error dist_prefix is not set) +endif endif -# Don't include dependency info if we are cleaning. +# Don't include dependency info for certain targets. # define include-dep -endef - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),disfigure) -define include-dep $(call -include,$1) endef + +ifneq ($(filter $(MAKECMDGOALS),clean cleandoc disfigure),) +include-dep = endif + + +# For dist, don't include dependecies in libxsde, examples, and tests. +# +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) + +ifneq ($(subst $(src_root)/libxsde/,,$(src_base)),$(src_base)) +include-dep = +endif + +ifneq ($(subst $(src_root)/tests/,,$(src_base)),$(src_base)) +include-dep = +endif + +ifneq ($(subst $(src_root)/examples/,,$(src_base)),$(src_base)) +include-dep = +endif + endif diff --git a/dist/INSTALL b/dist/INSTALL new file mode 100644 index 0000000..f6fec6b --- /dev/null +++ b/dist/INSTALL @@ -0,0 +1,144 @@ +This file contains instructions for building the XSD/e runtime +library (libxsde) and examples. The XSD/e compiler itself was +pre-built for your host development platform and can be found +in the bin/ directory. The runtime library and examples can be +built using either GNU make (normally on UNIX operating systems) +or Microsoft nmake (on Windows). The following sections describe +each of the two methods. + + +GNU make +-------- + +This section provides general instructions for building the XSD/e +runtime and examples with GNU make. For additional information on +building with XCode 3.1 iPhone SDK see the corresponding notes at +the end of this document. + +The first step in building the source code with GNU make is to +configure the runtime library by editing the config/config.make +file. There you can specify which toolchain should be used to +compile the source code as well as which optional feature (such +as STL, C++ exceptions, etc.) should be used. Follow the +instructions in the comments in config/config.make and make the +appropriate changes. The etc/ directory contains a number of +sample configurations for various targets/toolchains. + +To start the compilation process simply execute make (or gmake) +in the root directory. This will build the libxsde.a runtime +library as well as the examples. If you do not want to build +the examples, you can start the compilation process from the +libxsde/ directory. Note that if you change any configuration +parameters in the config/config.make file, then you need to +completely clean the distribution before recompiling. For that +run 'make clean' from the root directory. + +In order to start using XSD/e in your applications, you will +need add the libxsde/ directory to your include search paths +(-I) and link your executables with the libxsde/xsde/libxsde.a +library. + + +Microsoft nmake +--------------- + +This section provides general instructions for building the XSD/e +runtime and examples with nmake. For additional information on +eMbedded Visual C++ 4.0, Visual Studio 2005 with Smart Devices, +and Visual Studio 2008 with Smart Devices support see the +corresponding notes at the end of this document. + +The first step in building the source code with nmake is to +configure the runtime library by editing the config\config.nmake +file. There you can specify which toolchain should be used to +compile the source code as well as which optional feature (such +as STL, C++ exceptions, etc.) should be used. Follow the +instructions in the comments in config\config.nmake and make the +appropriate changes. The etc/ directory contains a number of +sample configurations for various targets/toolchains. + +If you are using an IDE (e.g., Visual Studio or eMbedded Visual +C++) to develop your applications, you can copy the compiler +options (such as CPU and Platform preprocessor macros, etc.) +from your project's C++ compiler settings. + +The next step is to start a new command prompt and execute +the vcvars32.bat (or equivalent) file that is normally found +in your development environment's installation directory. +After executing vcvars32.bat, you can start the compilation +process by executing + +nmake /f nmakefile + +from the XSD/e root directory. This will build the xsde.lib +runtime library as well as the examples. If you do not want to +build the examples, you can start the compilation process from +the libxsde\ directory. Note that if you change any configuration +parameters in the config\config.nmake file, then you need to +completely clean the distribution before recompiling. For that +run 'nmake /f nmakefile clean' from the root directory. + +In order to start using XSD/e in your applications, you will +need add the libxsde\ directory to your include search paths +and link your executables with the libxsde\xsde\xsde.lib +library. + + +Notes on XCode 3.1.x iPhone SDK +------------------------------- + +You can find two sample configuration files for this development +environment in the etc/iphone/ directory. The first configuration +file is for the device and the other is for the simulator. You will +need to copy one of these files to the config/ directory and rename +it to config.make. If your iPhone SDK is installed in a location +other than the default (/Developer) then you will need to adjust +the paths at the beginning of the configuration file. You may also +need to adjust the iPhone SDK version (e.g., 2.1 or 2.2 instead of +2.0) as well as the C and C++ compiler executable names if you are +using newer versions of XCode. Additionally, you may also want to +check other configuration parameters (e.g., the use of iostream, +STL, C++ exceptions, etc; they are all enabled by default). + + +Notes on eMbedded Visual C++ 4.0 +-------------------------------- + +You can find a sample configuration file for this development +environment in the etc\evc-4.0\ directory. + +Instead of one vcvars32.bat file, eMbedded Visual C++ has a set +of such files each for a particular platform and CPU. They can be +found in the EVC\WCEnnn\BIN\ subdirectory in the eMbedded Visual +C++ installation directory. For example, a file for Windows CE +4.0 for ARMv4 CPU is EVC\WCE400\BIN\WCEARMV4.bat. You may want +to review the installation paths in this file to make sure they +reflect your setup. You can also study this file to find out the +name of the C/C++ compiler for this CPU. In case of ARM, it is +clarm.exe. + + +Notes on Visual Studio 2005 with Smart Devices support +------------------------------------------------------ + +You can find sample configuration files for this development +environment in the etc\vc-8.0\ directory. + +This version of Visual Studio does not provide vcvars32.bat or +equivalent for Smart Devices development. Instead you can use +the vcvarssd.bat file provided in the etc\vc-8.0\ directory. +Modify it according to your setup as instructed by the comments +found in this file. + + +Notes on Visual Studio 2008 with Smart Devices support +------------------------------------------------------ + +You can find sample configuration files for this development +environment in the etc\vc-9.0\ directory. + +This version of Visual Studio does not provide vcvars32.bat or +equivalent for Smart Devices development. Instead you can use +the vcvarssd.bat file provided in the etc\vc-9.0\ directory. +Modify it according to your setup as instructed by the comments +found in this file. diff --git a/dist/README b/dist/README new file mode 100644 index 0000000..fc9e0b3 --- /dev/null +++ b/dist/README @@ -0,0 +1,25 @@ +CodeSynthesis XSD/e is an open-source XML parser/serializer +generator for mobile and embedded systems. It provides event- +driven, stream oriented XML parsing, XML serialization, W3C +XML Schema validation, and C++ data binding while maintaining +a small footprint and portability. For more information about +XSD/e visit: + + +http://www.codesynthesis.com/products/xsde/ + + +This package contains a precompiled binary for the XSD/e compiler +as well as the source code for the runtime library (libxsde) and +examples. The INSTALL file contains instructions for compiling +the runtime library and examples on various platforms. + +The NEWS file contains information on the user-visible changes +from the previous release. + +See the LICENSE file for distribution conditions. + +See the documentation/ directory for documentation. + +Send questions, bug reports, or any other feedback to the +xsde-users@codesynthesis.com mailing list. diff --git a/dist/build/c/rules.make b/dist/build/c/rules.make new file mode 100644 index 0000000..ab0474c --- /dev/null +++ b/dist/build/c/rules.make @@ -0,0 +1,11 @@ +# file : build/c/rules.make +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +include $(root)/build/config.make + +# Rules. +# +%.o: %.c + $(CC) $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CFLAGS) -c $< -o $@ diff --git a/dist/build/c/rules.nmake b/dist/build/c/rules.nmake new file mode 100644 index 0000000..4c9f7be --- /dev/null +++ b/dist/build/c/rules.nmake @@ -0,0 +1,13 @@ +# file : build/c/rules.nmake +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +!include $(root)\build\config.nmake + +# Rules. +# +.SUFFIXES: .c .obj + +.c.obj: + $(CC) $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CFLAGS) /c $< /Fo$@ diff --git a/dist/build/config.make b/dist/build/config.make new file mode 100644 index 0000000..44f3c36 --- /dev/null +++ b/dist/build/config.make @@ -0,0 +1,30 @@ +# file : build/config.make +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2008 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +# +# DO NOT edit this file. Use config/config.make instead. +# + +include $(root)/config/config.make + +# Strip user-specified parameters of leading/trailing whitespaces. +# +XSDE_PLATFORM := $(strip $(XSDE_PLATFORM)) +XSDE_ARCH_WIDTH := $(strip $(XSDE_ARCH_WIDTH)) +XSDE_BYTEORDER := $(strip $(XSDE_BYTEORDER)) +XSDE_STL := $(strip $(XSDE_STL)) +XSDE_IOSTREAM := $(strip $(XSDE_IOSTREAM)) +XSDE_EXCEPTIONS := $(strip $(XSDE_EXCEPTIONS)) +XSDE_LONGLONG := $(strip $(XSDE_LONGLONG)) +XSDE_SNPRINTF := $(strip $(XSDE_SNPRINTF)) +XSDE_PARSER_VALIDATION := $(strip $(XSDE_PARSER_VALIDATION)) +XSDE_SERIALIZER_VALIDATION := $(strip $(XSDE_SERIALIZER_VALIDATION)) +XSDE_REUSE_STYLE := $(strip $(XSDE_REUSE_STYLE)) +XSDE_POLYMORPHIC := $(strip $(XSDE_POLYMORPHIC)) +XSDE_PARSER_SMAP_BUCKETS := $(strip $(XSDE_PARSER_SMAP_BUCKETS)) +XSDE_PARSER_IMAP_BUCKETS := $(strip $(XSDE_PARSER_IMAP_BUCKETS)) +XSDE_SERIALIZER_SMAP_BUCKETS := $(strip $(XSDE_SERIALIZER_SMAP_BUCKETS)) +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := $(strip $(XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS)) +XSDE_SERIALIZER_IMAP_BUCKETS := $(strip $(XSDE_SERIALIZER_IMAP_BUCKETS)) diff --git a/dist/build/config.nmake b/dist/build/config.nmake new file mode 100644 index 0000000..2483b28 --- /dev/null +++ b/dist/build/config.nmake @@ -0,0 +1,10 @@ +# file : build/config.make +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2008 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +# +# DO NOT edit this file. Use config\config.nmake instead. +# + +!include $(root)\config\config.nmake diff --git a/dist/build/cxx/rules.make b/dist/build/cxx/rules.make new file mode 100644 index 0000000..73399bd --- /dev/null +++ b/dist/build/cxx/rules.make @@ -0,0 +1,14 @@ +# file : build/cxx/rules.make +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +include $(root)/build/config.make + +# Rules. +# +%.o: %.cxx + $(CXX) $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CXXFLAGS) -c $< -o $@ + +%: %.o + $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/dist/build/cxx/rules.nmake b/dist/build/cxx/rules.nmake new file mode 100644 index 0000000..964bbdc --- /dev/null +++ b/dist/build/cxx/rules.nmake @@ -0,0 +1,16 @@ +# file : build/cxx/rules.nmake +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +!include $(root)\build\config.nmake + +# Rules. +# +.SUFFIXES: .cxx .exe .obj + +.cxx.obj: + $(CXX) $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CXXFLAGS) /c /TP $< /Fo$@ + +.obj.exe: + $(LD) $(LDFLAGS) /OUT:$@ $** $(LIBS) diff --git a/dist/config/config.make b/dist/config/config.make new file mode 100644 index 0000000..b6c4212 --- /dev/null +++ b/dist/config/config.make @@ -0,0 +1,135 @@ +# Toolchain. +# +CC := gcc +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := g++ +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := ar +ARFLAGS := rc +RANLIB := ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/config/config.nmake b/dist/config/config.nmake new file mode 100644 index 0000000..6279c60 --- /dev/null +++ b/dist/config/config.nmake @@ -0,0 +1,135 @@ +# Toolchain. +# +CC = cl.exe +CFLAGS = /nologo /W3 +CPPFLAGS = -D_CRT_SECURE_NO_DEPRECATE + +CXX = cl.exe +CXXFLAGS = /nologo /W3 + +LD = link.exe +LDFLAGS = /nologo +LIBS = + +# Set RANLIB to empty if your system does not need ranlib. +# +AR = lib.exe +ARFLAGS = /nologo +RANLIB = + +# Common XSD/e flags. +# +XSDFLAGS = --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM = win32 + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH = 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER = l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL = y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM = y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS = y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG = n + + +# Set to 'n' if your platform doesn't have the _snprintf function. +# +XSDE_SNPRINTF = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION = y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE = tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC = n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS = 53 +XSDE_PARSER_IMAP_BUCKETS = 97 +XSDE_SERIALIZER_SMAP_BUCKETS = 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS = 53 +XSDE_SERIALIZER_IMAP_BUCKETS = 97 + + +# Options tuning depending on the features selected. +# +!if "$(XSDE_EXCEPTIONS)" == "y" +CFLAGS = $(CFLAGS) /EHs +CXXFLAGS = $(CXXFLAGS) /EHs +!endif diff --git a/dist/etc/evc-4.0/config.nmake b/dist/etc/evc-4.0/config.nmake new file mode 100644 index 0000000..78d5840 --- /dev/null +++ b/dist/etc/evc-4.0/config.nmake @@ -0,0 +1,138 @@ +# Sample configuration file for Windows CE 4.0 on ARMv4 using eMbedded +# Visual C++ 4.0. While this configuration disables STL and C++ exceptions, +# those are supported on WinCE and can be enabled. +# + +# Toolchain. +# +CC = clarm.exe +CFLAGS = /nologo /W3 /O1 +CPPFLAGS = /DARM /D_ARM /D_ARMV4 /DUNDER_CE=0x400 /D_WIN32_WCE=0x400 + +CXX = clarm.exe +CXXFLAGS = /nologo /W3 /O1 + +LD = link.exe +LDFLAGS = /nologo /subsystem:windowsce,4.00 /entry:main /machine:ARM +LIBS = + +AR = lib.exe +ARFLAGS = /nologo + + +# Common XSD/e flags. +# +XSDFLAGS = --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM = wince + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH = 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER = l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL = n + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM = n + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS = n + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG = n + + +# Set to 'n' if your platform doesn't have the _snprintf function. +# +XSDE_SNPRINTF = n + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION = y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE = tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC = n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS = 53 +XSDE_PARSER_IMAP_BUCKETS = 97 +XSDE_SERIALIZER_SMAP_BUCKETS = 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS = 53 +XSDE_SERIALIZER_IMAP_BUCKETS = 97 + + +# Options tuning depending on the features selected. +# +!if "$(XSDE_EXCEPTIONS)" == "y" +CFLAGS = $(CFLAGS) /EHs +CXXFLAGS = $(CXXFLAGS) /EHs +!endif diff --git a/dist/etc/iphone/config-device.make b/dist/etc/iphone/config-device.make new file mode 100644 index 0000000..84fd828 --- /dev/null +++ b/dist/etc/iphone/config-device.make @@ -0,0 +1,142 @@ +# Sample configuration file for iPhone OS 2.x using XCode 3.1.x iPhone +# SDK. +# +XCODE := /Developer +IPHONE_PLATFORM := $(XCODE)/Platforms/iPhoneOS.platform/Developer +IPHONE_SDK := $(IPHONE_PLATFORM)/SDKs/iPhoneOS2.0.sdk + +# Toolchain. +# +CC := $(IPHONE_PLATFORM)/usr/bin/arm-apple-darwin9-gcc-4.0.1 +CFLAGS := -W -Wall -arch armv6 -O3 -isysroot $(IPHONE_SDK) +CPPFLAGS := + +CXX := $(IPHONE_PLATFORM)/usr/bin/arm-apple-darwin9-g++-4.0.1 +CXXFLAGS := -W -Wall -arch armv6 -O3 -isysroot $(IPHONE_SDK) + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := $(IPHONE_PLATFORM)/usr/bin/ar +ARFLAGS := rc +RANLIB := $(IPHONE_PLATFORM)/usr/bin/ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/iphone/config-simulator.make b/dist/etc/iphone/config-simulator.make new file mode 100644 index 0000000..fc9ab84 --- /dev/null +++ b/dist/etc/iphone/config-simulator.make @@ -0,0 +1,142 @@ +# Sample configuration file for iPhone Simulator 2.x using XCode 3.1.x +# iPhone SDK. +# +XCODE := /Developer +IPHONE_PLATFORM := $(XCODE)/Platforms/iPhoneSimulator.platform/Developer +IPHONE_SDK := $(IPHONE_PLATFORM)/SDKs/iPhoneSimulator2.0.sdk + +# Toolchain. +# +CC := $(IPHONE_PLATFORM)/usr/bin/i686-apple-darwin9-gcc-4.0.1 +CFLAGS := -W -Wall -arch i386 -O3 -isysroot $(IPHONE_SDK) +CPPFLAGS := + +CXX := $(IPHONE_PLATFORM)/usr/bin/i686-apple-darwin9-g++-4.0.1 +CXXFLAGS := -W -Wall -arch i386 -O3 -isysroot $(IPHONE_SDK) + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := $(IPHONE_PLATFORM)/usr/bin/ar +ARFLAGS := rc +RANLIB := $(IPHONE_PLATFORM)/usr/bin/ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/lynxos/config-4.2.make b/dist/etc/lynxos/config-4.2.make new file mode 100644 index 0000000..56ff0e1 --- /dev/null +++ b/dist/etc/lynxos/config-4.2.make @@ -0,0 +1,141 @@ +# Sample configuration file for LynxOS 4.2 on x86 using the gcc +# 3.2.2 toolchain. This configuration enables STL, iostream, and +# C++ exceptions which can be disabled if not required. For the +# PowerPC target simply change the XSDE_BYTEORDER parameter. +# + +# Toolchain. +# +CC := gcc +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := g++ +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := ar +ARFLAGS := rc +RANLIB := ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := n + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/qnx/config-6.3-gcc-2.95.make b/dist/etc/qnx/config-6.3-gcc-2.95.make new file mode 100644 index 0000000..0b4b28d --- /dev/null +++ b/dist/etc/qnx/config-6.3-gcc-2.95.make @@ -0,0 +1,140 @@ +# Sample configuration file for QNX 6.3 on x86 using gcc/g++ 2.95.3. +# While this configuration disables C++ exceptions, they are supported +# by this platform/compiler and can be enabled. +# + +# Toolchain. +# +CC := ntox86-gcc-2.95.3 +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := ntox86-g++-2.95.3 +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := ntox86-ar +ARFLAGS := rc +RANLIB := ntox86-ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := n + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := n + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := n + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/qnx/config-6.3-gcc-3.3.make b/dist/etc/qnx/config-6.3-gcc-3.3.make new file mode 100644 index 0000000..80343c4 --- /dev/null +++ b/dist/etc/qnx/config-6.3-gcc-3.3.make @@ -0,0 +1,140 @@ +# Sample configuration file for QNX 6.3 on x86 using gcc/g++ 3.3.5. +# This configuration enables STL, iostream, and C++ exceptions which +# can be disabled if not required. +# + +# Toolchain. +# +CC := ntox86-gcc-2.95.3 +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := ntox86-g++-2.95.3 +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := ntox86-ar +ARFLAGS := rc +RANLIB := ntox86-ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/qnx/config-6.4.make b/dist/etc/qnx/config-6.4.make new file mode 100644 index 0000000..d14e458 --- /dev/null +++ b/dist/etc/qnx/config-6.4.make @@ -0,0 +1,140 @@ +# Sample configuration file for QNX 6.4 on x86. This configuration +# enables STL, iostream, and C++ exceptions which can be disabled +# if not required. +# + +# Toolchain. +# +CC := ntox86-gcc +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := ntox86-g++ +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := ntox86-ar +ARFLAGS := rc +RANLIB := ntox86-ranlib + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := y + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/vc-8.0/config-max.nmake b/dist/etc/vc-8.0/config-max.nmake new file mode 100644 index 0000000..cd1e4a1 --- /dev/null +++ b/dist/etc/vc-8.0/config-max.nmake @@ -0,0 +1,139 @@ +# Sample configuration file for Windows CE 4.2 on ARMv4 using Visual Studio +# 2005 with Smart Devices support. This configuration enables STL, iostream, +# RTTI, and C++ exceptions. See config-min.nmake for a minimal configuration +# with all these options disabled. +# + +# Toolchain. +# +CC = cl.exe +CFLAGS = /nologo /W3 /O1 /MT /GS- +CPPFLAGS = /DARM /D_ARM /DUNDER_CE /DWINCE /D_WIN32_WCE=0x420 + +CXX = cl.exe +CXXFLAGS = /nologo /W3 /O1 /GR /MT /GS- + +LD = link.exe +LDFLAGS = /nologo /entry:main /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE +LIBS = coredll.lib corelibc.lib ccrtrtti.lib /nodefaultlib:oldnames.lib + +AR = lib.exe +ARFLAGS = /nologo + + +# Common XSD/e flags. +# +XSDFLAGS = --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM = wince + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH = 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER = l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL = y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM = y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS = y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG = n + + +# Set to 'n' if your platform doesn't have the _snprintf function. +# +XSDE_SNPRINTF = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION = y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE = tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC = n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS = 53 +XSDE_PARSER_IMAP_BUCKETS = 97 +XSDE_SERIALIZER_SMAP_BUCKETS = 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS = 53 +XSDE_SERIALIZER_IMAP_BUCKETS = 97 + + +# Options tuning depending on the features selected. +# +!if "$(XSDE_EXCEPTIONS)" == "y" +CFLAGS = $(CFLAGS) /EHs +CXXFLAGS = $(CXXFLAGS) /EHs +!endif diff --git a/dist/etc/vc-8.0/config-min.nmake b/dist/etc/vc-8.0/config-min.nmake new file mode 100644 index 0000000..b2f3c6d --- /dev/null +++ b/dist/etc/vc-8.0/config-min.nmake @@ -0,0 +1,139 @@ +# Sample configuration file for Windows CE 4.2 on ARMv4 using Visual Studio +# 2005 with Smart Devices support. This is a minimal configuration with STL, +# iostream, RTTI, and C++ exceptions disabled. See config-max.nmake for the +# a configuration with all these options enabled. +# + +# Toolchain. +# +CC = cl.exe +CFLAGS = /nologo /W3 /O1 /MT /GS- +CPPFLAGS = /DARM /D_ARM /DUNDER_CE /DWINCE /D_WIN32_WCE=0x420 + +CXX = cl.exe +CXXFLAGS = /nologo /W3 /O1 /GR- /MT /GS- + +LD = link.exe +LDFLAGS = /nologo /entry:main /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE +LIBS = coredll.lib corelibc.lib /nodefaultlib:oldnames.lib + +AR = lib.exe +ARFLAGS = /nologo + + +# Common XSD/e flags. +# +XSDFLAGS = --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM = wince + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH = 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER = l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL = n + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM = n + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS = n + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG = n + + +# Set to 'n' if your platform doesn't have the _snprintf function. +# +XSDE_SNPRINTF = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION = y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE = tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC = n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS = 53 +XSDE_PARSER_IMAP_BUCKETS = 97 +XSDE_SERIALIZER_SMAP_BUCKETS = 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS = 53 +XSDE_SERIALIZER_IMAP_BUCKETS = 97 + + +# Options tuning depending on the features selected. +# +!if "$(XSDE_EXCEPTIONS)" == "y" +CFLAGS = $(CFLAGS) /EHs +CXXFLAGS = $(CXXFLAGS) /EHs +!endif diff --git a/dist/etc/vc-8.0/vcvarssd.bat b/dist/etc/vc-8.0/vcvarssd.bat new file mode 100755 index 0000000..955a49f --- /dev/null +++ b/dist/etc/vc-8.0/vcvarssd.bat @@ -0,0 +1,39 @@ +@echo off +REM +REM This .bat file sets the environment variables for Visual Studio +REM 2005 Smart Devices toolchain to allow compilation from the command +REM line or with nmake. Make sure the following four variables are +REM set to the correct values. +REM + +REM +REM Make sure VSINSTALLDIR points to the Visual Studio 2005 installation +REM directory. +REM +SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 2005 + +REM +REM Set the toolchain to use. See VSINSTALLDIR\VC\ce\bin for possible +REM values. +REM +SET TOOLCHAIN=x86_arm + +REM +REM C/C++ runtime to use. See VSINSTALLDIR\VC\ce\lib for possible +REM values. +REM +SET RUNTIME=armv4 + +REM +REM Platform SDK to use. See VSINSTALLDIR\SmartDevices\SDK for +REM what's available (normally PocketPC2003 and Smartphone2003). +REM +SET SDK=PocketPC2003 + +title Visual Studio 2005 Smart Devices Environment for %SDK% on %RUNTIME% +echo Setting environment for Visual Studio 2005 Smart Devices. + +SET VCINSTALLDIR=%VSINSTALLDIR%\VC +SET PATH=%VCINSTALLDIR%\ce\BIN\%TOOLCHAIN%;%VCINSTALLDIR%\BIN;%VSINSTALLDIR%\Common7\IDE;%VSINSTALLDIR%\Common7\Tools;%VSINSTALLDIR%\Common7\Tools\bin;%PATH% +SET INCLUDE=%VCINSTALLDIR%\CE\ATLMFC\INCLUDE;%VCINSTALLDIR%\CE\INCLUDE;%VSINSTALLDIR%\SmartDevices\SDK\%SDK%\include;%INCLUDE% +SET LIB=%VCINSTALLDIR%\CE\ATLMFC\LIB\%RUNTIME%;%VCINSTALLDIR%\CE\LIB\%RUNTIME%;%VSINSTALLDIR%\SmartDevices\SDK\%SDK%\lib\%RUNTIME%;%LIB% diff --git a/dist/etc/vc-9.0/config-max.nmake b/dist/etc/vc-9.0/config-max.nmake new file mode 100644 index 0000000..24bf39b --- /dev/null +++ b/dist/etc/vc-9.0/config-max.nmake @@ -0,0 +1,139 @@ +# Sample configuration file for Windows CE 4.2 on ARMv4 using Visual Studio +# 2008 with Smart Devices support. This configuration enables STL, iostream, +# RTTI, and C++ exceptions. See config-min.nmake for a minimal configuration +# with all these options disabled. +# + +# Toolchain. +# +CC = cl.exe +CFLAGS = /nologo /W3 /O1 /MT /GS- +CPPFLAGS = /DARM /D_ARM /DUNDER_CE /DWINCE /D_WIN32_WCE=0x420 + +CXX = cl.exe +CXXFLAGS = /nologo /W3 /O1 /GR /MT /GS- + +LD = link.exe +LDFLAGS = /nologo /entry:main /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE +LIBS = coredll.lib corelibc.lib ccrtrtti.lib /nodefaultlib:oldnames.lib + +AR = lib.exe +ARFLAGS = /nologo + + +# Common XSD/e flags. +# +XSDFLAGS = --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM = wince + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH = 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER = l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL = y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM = y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS = y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG = n + + +# Set to 'n' if your platform doesn't have the _snprintf function. +# +XSDE_SNPRINTF = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION = y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE = tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC = n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS = 53 +XSDE_PARSER_IMAP_BUCKETS = 97 +XSDE_SERIALIZER_SMAP_BUCKETS = 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS = 53 +XSDE_SERIALIZER_IMAP_BUCKETS = 97 + + +# Options tuning depending on the features selected. +# +!if "$(XSDE_EXCEPTIONS)" == "y" +CFLAGS = $(CFLAGS) /EHs +CXXFLAGS = $(CXXFLAGS) /EHs +!endif diff --git a/dist/etc/vc-9.0/config-min.nmake b/dist/etc/vc-9.0/config-min.nmake new file mode 100644 index 0000000..c085f97 --- /dev/null +++ b/dist/etc/vc-9.0/config-min.nmake @@ -0,0 +1,139 @@ +# Sample configuration file for Windows CE 4.2 on ARMv4 using Visual Studio +# 2008 with Smart Devices support. This is a minimal configuration with STL, +# iostream, RTTI, and C++ exceptions disabled. See config-max.nmake for the +# a configuration with all these options enabled. +# + +# Toolchain. +# +CC = cl.exe +CFLAGS = /nologo /W3 /O1 /MT /GS- +CPPFLAGS = /DARM /D_ARM /DUNDER_CE /DWINCE /D_WIN32_WCE=0x420 + +CXX = cl.exe +CXXFLAGS = /nologo /W3 /O1 /GR- /MT /GS- + +LD = link.exe +LDFLAGS = /nologo /entry:main /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE +LIBS = coredll.lib corelibc.lib /nodefaultlib:oldnames.lib + +AR = lib.exe +ARFLAGS = /nologo + + +# Common XSD/e flags. +# +XSDFLAGS = --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM = wince + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH = 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER = l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL = n + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM = n + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS = n + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG = n + + +# Set to 'n' if your platform doesn't have the _snprintf function. +# +XSDE_SNPRINTF = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION = y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION = y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE = tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC = n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS = 53 +XSDE_PARSER_IMAP_BUCKETS = 97 +XSDE_SERIALIZER_SMAP_BUCKETS = 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS = 53 +XSDE_SERIALIZER_IMAP_BUCKETS = 97 + + +# Options tuning depending on the features selected. +# +!if "$(XSDE_EXCEPTIONS)" == "y" +CFLAGS = $(CFLAGS) /EHs +CXXFLAGS = $(CXXFLAGS) /EHs +!endif diff --git a/dist/etc/vc-9.0/vcvarssd.bat b/dist/etc/vc-9.0/vcvarssd.bat new file mode 100755 index 0000000..0481a12 --- /dev/null +++ b/dist/etc/vc-9.0/vcvarssd.bat @@ -0,0 +1,39 @@ +@echo off +REM +REM This .bat file sets the environment variables for Visual Studio +REM 2008 Smart Devices toolchain to allow compilation from the command +REM line or with nmake. Make sure the following four variables are +REM set to the correct values. +REM + +REM +REM Make sure VSINSTALLDIR points to the Visual Studio 2008 installation +REM directory. +REM +SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0 + +REM +REM Set the toolchain to use. See VSINSTALLDIR\VC\ce\bin for possible +REM values. +REM +SET TOOLCHAIN=x86_arm + +REM +REM C/C++ runtime to use. See VSINSTALLDIR\VC\ce\lib for possible +REM values. +REM +SET RUNTIME=armv4 + +REM +REM Platform SDK to use. See VSINSTALLDIR\SmartDevices\SDK for +REM what's available (normally PocketPC2003 and Smartphone2003). +REM +SET SDK=PocketPC2003 + +title Visual Studio 2008 Smart Devices Environment for %SDK% on %RUNTIME% +echo Setting environment for Visual Studio 2008 Smart Devices. + +SET VCINSTALLDIR=%VSINSTALLDIR%\VC +SET PATH=%VCINSTALLDIR%\ce\BIN\%TOOLCHAIN%;%VCINSTALLDIR%\BIN;%VSINSTALLDIR%\Common7\IDE;%VSINSTALLDIR%\Common7\Tools;%VSINSTALLDIR%\Common7\Tools\bin;%PATH% +SET INCLUDE=%VCINSTALLDIR%\CE\ATLMFC\INCLUDE;%VCINSTALLDIR%\CE\INCLUDE;%VSINSTALLDIR%\SmartDevices\SDK\%SDK%\include;%INCLUDE% +SET LIB=%VCINSTALLDIR%\CE\ATLMFC\LIB\%RUNTIME%;%VCINSTALLDIR%\CE\LIB\%RUNTIME%;%VSINSTALLDIR%\SmartDevices\SDK\%SDK%\lib\%RUNTIME%;%LIB% diff --git a/dist/etc/vxworks/config-5.5.1.make b/dist/etc/vxworks/config-5.5.1.make new file mode 100644 index 0000000..2de4676 --- /dev/null +++ b/dist/etc/vxworks/config-5.5.1.make @@ -0,0 +1,141 @@ +# Sample configuration file for VxWorks 5.5.1 on PowerPC 603 using +# Tornado 2.2 GNU toolchain. While this configuration disables STL +# and C++ exceptions, those are supported on VxWorks and can be +# enabled. +# + +# Toolchain. +# +CC := ccppc +CFLAGS := -W -Wall -O3 -mlongcall -mcpu=603 -mstrict-align -ansi -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -fsigned-char +CPPFLAGS := + +CXX := ccppc +CXXFLAGS := -W -Wall -O3 -mlongcall -mcpu=603 -mstrict-align -ansi -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -fsigned-char + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) -r -nostdlib -Wl,-X +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := arppc +ARFLAGS := rc +RANLIB := ranlibppc + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := b + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := n + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := n + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := n + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := n + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := n + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/vxworks/config-max-6.4.make b/dist/etc/vxworks/config-max-6.4.make new file mode 100644 index 0000000..5aa80e8 --- /dev/null +++ b/dist/etc/vxworks/config-max-6.4.make @@ -0,0 +1,152 @@ +# Sample configuration file for VxWorks 6.4 on Pentium using the +# GNU toolchain. This configuration enables STL, iostream, and +# C++ exceptions which can be disabled if not required. +# +# Note that iostream support requires static initialization so +# you will need to 'munch' the examples (and your application) +# before you can run them. Here are the sample step that are +# needed to run the C++/Hybrid 'library' example: +# +# $ cd examples/cxx/hybrid/library/ +# $ make +# $ mv driver partial-image.o +# $ nmpentium *.o | tclsh .../vxworks-6.4/host/resource/hutils/tcl/munch.tcl -c pentium > ctdt.c +# $ ccpentium -O3 -c -fdollars-in-identifiers -fno-zero-initialized-in-bss ctdt.c -o ctdt.o +# $ ccpentium -O3 partial-image.o ctdt.o -o driver +# + +# Toolchain. +# +CC := ccpentium +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := ccpentium +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := arpentium +ARFLAGS := rc +RANLIB := ranlibpentium + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := y + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := y + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := y + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := n + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := n + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif diff --git a/dist/etc/vxworks/config-min-6.4.make b/dist/etc/vxworks/config-min-6.4.make new file mode 100644 index 0000000..522771f --- /dev/null +++ b/dist/etc/vxworks/config-min-6.4.make @@ -0,0 +1,140 @@ +# Sample configuration file for VxWorks 6.4 on Pentium using the +# GNU toolchain. This configuration disables STL, iostream, and +# C++ exceptions which can be enabled if required. +# + +# Toolchain. +# +CC := ccpentium +CFLAGS := -W -Wall -O3 +CPPFLAGS := + +CXX := ccpentium +CXXFLAGS := -W -Wall -O3 + +LD := $(CXX) +LDFLAGS := $(CXXFLAGS) +LIBS := + +# Set RANLIB to empty if your system does not need ranlib. +# +AR := arpentium +ARFLAGS := rc +RANLIB := ranlibpentium + + +# Common XSD/e flags. +# +XSDFLAGS := --generate-inline + + +# Platform. Valid values are: +# +# 'wince' - Windows CE +# 'win32' - Windows 2000, XP, etc. +# 'posix' - POSIX OS, including UNIX/Linux, VxWorks, etc. +# +XSDE_PLATFORM := posix + + +# Platform architecture width in bits. +# +XSDE_ARCH_WIDTH := 32 + + +# Platform byte order. Valid values are 'b' for big-endian +# and 'l' for little-endian. +# +XSDE_BYTEORDER := l + + +# Set to 'n' if you don't have STL (std::string, etc.). Also don't +# forget to use the --no-stl option when compiling your schemas. +# +XSDE_STL := n + + +# Set to 'n' if you don't have iostream. +# +XSDE_IOSTREAM := n + + +# Set to 'n' if you don't have C++ exceptions. Also don't forget to +# use the --no-exceptions option when compiling your schemas. +# +XSDE_EXCEPTIONS := n + + +# Set to 'n' if your platform doesn't have the "long long int" type or +# the strtoull function. Also don't forget to use the --no-long-long +# option when compiling your schemas. +# +XSDE_LONGLONG := n + + +# Set to 'n' if your platform doesn't have the snprintf function. +# +XSDE_SNPRINTF := n + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Parser. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_PARSER_VALIDATION := y + + +# Set to 'n' if you don't want support for XML Schema validation in +# C++/Serializer. Also don't forget to use the --suppress-validation +# option when compiling your schemas. +# +XSDE_SERIALIZER_VALIDATION := y + + +# Base parser/serializer implementation reuse style. Valid values are: +# +# 'mixin' - virtual inheritance-based reuse (specify --reuse-style-mixin) +# 'tiein' - delegation-based reuse (recommended) +# 'none' - no reuse support (specify --reuse-style-none) +# +XSDE_REUSE_STYLE := tiein + + +# Set to 'y' if you need to handle XML vocabularies that use XML Schema +# polymorphism (xsi:type or substitution groups). Also don't forget to +# use either --generate-polymorphic (generates polymorphism-aware code) +# or --runtime-polymorphic (generates non-polymorphic code that uses the +# runtime library configured with polymorphism support). Note that support +# for XML Schema polymorphism requires runtime static initialization +# support in the C++ compiler (that is, support for automatic calling +# of constructors for static objects). Furthermore, if the mixin reuse +# style is used (XSDE_REUSE_STYLE) then the generated code requires +# support for dynamic_cast. +# +XSDE_POLYMORPHIC := n + + +# When polymorphism support is enabled (XSDE_POLYMORPHIC), the following +# parameters control the substitution and inheritance hashmaps bucket +# allocation. Because the number of elements in these hashmaps depends +# on the schemas being compiled and thus is fairly static, these hashmaps +# do not perform automatic table resizing. To obtain good performance the +# elements to buckets ratio should be between 0.7 and 0.9. The recommended +# way to ensure this range is to add diagnostics code to your application +# as shown in the documentation and examples. It is also a good idea to +# use prime numbers for bucket counts: 53 97 193 389 769 1543 3079 6151 +# 12289 24593 49157 98317 196613 393241. Inheritance hashmaps are only +# used when validation is enabled. +# +XSDE_PARSER_SMAP_BUCKETS := 53 +XSDE_PARSER_IMAP_BUCKETS := 97 +XSDE_SERIALIZER_SMAP_BUCKETS := 53 +XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 +XSDE_SERIALIZER_IMAP_BUCKETS := 97 + + +# Options tuning depending on the features selected. +# +ifeq ($(XSDE_EXCEPTIONS),y) +CFLAGS += -fexceptions +endif 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 $@" diff --git a/dist/libxsde/makefile b/dist/libxsde/makefile new file mode 100644 index 0000000..2f1787e --- /dev/null +++ b/dist/libxsde/makefile @@ -0,0 +1,10 @@ +dirs := xsde + +.PHONY: all $(dirs) +all: $(dirs) + +$(dirs): + $(MAKE) -C $@ $(MAKECMDGOALS) + +makefile: ; +% :: $(dirs) ; diff --git a/dist/libxsde/nmakefile b/dist/libxsde/nmakefile new file mode 100644 index 0000000..9ecb241 --- /dev/null +++ b/dist/libxsde/nmakefile @@ -0,0 +1,9 @@ +dirs = xsde + +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/libxsde/xsde/makefile b/dist/libxsde/xsde/makefile new file mode 100644 index 0000000..7ce4bdc --- /dev/null +++ b/dist/libxsde/xsde/makefile @@ -0,0 +1,547 @@ +root := ../.. + +include $(root)/build/config.make +include $(root)/build/c/rules.make +include $(root)/build/cxx/rules.make + +EXTRA_CPPFLAGS := -I.. + +src := c/expat/xmlparse.c c/expat/xmlrole.c c/expat/xmltok.c +src += c/genx/genx.c c/genx/char-props.c + +src += cxx/string.cxx cxx/ro-string.cxx + +ifeq ($(XSDE_STL),n) +src += cxx/strdupx.cxx +endif + +ifeq ($(XSDE_EXCEPTIONS),n) +src += cxx/sys-error.cxx +endif + +ifneq ($(XSDE_PARSER_VALIDATION)$(XSDE_SERIALIZER_VALIDATION),nn) +src += cxx/schema-error.cxx +endif + +ifeq ($(XSDE_POLYMORPHIC),y) +src += cxx/hashmap.cxx +endif + +# Common data types. +# +src += cxx/buffer.cxx cxx/sequence-base.cxx + +ifeq ($(XSDE_STL),y) +src += cxx/string-sequence-stl.cxx +else +src += cxx/qname.cxx cxx/string-sequence.cxx +endif + + +## XML +## +ifneq ($(XSDE_PARSER_VALIDATION)$(XSDE_SERIALIZER_VALIDATION),nn) +src += cxx/xml/char-table.cxx cxx/xml/ncname.cxx +endif + + +## C++/Hybrid +## +src += cxx/hybrid/sequence.cxx + + +## C++/Parser +## +src += cxx/parser/elements.cxx cxx/parser/state.cxx +src += cxx/parser/expat/document.cxx cxx/parser/expat/xml-error.cxx + +ifeq ($(XSDE_POLYMORPHIC),y) +src += cxx/parser/map.cxx cxx/parser/substitution-map.cxx +endif + +ifeq ($(XSDE_EXCEPTIONS),y) +src += cxx/parser/exceptions.cxx +else +src += cxx/parser/error.cxx +endif + +# Parser implementations. +# +ifeq ($(XSDE_PARSER_VALIDATION),y) + +src += \ +cxx/parser/validating/parser.cxx \ +cxx/parser/validating/time-zone.cxx \ +cxx/parser/validating/xml-schema-pskel.cxx + +ifeq ($(XSDE_POLYMORPHIC),y) +src += cxx/parser/validating/inheritance-map.cxx +endif + +src += \ +cxx/parser/validating/boolean.cxx \ +cxx/parser/validating/number.cxx \ +cxx/parser/validating/byte.cxx \ +cxx/parser/validating/unsigned-byte.cxx \ +cxx/parser/validating/short.cxx \ +cxx/parser/validating/unsigned-short.cxx \ +cxx/parser/validating/int.cxx \ +cxx/parser/validating/unsigned-int.cxx \ +cxx/parser/validating/integer.cxx \ +cxx/parser/validating/negative-integer.cxx \ +cxx/parser/validating/non-positive-integer.cxx \ +cxx/parser/validating/positive-integer.cxx \ +cxx/parser/validating/non-negative-integer.cxx \ +cxx/parser/validating/float.cxx \ +cxx/parser/validating/double.cxx \ +cxx/parser/validating/decimal.cxx + +ifeq ($(XSDE_LONGLONG),y) +src += \ +cxx/parser/validating/long-long.cxx \ +cxx/parser/validating/unsigned-long-long.cxx +else +src += \ +cxx/parser/validating/long.cxx \ +cxx/parser/validating/unsigned-long.cxx +endif + +ifeq ($(XSDE_STL),y) + +src += \ +cxx/parser/validating/string-stl.cxx \ +cxx/parser/validating/normalized-string-stl.cxx \ +cxx/parser/validating/token-stl.cxx \ +cxx/parser/validating/name-stl.cxx \ +cxx/parser/validating/nmtoken-stl.cxx \ +cxx/parser/validating/nmtokens-stl.cxx \ +cxx/parser/validating/ncname-stl.cxx \ +cxx/parser/validating/id-stl.cxx \ +cxx/parser/validating/idref-stl.cxx \ +cxx/parser/validating/idrefs-stl.cxx \ +cxx/parser/validating/language-stl.cxx \ +cxx/parser/validating/uri-stl.cxx \ +cxx/parser/validating/qname-stl.cxx + +else + +src += \ +cxx/parser/validating/string.cxx \ +cxx/parser/validating/normalized-string.cxx \ +cxx/parser/validating/token.cxx \ +cxx/parser/validating/name.cxx \ +cxx/parser/validating/nmtoken.cxx \ +cxx/parser/validating/nmtokens.cxx \ +cxx/parser/validating/ncname.cxx \ +cxx/parser/validating/id.cxx \ +cxx/parser/validating/idref.cxx \ +cxx/parser/validating/idrefs.cxx \ +cxx/parser/validating/language.cxx \ +cxx/parser/validating/uri.cxx \ +cxx/parser/validating/qname.cxx + +endif # stl + +src += \ +cxx/parser/validating/base64-binary.cxx \ +cxx/parser/validating/hex-binary.cxx \ +cxx/parser/validating/gday.cxx \ +cxx/parser/validating/gmonth.cxx \ +cxx/parser/validating/gyear.cxx \ +cxx/parser/validating/gmonth-day.cxx \ +cxx/parser/validating/gyear-month.cxx \ +cxx/parser/validating/date.cxx \ +cxx/parser/validating/time.cxx \ +cxx/parser/validating/date-time.cxx \ +cxx/parser/validating/duration.cxx + +else # validation + +src += \ +cxx/parser/non-validating/parser.cxx \ +cxx/parser/non-validating/time-zone.cxx \ +cxx/parser/non-validating/xml-schema-pskel.cxx + +src += \ +cxx/parser/non-validating/boolean.cxx \ +cxx/parser/non-validating/number.cxx \ +cxx/parser/non-validating/byte.cxx \ +cxx/parser/non-validating/unsigned-byte.cxx \ +cxx/parser/non-validating/short.cxx \ +cxx/parser/non-validating/unsigned-short.cxx \ +cxx/parser/non-validating/int.cxx \ +cxx/parser/non-validating/unsigned-int.cxx \ +cxx/parser/non-validating/integer.cxx \ +cxx/parser/non-validating/negative-integer.cxx \ +cxx/parser/non-validating/non-positive-integer.cxx \ +cxx/parser/non-validating/positive-integer.cxx \ +cxx/parser/non-validating/non-negative-integer.cxx \ +cxx/parser/non-validating/float.cxx \ +cxx/parser/non-validating/double.cxx \ +cxx/parser/non-validating/decimal.cxx + +ifeq ($(XSDE_LONGLONG),y) +src += \ +cxx/parser/non-validating/long-long.cxx \ +cxx/parser/non-validating/unsigned-long-long.cxx +else +src += \ +cxx/parser/non-validating/long.cxx \ +cxx/parser/non-validating/unsigned-long.cxx +endif + +ifeq ($(XSDE_STL),y) + +src += \ +cxx/parser/non-validating/string-stl.cxx \ +cxx/parser/non-validating/normalized-string-stl.cxx \ +cxx/parser/non-validating/token-stl.cxx \ +cxx/parser/non-validating/name-stl.cxx \ +cxx/parser/non-validating/nmtoken-stl.cxx \ +cxx/parser/non-validating/nmtokens-stl.cxx \ +cxx/parser/non-validating/ncname-stl.cxx \ +cxx/parser/non-validating/id-stl.cxx \ +cxx/parser/non-validating/idref-stl.cxx \ +cxx/parser/non-validating/idrefs-stl.cxx \ +cxx/parser/non-validating/language-stl.cxx \ +cxx/parser/non-validating/uri-stl.cxx \ +cxx/parser/non-validating/qname-stl.cxx + +else + +src += \ +cxx/parser/non-validating/string.cxx \ +cxx/parser/non-validating/normalized-string.cxx \ +cxx/parser/non-validating/token.cxx \ +cxx/parser/non-validating/name.cxx \ +cxx/parser/non-validating/nmtoken.cxx \ +cxx/parser/non-validating/nmtokens.cxx \ +cxx/parser/non-validating/ncname.cxx \ +cxx/parser/non-validating/id.cxx \ +cxx/parser/non-validating/idref.cxx \ +cxx/parser/non-validating/idrefs.cxx \ +cxx/parser/non-validating/language.cxx \ +cxx/parser/non-validating/uri.cxx \ +cxx/parser/non-validating/qname.cxx + +endif # stl + +src += \ +cxx/parser/non-validating/base64-binary.cxx \ +cxx/parser/non-validating/hex-binary.cxx \ +cxx/parser/non-validating/gday.cxx \ +cxx/parser/non-validating/gmonth.cxx \ +cxx/parser/non-validating/gyear.cxx \ +cxx/parser/non-validating/gmonth-day.cxx \ +cxx/parser/non-validating/gyear-month.cxx \ +cxx/parser/non-validating/date.cxx \ +cxx/parser/non-validating/time.cxx \ +cxx/parser/non-validating/date-time.cxx \ +cxx/parser/non-validating/duration.cxx + +endif # validation + + +## C++/Serializer +## +src += cxx/serializer/elements.cxx cxx/serializer/context.cxx +src += cxx/serializer/genx/document.cxx cxx/serializer/genx/xml-error.cxx + +ifeq ($(XSDE_POLYMORPHIC),y) +src += cxx/serializer/map.cxx cxx/serializer/substitution-map.cxx +endif + +ifeq ($(XSDE_EXCEPTIONS),y) +src += cxx/serializer/exceptions.cxx +else +src += cxx/serializer/error.cxx +endif + +# Serializer implementations. +# +ifeq ($(XSDE_SERIALIZER_VALIDATION),y) + +src += \ +cxx/serializer/validating/serializer.cxx \ +cxx/serializer/validating/time-zone.cxx \ +cxx/serializer/validating/xml-schema-sskel.cxx + +ifeq ($(XSDE_POLYMORPHIC),y) +src += cxx/serializer/validating/inheritance-map.cxx +endif + +src += \ +cxx/serializer/validating/boolean.cxx \ +cxx/serializer/validating/byte.cxx \ +cxx/serializer/validating/unsigned-byte.cxx \ +cxx/serializer/validating/short.cxx \ +cxx/serializer/validating/unsigned-short.cxx \ +cxx/serializer/validating/int.cxx \ +cxx/serializer/validating/unsigned-int.cxx \ +cxx/serializer/validating/integer.cxx \ +cxx/serializer/validating/negative-integer.cxx \ +cxx/serializer/validating/non-positive-integer.cxx \ +cxx/serializer/validating/positive-integer.cxx \ +cxx/serializer/validating/non-negative-integer.cxx \ +cxx/serializer/validating/float.cxx \ +cxx/serializer/validating/double.cxx \ +cxx/serializer/validating/decimal.cxx + +ifeq ($(XSDE_LONGLONG),y) +src += \ +cxx/serializer/validating/long-long.cxx \ +cxx/serializer/validating/unsigned-long-long.cxx +else +src += \ +cxx/serializer/validating/long.cxx \ +cxx/serializer/validating/unsigned-long.cxx +endif + +ifeq ($(XSDE_STL),y) + +src += \ +cxx/serializer/validating/string-stl.cxx \ +cxx/serializer/validating/normalized-string-stl.cxx \ +cxx/serializer/validating/token-stl.cxx \ +cxx/serializer/validating/name-stl.cxx \ +cxx/serializer/validating/nmtoken-stl.cxx \ +cxx/serializer/validating/ncname-stl.cxx \ +cxx/serializer/validating/id-stl.cxx \ +cxx/serializer/validating/idref-stl.cxx \ +cxx/serializer/validating/language-stl.cxx \ +cxx/serializer/validating/uri-stl.cxx \ +cxx/serializer/validating/idrefs-stl.cxx \ +cxx/serializer/validating/nmtokens-stl.cxx \ +cxx/serializer/validating/qname-stl.cxx + +else + +src += \ +cxx/serializer/validating/string.cxx \ +cxx/serializer/validating/normalized-string.cxx \ +cxx/serializer/validating/token.cxx \ +cxx/serializer/validating/name.cxx \ +cxx/serializer/validating/nmtoken.cxx \ +cxx/serializer/validating/ncname.cxx \ +cxx/serializer/validating/id.cxx \ +cxx/serializer/validating/idref.cxx \ +cxx/serializer/validating/language.cxx \ +cxx/serializer/validating/uri.cxx \ +cxx/serializer/validating/idrefs.cxx \ +cxx/serializer/validating/nmtokens.cxx \ +cxx/serializer/validating/qname.cxx + +endif # stl + +src += \ +cxx/serializer/validating/base64-binary.cxx \ +cxx/serializer/validating/hex-binary.cxx \ +cxx/serializer/validating/gday.cxx \ +cxx/serializer/validating/gmonth.cxx \ +cxx/serializer/validating/gyear.cxx \ +cxx/serializer/validating/gmonth-day.cxx \ +cxx/serializer/validating/gyear-month.cxx \ +cxx/serializer/validating/date.cxx \ +cxx/serializer/validating/time.cxx \ +cxx/serializer/validating/date-time.cxx \ +cxx/serializer/validating/duration.cxx + +else # validation + +src += \ +cxx/serializer/non-validating/serializer.cxx \ +cxx/serializer/non-validating/time-zone.cxx \ +cxx/serializer/non-validating/xml-schema-sskel.cxx + +src += \ +cxx/serializer/non-validating/boolean.cxx \ +cxx/serializer/non-validating/byte.cxx \ +cxx/serializer/non-validating/unsigned-byte.cxx \ +cxx/serializer/non-validating/short.cxx \ +cxx/serializer/non-validating/unsigned-short.cxx \ +cxx/serializer/non-validating/int.cxx \ +cxx/serializer/non-validating/unsigned-int.cxx \ +cxx/serializer/non-validating/integer.cxx \ +cxx/serializer/non-validating/negative-integer.cxx \ +cxx/serializer/non-validating/non-positive-integer.cxx \ +cxx/serializer/non-validating/positive-integer.cxx \ +cxx/serializer/non-validating/non-negative-integer.cxx \ +cxx/serializer/non-validating/float.cxx \ +cxx/serializer/non-validating/double.cxx \ +cxx/serializer/non-validating/decimal.cxx + +ifeq ($(XSDE_LONGLONG),y) +src += \ +cxx/serializer/non-validating/long-long.cxx \ +cxx/serializer/non-validating/unsigned-long-long.cxx +else +src += \ +cxx/serializer/non-validating/long.cxx \ +cxx/serializer/non-validating/unsigned-long.cxx +endif + +ifeq ($(XSDE_STL),y) + +src += \ +cxx/serializer/non-validating/string-stl.cxx \ +cxx/serializer/non-validating/normalized-string-stl.cxx \ +cxx/serializer/non-validating/token-stl.cxx \ +cxx/serializer/non-validating/name-stl.cxx \ +cxx/serializer/non-validating/nmtoken-stl.cxx \ +cxx/serializer/non-validating/ncname-stl.cxx \ +cxx/serializer/non-validating/id-stl.cxx \ +cxx/serializer/non-validating/idref-stl.cxx \ +cxx/serializer/non-validating/language-stl.cxx \ +cxx/serializer/non-validating/uri-stl.cxx \ +cxx/serializer/non-validating/idrefs-stl.cxx \ +cxx/serializer/non-validating/nmtokens-stl.cxx \ +cxx/serializer/non-validating/qname-stl.cxx + +else + +src += \ +cxx/serializer/non-validating/string.cxx \ +cxx/serializer/non-validating/normalized-string.cxx \ +cxx/serializer/non-validating/token.cxx \ +cxx/serializer/non-validating/name.cxx \ +cxx/serializer/non-validating/nmtoken.cxx \ +cxx/serializer/non-validating/ncname.cxx \ +cxx/serializer/non-validating/id.cxx \ +cxx/serializer/non-validating/idref.cxx \ +cxx/serializer/non-validating/language.cxx \ +cxx/serializer/non-validating/uri.cxx \ +cxx/serializer/non-validating/idrefs.cxx \ +cxx/serializer/non-validating/nmtokens.cxx \ +cxx/serializer/non-validating/qname.cxx + +endif # stl + +src += \ +cxx/serializer/non-validating/base64-binary.cxx \ +cxx/serializer/non-validating/hex-binary.cxx \ +cxx/serializer/non-validating/gday.cxx \ +cxx/serializer/non-validating/gmonth.cxx \ +cxx/serializer/non-validating/gyear.cxx \ +cxx/serializer/non-validating/gmonth-day.cxx \ +cxx/serializer/non-validating/gyear-month.cxx \ +cxx/serializer/non-validating/date.cxx \ +cxx/serializer/non-validating/time.cxx \ +cxx/serializer/non-validating/date-time.cxx \ +cxx/serializer/non-validating/duration.cxx + +endif # validation + +# +# +obj := $(src:.c=.o) +obj := $(obj:.cxx=.o) + +# Build. +# +libxsde.a: $(obj) + $(AR) $(ARFLAGS) $@ $^ +ifneq ($(RANLIB),) + $(RANLIB) $@ +endif + +# It is tricky to output # with both POSIX and Windows shells. +# +ifeq ($(shell echo %PATH%),%PATH%) +h := \\\# +shell_type := posix +else +h := \# +shell_type := windows +endif + +$(obj): config.h + +config.h: + @echo generating config.h +ifeq ($(shell_type),windows) + @echo /* Generated - do not edit. */ >$@ +else + @echo "/* Generated - do not edit. */" >$@ +endif + @echo $(h)ifndef XSDE_CONFIG_H >>$@ + @echo $(h)define XSDE_CONFIG_H >>$@ +ifeq ($(XSDE_PLATFORM),wince) + @echo $(h)define XSDE_PLATFORM_WINCE >>$@ +endif +ifeq ($(XSDE_PLATFORM),win32) + @echo $(h)define XSDE_PLATFORM_WIN32 >>$@ +endif +ifeq ($(XSDE_PLATFORM),posix) + @echo $(h)define XSDE_PLATFORM_POSIX >>$@ +endif + @echo $(h)define XSDE_ARCH_WIDTH $(XSDE_ARCH_WIDTH) >>$@ +ifeq ($(XSDE_BYTEORDER),l) + @echo $(h)define XSDE_BYTEORDER 1234 >>$@ +endif +ifeq ($(XSDE_BYTEORDER),b) + @echo $(h)define XSDE_BYTEORDER 4321 >>$@ +endif +ifeq ($(XSDE_STL),y) + @echo $(h)define XSDE_STL >>$@ +endif +ifeq ($(XSDE_IOSTREAM),y) + @echo $(h)define XSDE_IOSTREAM >>$@ +endif +ifeq ($(XSDE_EXCEPTIONS),y) + @echo $(h)define XSDE_EXCEPTIONS >>$@ +endif +ifeq ($(XSDE_LONGLONG),y) + @echo $(h)define XSDE_LONGLONG >>$@ +endif +ifeq ($(XSDE_SNPRINTF),y) + @echo $(h)define XSDE_SNPRINTF >>$@ +endif +ifeq ($(XSDE_PARSER_VALIDATION),y) + @echo $(h)define XSDE_PARSER_VALIDATION >>$@ +endif +ifeq ($(XSDE_SERIALIZER_VALIDATION),y) + @echo $(h)define XSDE_SERIALIZER_VALIDATION >>$@ +endif +ifeq ($(XSDE_REUSE_STYLE),mixin) + @echo $(h)define XSDE_REUSE_STYLE_MIXIN >>$@ +else + @echo $(h)undef XSDE_REUSE_STYLE_MIXIN >>$@ +endif +ifeq ($(XSDE_REUSE_STYLE),tiein) + @echo $(h)define XSDE_REUSE_STYLE_TIEIN >>$@ +else + @echo $(h)undef XSDE_REUSE_STYLE_TIEIN >>$@ +endif +ifeq ($(XSDE_REUSE_STYLE),none) + @echo $(h)define XSDE_REUSE_STYLE_NONE >>$@ +else + @echo $(h)undef XSDE_REUSE_STYLE_NONE >>$@ +endif +ifeq ($(XSDE_POLYMORPHIC),y) + @echo $(h)define XSDE_POLYMORPHIC >>$@ + @echo $(h)define XSDE_PARSER_SMAP_BUCKETS $(XSDE_PARSER_SMAP_BUCKETS)UL >>$@ +ifeq ($(XSDE_PARSER_VALIDATION),y) + @echo $(h)define XSDE_PARSER_IMAP_BUCKETS $(XSDE_PARSER_IMAP_BUCKETS)UL >>$@ +endif + @echo $(h)define XSDE_SERIALIZER_SMAP_BUCKETS $(XSDE_SERIALIZER_SMAP_BUCKETS)UL >>$@ + @echo $(h)define XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS $(XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS)UL >>$@ +ifeq ($(XSDE_SERIALIZER_VALIDATION),y) + @echo $(h)define XSDE_SERIALIZER_IMAP_BUCKETS $(XSDE_SERIALIZER_IMAP_BUCKETS)UL >>$@ +endif +else + @echo $(h)undef XSDE_POLYMORPHIC >>$@ +endif + @echo $(h)endif >>$@ + + +# Test. +# +.PHONY: test +test: libxsde.a + @: + +# Clean. +# +.PHONY: clean +clean: + rm -f libxsde.a $(obj) config.h diff --git a/dist/libxsde/xsde/nmakefile b/dist/libxsde/xsde/nmakefile new file mode 100644 index 0000000..5588d57 --- /dev/null +++ b/dist/libxsde/xsde/nmakefile @@ -0,0 +1,559 @@ +root = ..\.. + +!include $(root)\build\config.nmake +!include $(root)\build\c\rules.nmake +!include $(root)\build\cxx\rules.nmake + +EXTRA_CPPFLAGS = /I.. + +######################################################################### + +src = c\expat\xmlparse.c c\expat\xmlrole.c c\expat\xmltok.c +src = $(src) c\genx\genx.c c\genx\char-props.c + +src = $(src) cxx\string.cxx cxx\ro-string.cxx + +!if "$(XSDE_STL)" == "n" +src = $(src) cxx\strdupx.cxx +!endif + +!if "$(XSDE_EXCEPTIONS)" == "n" +src = $(src) cxx\sys-error.cxx +!endif + +!if "$(XSDE_PARSER_VALIDATION)$(XSDE_SERIALIZER_VALIDATION)" != "nn" +src = $(src) cxx\schema-error.cxx +!endif + +!if "$(XSDE_POLYMORPHIC)" == "y" +src = $(src) cxx\hashmap.cxx +!endif + +# Common data types. +# +src = $(src) cxx\buffer.cxx cxx\sequence-base.cxx + +!if "$(XSDE_STL)" == "y" +src = $(src) cxx\string-sequence-stl.cxx +!else +src = $(src) cxx\qname.cxx cxx\string-sequence.cxx +!endif + + +## XML +## +!if "$(XSDE_PARSER_VALIDATION)$(XSDE_SERIALIZER_VALIDATION)" != "nn" +src = $(src) cxx\xml\char-table.cxx cxx\xml\ncname.cxx +!endif + + +## C++/Hybrid +## +src = $(src) cxx\hybrid\sequence.cxx + + +## C++/Parser +## +src = $(src) cxx\parser\elements.cxx cxx\parser\state.cxx +src = $(src) cxx\parser\expat\document.cxx cxx\parser\expat\xml-error.cxx + +!if "$(XSDE_POLYMORPHIC)" == "y" +src = $(src) cxx\parser\map.cxx cxx\parser\substitution-map.cxx +!endif + +!if "$(XSDE_EXCEPTIONS)" == "y" +src = $(src) cxx\parser\exceptions.cxx +!else +src = $(src) cxx\parser\error.cxx +!endif + +# Parser implementations. +# +!if "$(XSDE_PARSER_VALIDATION)" == "y" + +src = $(src) \ +cxx\parser\validating\parser.cxx \ +cxx\parser\validating\time-zone.cxx \ +cxx\parser\validating\xml-schema-pskel.cxx + +!if "$(XSDE_POLYMORPHIC)" == "y" +src = $(src) cxx\parser\validating\inheritance-map.cxx +!endif + +src = $(src) \ +cxx\parser\validating\boolean.cxx \ +cxx\parser\validating\number.cxx \ +cxx\parser\validating\byte.cxx \ +cxx\parser\validating\unsigned-byte.cxx \ +cxx\parser\validating\short.cxx \ +cxx\parser\validating\unsigned-short.cxx \ +cxx\parser\validating\int.cxx \ +cxx\parser\validating\unsigned-int.cxx \ +cxx\parser\validating\integer.cxx \ +cxx\parser\validating\negative-integer.cxx \ +cxx\parser\validating\non-positive-integer.cxx \ +cxx\parser\validating\positive-integer.cxx \ +cxx\parser\validating\non-negative-integer.cxx \ +cxx\parser\validating\float.cxx \ +cxx\parser\validating\double.cxx \ +cxx\parser\validating\decimal.cxx + +!if "$(XSDE_LONGLONG)" == "y" +src = $(src) \ +cxx\parser\validating\long-long.cxx \ +cxx\parser\validating\unsigned-long-long.cxx +!else +src = $(src) \ +cxx\parser\validating\long.cxx \ +cxx\parser\validating\unsigned-long.cxx +!endif + +!if "$(XSDE_STL)" == "y" + +src = $(src) \ +cxx\parser\validating\string-stl.cxx \ +cxx\parser\validating\normalized-string-stl.cxx \ +cxx\parser\validating\token-stl.cxx \ +cxx\parser\validating\name-stl.cxx \ +cxx\parser\validating\nmtoken-stl.cxx \ +cxx\parser\validating\nmtokens-stl.cxx \ +cxx\parser\validating\ncname-stl.cxx \ +cxx\parser\validating\id-stl.cxx \ +cxx\parser\validating\idref-stl.cxx \ +cxx\parser\validating\idrefs-stl.cxx \ +cxx\parser\validating\language-stl.cxx \ +cxx\parser\validating\uri-stl.cxx \ +cxx\parser\validating\qname-stl.cxx + +!else + +src = $(src) \ +cxx\parser\validating\string.cxx \ +cxx\parser\validating\normalized-string.cxx \ +cxx\parser\validating\token.cxx \ +cxx\parser\validating\name.cxx \ +cxx\parser\validating\nmtoken.cxx \ +cxx\parser\validating\nmtokens.cxx \ +cxx\parser\validating\ncname.cxx \ +cxx\parser\validating\id.cxx \ +cxx\parser\validating\idref.cxx \ +cxx\parser\validating\idrefs.cxx \ +cxx\parser\validating\language.cxx \ +cxx\parser\validating\uri.cxx \ +cxx\parser\validating\qname.cxx + +!endif # stl + +src = $(src) \ +cxx\parser\validating\base64-binary.cxx \ +cxx\parser\validating\hex-binary.cxx \ +cxx\parser\validating\gday.cxx \ +cxx\parser\validating\gmonth.cxx \ +cxx\parser\validating\gyear.cxx \ +cxx\parser\validating\gmonth-day.cxx \ +cxx\parser\validating\gyear-month.cxx \ +cxx\parser\validating\date.cxx \ +cxx\parser\validating\time.cxx \ +cxx\parser\validating\date-time.cxx \ +cxx\parser\validating\duration.cxx + +!else # validation + +src = $(src) \ +cxx\parser\non-validating\parser.cxx \ +cxx\parser\non-validating\time-zone.cxx \ +cxx\parser\non-validating\xml-schema-pskel.cxx + +src = $(src) \ +cxx\parser\non-validating\boolean.cxx \ +cxx\parser\non-validating\number.cxx \ +cxx\parser\non-validating\byte.cxx \ +cxx\parser\non-validating\unsigned-byte.cxx \ +cxx\parser\non-validating\short.cxx \ +cxx\parser\non-validating\unsigned-short.cxx \ +cxx\parser\non-validating\int.cxx \ +cxx\parser\non-validating\unsigned-int.cxx \ +cxx\parser\non-validating\integer.cxx \ +cxx\parser\non-validating\negative-integer.cxx \ +cxx\parser\non-validating\non-positive-integer.cxx \ +cxx\parser\non-validating\positive-integer.cxx \ +cxx\parser\non-validating\non-negative-integer.cxx \ +cxx\parser\non-validating\float.cxx \ +cxx\parser\non-validating\double.cxx \ +cxx\parser\non-validating\decimal.cxx + +!if "$(XSDE_LONGLONG)" == "y" +src = $(src) \ +cxx\parser\non-validating\long-long.cxx \ +cxx\parser\non-validating\unsigned-long-long.cxx +!else +src = $(src) \ +cxx\parser\non-validating\long.cxx \ +cxx\parser\non-validating\unsigned-long.cxx +!endif + +!if "$(XSDE_STL)" == "y" + +src = $(src) \ +cxx\parser\non-validating\string-stl.cxx \ +cxx\parser\non-validating\normalized-string-stl.cxx \ +cxx\parser\non-validating\token-stl.cxx \ +cxx\parser\non-validating\name-stl.cxx \ +cxx\parser\non-validating\nmtoken-stl.cxx \ +cxx\parser\non-validating\nmtokens-stl.cxx \ +cxx\parser\non-validating\ncname-stl.cxx \ +cxx\parser\non-validating\id-stl.cxx \ +cxx\parser\non-validating\idref-stl.cxx \ +cxx\parser\non-validating\idrefs-stl.cxx \ +cxx\parser\non-validating\language-stl.cxx \ +cxx\parser\non-validating\uri-stl.cxx \ +cxx\parser\non-validating\qname-stl.cxx + +!else + +src = $(src) \ +cxx\parser\non-validating\string.cxx \ +cxx\parser\non-validating\normalized-string.cxx \ +cxx\parser\non-validating\token.cxx \ +cxx\parser\non-validating\name.cxx \ +cxx\parser\non-validating\nmtoken.cxx \ +cxx\parser\non-validating\nmtokens.cxx \ +cxx\parser\non-validating\ncname.cxx \ +cxx\parser\non-validating\id.cxx \ +cxx\parser\non-validating\idref.cxx \ +cxx\parser\non-validating\idrefs.cxx \ +cxx\parser\non-validating\language.cxx \ +cxx\parser\non-validating\uri.cxx \ +cxx\parser\non-validating\qname.cxx + +!endif # stl + +src = $(src) \ +cxx\parser\non-validating\base64-binary.cxx \ +cxx\parser\non-validating\hex-binary.cxx \ +cxx\parser\non-validating\gday.cxx \ +cxx\parser\non-validating\gmonth.cxx \ +cxx\parser\non-validating\gyear.cxx \ +cxx\parser\non-validating\gmonth-day.cxx \ +cxx\parser\non-validating\gyear-month.cxx \ +cxx\parser\non-validating\date.cxx \ +cxx\parser\non-validating\time.cxx \ +cxx\parser\non-validating\date-time.cxx \ +cxx\parser\non-validating\duration.cxx + +!endif # validation + + +## C++/Serializer +## +src = $(src) \ +cxx\serializer\elements.cxx \ +cxx\serializer\context.cxx + +src = $(src) \ +cxx\serializer\genx\document.cxx \ +cxx\serializer\genx\xml-error.cxx + +!if "$(XSDE_POLYMORPHIC)" == "y" +src = $(src) cxx\serializer\map.cxx cxx\serializer\substitution-map.cxx +!endif + +!if "$(XSDE_EXCEPTIONS)" == "y" +src = $(src) cxx\serializer\exceptions.cxx +!else +src = $(src) cxx\serializer\error.cxx +!endif + +# Serializer implementations. +# +!if "$(XSDE_SERIALIZER_VALIDATION)" == "y" + +src = $(src) \ +cxx\serializer\validating\serializer.cxx \ +cxx\serializer\validating\time-zone.cxx \ +cxx\serializer\validating\xml-schema-sskel.cxx + +!if "$(XSDE_POLYMORPHIC)" == "y" +src = $(src) cxx\serializer\validating\inheritance-map.cxx +!endif + +src = $(src) \ +cxx\serializer\validating\boolean.cxx \ +cxx\serializer\validating\byte.cxx \ +cxx\serializer\validating\unsigned-byte.cxx \ +cxx\serializer\validating\short.cxx \ +cxx\serializer\validating\unsigned-short.cxx \ +cxx\serializer\validating\int.cxx \ +cxx\serializer\validating\unsigned-int.cxx \ +cxx\serializer\validating\integer.cxx \ +cxx\serializer\validating\negative-integer.cxx \ +cxx\serializer\validating\non-positive-integer.cxx \ +cxx\serializer\validating\positive-integer.cxx \ +cxx\serializer\validating\non-negative-integer.cxx \ +cxx\serializer\validating\float.cxx \ +cxx\serializer\validating\double.cxx \ +cxx\serializer\validating\decimal.cxx + +!if "$(XSDE_LONGLONG)" == "y" +src = $(src) \ +cxx\serializer\validating\long-long.cxx \ +cxx\serializer\validating\unsigned-long-long.cxx +!else +src = $(src) \ +cxx\serializer\validating\long.cxx \ +cxx\serializer\validating\unsigned-long.cxx +!endif + +!if "$(XSDE_STL)" == "y" + +src = $(src) \ +cxx\serializer\validating\string-stl.cxx \ +cxx\serializer\validating\normalized-string-stl.cxx \ +cxx\serializer\validating\token-stl.cxx \ +cxx\serializer\validating\name-stl.cxx \ +cxx\serializer\validating\nmtoken-stl.cxx \ +cxx\serializer\validating\ncname-stl.cxx \ +cxx\serializer\validating\id-stl.cxx \ +cxx\serializer\validating\idref-stl.cxx \ +cxx\serializer\validating\language-stl.cxx \ +cxx\serializer\validating\uri-stl.cxx \ +cxx\serializer\validating\idrefs-stl.cxx \ +cxx\serializer\validating\nmtokens-stl.cxx \ +cxx\serializer\validating\qname-stl.cxx + +!else + +src = $(src) \ +cxx\serializer\validating\string.cxx \ +cxx\serializer\validating\normalized-string.cxx \ +cxx\serializer\validating\token.cxx \ +cxx\serializer\validating\name.cxx \ +cxx\serializer\validating\nmtoken.cxx \ +cxx\serializer\validating\ncname.cxx \ +cxx\serializer\validating\id.cxx \ +cxx\serializer\validating\idref.cxx \ +cxx\serializer\validating\language.cxx \ +cxx\serializer\validating\uri.cxx \ +cxx\serializer\validating\idrefs.cxx \ +cxx\serializer\validating\nmtokens.cxx \ +cxx\serializer\validating\qname.cxx + +!endif # stl + +src = $(src) \ +cxx\serializer\validating\base64-binary.cxx \ +cxx\serializer\validating\hex-binary.cxx \ +cxx\serializer\validating\gday.cxx \ +cxx\serializer\validating\gmonth.cxx \ +cxx\serializer\validating\gyear.cxx \ +cxx\serializer\validating\gmonth-day.cxx \ +cxx\serializer\validating\gyear-month.cxx \ +cxx\serializer\validating\date.cxx \ +cxx\serializer\validating\time.cxx \ +cxx\serializer\validating\date-time.cxx \ +cxx\serializer\validating\duration.cxx + +!else # validation + +src = $(src) \ +cxx\serializer\non-validating\serializer.cxx \ +cxx\serializer\non-validating\time-zone.cxx \ +cxx\serializer\non-validating\xml-schema-sskel.cxx + +src = $(src) \ +cxx\serializer\non-validating\boolean.cxx \ +cxx\serializer\non-validating\byte.cxx \ +cxx\serializer\non-validating\unsigned-byte.cxx \ +cxx\serializer\non-validating\short.cxx \ +cxx\serializer\non-validating\unsigned-short.cxx \ +cxx\serializer\non-validating\int.cxx \ +cxx\serializer\non-validating\unsigned-int.cxx \ +cxx\serializer\non-validating\integer.cxx \ +cxx\serializer\non-validating\negative-integer.cxx \ +cxx\serializer\non-validating\non-positive-integer.cxx \ +cxx\serializer\non-validating\positive-integer.cxx \ +cxx\serializer\non-validating\non-negative-integer.cxx \ +cxx\serializer\non-validating\float.cxx \ +cxx\serializer\non-validating\double.cxx \ +cxx\serializer\non-validating\decimal.cxx + +!if "$(XSDE_LONGLONG)" == "y" +src = $(src) \ +cxx\serializer\non-validating\long-long.cxx \ +cxx\serializer\non-validating\unsigned-long-long.cxx +!else +src = $(src) \ +cxx\serializer\non-validating\long.cxx \ +cxx\serializer\non-validating\unsigned-long.cxx +!endif + +!if "$(XSDE_STL)" == "y" + +src = $(src) \ +cxx\serializer\non-validating\string-stl.cxx \ +cxx\serializer\non-validating\normalized-string-stl.cxx \ +cxx\serializer\non-validating\token-stl.cxx \ +cxx\serializer\non-validating\name-stl.cxx \ +cxx\serializer\non-validating\nmtoken-stl.cxx \ +cxx\serializer\non-validating\ncname-stl.cxx \ +cxx\serializer\non-validating\id-stl.cxx \ +cxx\serializer\non-validating\idref-stl.cxx \ +cxx\serializer\non-validating\language-stl.cxx \ +cxx\serializer\non-validating\uri-stl.cxx \ +cxx\serializer\non-validating\idrefs-stl.cxx \ +cxx\serializer\non-validating\nmtokens-stl.cxx \ +cxx\serializer\non-validating\qname-stl.cxx + +!else + +src = $(src) \ +cxx\serializer\non-validating\string.cxx \ +cxx\serializer\non-validating\normalized-string.cxx \ +cxx\serializer\non-validating\token.cxx \ +cxx\serializer\non-validating\name.cxx \ +cxx\serializer\non-validating\nmtoken.cxx \ +cxx\serializer\non-validating\ncname.cxx \ +cxx\serializer\non-validating\id.cxx \ +cxx\serializer\non-validating\idref.cxx \ +cxx\serializer\non-validating\language.cxx \ +cxx\serializer\non-validating\uri.cxx \ +cxx\serializer\non-validating\idrefs.cxx \ +cxx\serializer\non-validating\nmtokens.cxx \ +cxx\serializer\non-validating\qname.cxx + +!endif # stl + +src = $(src) \ +cxx\serializer\non-validating\base64-binary.cxx \ +cxx\serializer\non-validating\hex-binary.cxx \ +cxx\serializer\non-validating\gday.cxx \ +cxx\serializer\non-validating\gmonth.cxx \ +cxx\serializer\non-validating\gyear.cxx \ +cxx\serializer\non-validating\gmonth-day.cxx \ +cxx\serializer\non-validating\gyear-month.cxx \ +cxx\serializer\non-validating\date.cxx \ +cxx\serializer\non-validating\time.cxx \ +cxx\serializer\non-validating\date-time.cxx \ +cxx\serializer\non-validating\duration.cxx + +!endif # validation + + +# +# +obj = $(src:.cxx=.obj) +obj = $(obj:.c=.obj) + + +# Build. +# +xsde.lib: $(obj) + $(AR) $(ARFLAGS) /OUT:$@ $** +!if "$(RANLIB)" != "" + $(RANLIB) $@ +!endif + +$(obj): config.h + +config.h: + @echo generating config.h + @echo /* Generated - do not edit. */ >$@ + @echo #ifndef XSDE_CONFIG_H >>$@ + @echo #define XSDE_CONFIG_H >>$@ +!if "$(XSDE_PLATFORM)" == "wince" + @echo #define XSDE_PLATFORM_WINCE >>$@ +!endif +!if "$(XSDE_PLATFORM)" == "win32" + @echo #define XSDE_PLATFORM_WIN32 >>$@ +!endif +!if "$(XSDE_PLATFORM)" == "posix" + @echo #define XSDE_PLATFORM_POSIX >>$@ +!endif + @echo #define XSDE_ARCH_WIDTH $(XSDE_ARCH_WIDTH) >>$@ +!if "$(XSDE_BYTEORDER)" == "l" + @echo #define XSDE_BYTEORDER 1234 >>$@ +!endif +!if "$(XSDE_BYTEORDER)" == "b" + @echo #define XSDE_BYTEORDER 4321 >>$@ +!endif +!if "$(XSDE_STL)" == "y" + @echo #define XSDE_STL >>$@ +!endif +!if "$(XSDE_IOSTREAM)" == "y" + @echo #define XSDE_IOSTREAM >>$@ +!endif +!if "$(XSDE_EXCEPTIONS)" == "y" + @echo #define XSDE_EXCEPTIONS >>$@ +!endif +!if "$(XSDE_LONGLONG)" == "y" + @echo #define XSDE_LONGLONG >>$@ +!endif +!if "$(XSDE_SNPRINTF)" == "y" + @echo #define XSDE_SNPRINTF >>$@ +!endif +!if "$(XSDE_PARSER_VALIDATION)" == "y" + @echo #define XSDE_PARSER_VALIDATION >>$@ +!endif +!if "$(XSDE_SERIALIZER_VALIDATION)" == "y" + @echo #define XSDE_SERIALIZER_VALIDATION >>$@ +!endif + +!if "$(XSDE_REUSE_STYLE)" == "mixin" + @echo #define XSDE_REUSE_STYLE_MIXIN >>$@ +!else + @echo #undef XSDE_REUSE_STYLE_MIXIN >>$@ +!endif +!if "$(XSDE_REUSE_STYLE)" == "tiein" + @echo #define XSDE_REUSE_STYLE_TIEIN >>$@ +!else + @echo #undef XSDE_REUSE_STYLE_TIEIN >>$@ +!endif +!if "$(XSDE_REUSE_STYLE)" == "none" + @echo #define XSDE_REUSE_STYLE_NONE >>$@ +!else + @echo #undef XSDE_REUSE_STYLE_NONE >>$@ +!endif +!if "$(XSDE_POLYMORPHIC)" == "y" + @echo #define XSDE_POLYMORPHIC >>$@ + @echo #define XSDE_PARSER_SMAP_BUCKETS $(XSDE_PARSER_SMAP_BUCKETS)UL >>$@ +!if "$(XSDE_PARSER_VALIDATION)" == "y" + @echo #define XSDE_PARSER_IMAP_BUCKETS $(XSDE_PARSER_IMAP_BUCKETS)UL >>$@ +!endif + @echo #define XSDE_SERIALIZER_SMAP_BUCKETS $(XSDE_SERIALIZER_SMAP_BUCKETS)UL >>$@ + @echo #define XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS $(XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS)UL >>$@ +!if "$(XSDE_SERIALIZER_VALIDATION)" == "y" + @echo #define XSDE_SERIALIZER_IMAP_BUCKETS $(XSDE_SERIALIZER_IMAP_BUCKETS)UL >>$@ +!endif +!else + @echo #undef XSDE_POLYMORPHIC >>$@ +!endif + @echo #endif >>$@ + +# Test. +# +test: xsde.lib + +# Clean. +# +# Nmake that comes with eVC++ 4 cannot handle del $(obj) +# because the resulting line is too long. +# +clean: + -del xsde.lib config.h + -del c\expat\*.obj + -del c\genx\*.obj + -del cxx\*.obj + -del cxx\parser\*.obj + -del cxx\parser\expat\*.obj +!if "$(XSDE_PARSER_VALIDATION)" == "y" + -del cxx\parser\validating\*.obj +!else + -del cxx\parser\non-validating\*.obj +!endif + -del cxx\serializer\*.obj + -del cxx\serializer\genx\*.obj +!if "$(XSDE_SERIALIZER_VALIDATION)" == "y" + -del cxx\serializer\validating\*.obj +!else + -del cxx\serializer\non-validating\*.obj +!endif diff --git a/dist/makefile b/dist/makefile new file mode 100644 index 0000000..df44825 --- /dev/null +++ b/dist/makefile @@ -0,0 +1,12 @@ +dirs := libxsde examples + +.PHONY: all $(dirs) +all: $(dirs) + +examples: libxsde + +$(dirs): + $(MAKE) -C $@ $(MAKECMDGOALS) + +makefile: ; +% :: $(dirs) ; diff --git a/dist/nmakefile b/dist/nmakefile new file mode 100644 index 0000000..f532175 --- /dev/null +++ b/dist/nmakefile @@ -0,0 +1,9 @@ +dirs = libxsde examples + +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/documentation/cxx/hybrid/guide/makefile b/documentation/cxx/hybrid/guide/makefile index d476fb9..74cc909 100644 --- a/documentation/cxx/hybrid/guide/makefile +++ b/documentation/cxx/hybrid/guide/makefile @@ -1,12 +1,49 @@ -.PHONY: all -all: cxx-hybrid-e-guide.ps cxx-hybrid-e-guide.pdf +# file : documentation/cxx/hybrid/guide/makefile +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file -cxx-hybrid-e-guide.pdf: cxx-hybrid-e-guide.ps - ps2pdf14 $< +include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make -cxx-hybrid-e-guide.ps: index.xhtml guide.html2ps - html2ps -f guide.html2ps -o $@ $< +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +cleandoc := $(out_base)/.cleandoc -.PHONY: clean -clean: - rm -f cxx-hybrid-e-guide.ps cxx-hybrid-e-guide.pdf +.PHONY: $(default) $(dist) $(dist-win) $(cleandoc) + +# Build. +# +$(default): $(out_base)/cxx-hybrid-e-guide.ps \ + $(out_base)/cxx-hybrid-e-guide.pdf + + +$(out_base)/cxx-hybrid-e-guide.ps: $(src_base)/index.xhtml \ + $(src_base)/figure-1.png \ + $(src_base)/guide.html2ps + $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<) + +$(out_base)/cxx-hybrid-e-guide.pdf: $(out_base)/cxx-hybrid-e-guide.ps + $(call message,ps2pdf $<,ps2pdf14 $< $@) + +# Dist. +# +$(dist): path := $(subst $(src_root)/,,$(src_base)) +$(dist): $(out_base)/cxx-hybrid-e-guide.ps $(out_base)/cxx-hybrid-e-guide.pdf + $(call install-data,$(src_base)/figure-1.png,$(dist_prefix)/$(path)/figure-1.png) + $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml) + $(call install-data,$(out_base)/cxx-hybrid-e-guide.ps,$(dist_prefix)/$(path)/cxx-hybrid-e-guide.ps) + $(call install-data,$(out_base)/cxx-hybrid-e-guide.pdf,$(dist_prefix)/$(path)/cxx-hybrid-e-guide.pdf) + +$(dist-win): $(dist) + + +# Clean. +# +$(cleandoc): + $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-hybrid-e-guide.ps) + $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-hybrid-e-guide.pdf) + +# How to. +# +$(call include,$(bld_root)/install.make) diff --git a/documentation/cxx/makefile b/documentation/cxx/makefile new file mode 100644 index 0000000..2fa5998 --- /dev/null +++ b/documentation/cxx/makefile @@ -0,0 +1,22 @@ +# file : documentation/cxx/makefile +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make + +mappings := hybrid/guide parser/guide serializer/guide + +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +cleandoc := $(out_base)/.cleandoc + +.PHONY: $(default) $(dist) $(dist-win) $(test) $(cleandoc) + +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(mappings))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(mappings))) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(mappings))) +$(cleandoc): $(addprefix $(out_base)/,$(addsuffix /.cleandoc,$(mappings))) + +$(foreach m,$(mappings),$(call import,$(src_base)/$m/makefile)) diff --git a/documentation/cxx/parser/guide/makefile b/documentation/cxx/parser/guide/makefile index 964b626..4b01826 100644 --- a/documentation/cxx/parser/guide/makefile +++ b/documentation/cxx/parser/guide/makefile @@ -1,12 +1,49 @@ -.PHONY: all -all: cxx-parser-e-guide.ps cxx-parser-e-guide.pdf +# file : documentation/cxx/parser/guide/makefile +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file -cxx-parser-e-guide.pdf: cxx-parser-e-guide.ps - ps2pdf14 $< +include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make -cxx-parser-e-guide.ps: index.xhtml guide.html2ps - html2ps -f guide.html2ps -o $@ $< +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +cleandoc := $(out_base)/.cleandoc -.PHONY: clean -clean: - rm -f cxx-parser-e-guide.ps cxx-parser-e-guide.pdf +.PHONY: $(default) $(dist) $(dist-win) $(cleandoc) + +# Build. +# +$(default): $(out_base)/cxx-parser-e-guide.ps \ + $(out_base)/cxx-parser-e-guide.pdf + + +$(out_base)/cxx-parser-e-guide.ps: $(src_base)/index.xhtml \ + $(src_base)/figure-1.png \ + $(src_base)/guide.html2ps + $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<) + +$(out_base)/cxx-parser-e-guide.pdf: $(out_base)/cxx-parser-e-guide.ps + $(call message,ps2pdf $<,ps2pdf14 $< $@) + +# Dist. +# +$(dist): path := $(subst $(src_root)/,,$(src_base)) +$(dist): $(out_base)/cxx-parser-e-guide.ps $(out_base)/cxx-parser-e-guide.pdf + $(call install-data,$(src_base)/figure-1.png,$(dist_prefix)/$(path)/figure-1.png) + $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml) + $(call install-data,$(out_base)/cxx-parser-e-guide.ps,$(dist_prefix)/$(path)/cxx-parser-e-guide.ps) + $(call install-data,$(out_base)/cxx-parser-e-guide.pdf,$(dist_prefix)/$(path)/cxx-parser-e-guide.pdf) + +$(dist-win): $(dist) + + +# Clean +# +$(cleandoc): + $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-parser-e-guide.ps) + $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-parser-e-guide.pdf) + +# How to. +# +$(call include,$(bld_root)/install.make) diff --git a/documentation/cxx/serializer/guide/makefile b/documentation/cxx/serializer/guide/makefile index 8524f4f..9230398 100644 --- a/documentation/cxx/serializer/guide/makefile +++ b/documentation/cxx/serializer/guide/makefile @@ -1,12 +1,49 @@ -.PHONY: all -all: cxx-serializer-e-guide.ps cxx-serializer-e-guide.pdf +# file : documentation/cxx/serializer/guide/makefile +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file -cxx-serializer-e-guide.pdf: cxx-serializer-e-guide.ps - ps2pdf14 $< +include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make -cxx-serializer-e-guide.ps: index.xhtml guide.html2ps - html2ps -f guide.html2ps -o $@ $< +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +cleandoc := $(out_base)/.cleandoc -.PHONY: clean -clean: - rm -f cxx-serializer-e-guide.ps cxx-serializer-e-guide.pdf +.PHONY: $(default) $(dist) $(dist-win) $(cleandoc) + +# Build. +# +$(default): $(out_base)/cxx-serializer-e-guide.ps \ + $(out_base)/cxx-serializer-e-guide.pdf + + +$(out_base)/cxx-serializer-e-guide.ps: $(src_base)/index.xhtml \ + $(src_base)/figure-1.png \ + $(src_base)/guide.html2ps + $(call message,html2ps $<,html2ps -f $(src_base)/guide.html2ps -o $@ $<) + +$(out_base)/cxx-serializer-e-guide.pdf: $(out_base)/cxx-serializer-e-guide.ps + $(call message,ps2pdf $<,ps2pdf14 $< $@) + +# Dist. +# +$(dist): path := $(subst $(src_root)/,,$(src_base)) +$(dist): $(out_base)/cxx-serializer-e-guide.ps $(out_base)/cxx-serializer-e-guide.pdf + $(call install-data,$(src_base)/figure-1.png,$(dist_prefix)/$(path)/figure-1.png) + $(call install-data,$(src_base)/index.xhtml,$(dist_prefix)/$(path)/index.xhtml) + $(call install-data,$(out_base)/cxx-serializer-e-guide.ps,$(dist_prefix)/$(path)/cxx-serializer-e-guide.ps) + $(call install-data,$(out_base)/cxx-serializer-e-guide.pdf,$(dist_prefix)/$(path)/cxx-serializer-e-guide.pdf) + +$(dist-win): $(dist) + + +# Clean. +# +$(cleandoc): + $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-serializer-e-guide.ps) + $(call message,rm $$1,rm -f $$1,$(out_base)/cxx-serializer-e-guide.pdf) + +# How to. +# +$(call include,$(bld_root)/install.make) diff --git a/documentation/makefile b/documentation/makefile index 420cbcc..056e540 100644 --- a/documentation/makefile +++ b/documentation/makefile @@ -5,14 +5,45 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make -install := $(out_base)/.install +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +install := $(out_base)/.install +cleandoc := $(out_base)/.cleandoc -.PHONY: $(install) +.PHONY: $(default) $(dist) $(dist-win) $(install) $(cleandoc) +$(default): $(src_base)/cxx/ + + +# Dist. +# +dist-common := $(out_base)/.dist-common +.PHONY: $(dist-common) + +$(dist-common): + $(call install-data,$(src_base)/default.css,$(dist_prefix)/documentation/default.css) + $(call install-data,$(src_base)/xsde.xhtml,$(dist_prefix)/documentation/xsde.xhtml) + $(call install-data,$(src_base)/xsde.1,$(dist_prefix)/documentation/xsde.1) + +$(dist): $(dist-common) $(src_base)/cxx/.dist +$(dist-win): $(dist-common) $(src_base)/cxx/.dist + + +# Install. +# $(install): $(call install-dir,$(src_base)/cxx,$(install_doc_dir)/xsde/cxx) $(call install-data,$(src_base)/default.css,$(install_doc_dir)/xsde/default.css) $(call install-data,$(src_base)/xsde.xhtml,$(install_doc_dir)/xsde/xsde.xhtml) $(call install-data,$(src_base)/xsde.1,$(install_man_dir)/man1/xsde.1) + +# Clean. +# +$(cleandoc): $(src_base)/cxx/.cleandoc + + $(call include,$(bld_root)/install.make) + +$(call import,$(src_base)/cxx/makefile) diff --git a/examples/cxx/hybrid/compositors/makefile b/examples/cxx/hybrid/compositors/makefile index e436db2..f1694ab 100644 --- a/examples/cxx/hybrid/compositors/makefile +++ b/examples/cxx/hybrid/compositors/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -38,6 +40,26 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/compositors.xsd,$(dist_prefix)/$(path)/compositors.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -66,6 +88,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/filter/makefile b/examples/cxx/hybrid/filter/makefile index 92adbb1..543d175 100644 --- a/examples/cxx/hybrid/filter/makefile +++ b/examples/cxx/hybrid/filter/makefile @@ -21,8 +21,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -53,6 +55,31 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/people-custom-pimpl.hxx,$(dist_prefix)/$(path)/people-custom-pimpl.hxx) + $(call install-data,$(src_base)/people-custom-pimpl.cxx,$(dist_prefix)/$(path)/people-custom-pimpl.cxx) + $(call install-data,$(src_base)/people-custom-simpl.hxx,$(dist_prefix)/$(path)/people-custom-simpl.hxx) + $(call install-data,$(src_base)/people-custom-simpl.cxx,$(dist_prefix)/$(path)/people-custom-simpl.cxx) + $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd) + $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -81,6 +108,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/hello/makefile b/examples/cxx/hybrid/hello/makefile index 28db77c..c48ef90 100644 --- a/examples/cxx/hybrid/hello/makefile +++ b/examples/cxx/hybrid/hello/makefile @@ -19,8 +19,11 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean + # Build. # @@ -45,6 +48,27 @@ $(call include-dep,$(dep)) .PHONY: $(out_base)/ $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/hello.xsd,$(dist_prefix)/$(path)/hello.xsd) + $(call install-data,$(src_base)/hello.xml,$(dist_prefix)/$(path)/hello.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -73,6 +97,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/library/makefile b/examples/cxx/hybrid/library/makefile index 24f8bf1..f0dbae1 100644 --- a/examples/cxx/hybrid/library/makefile +++ b/examples/cxx/hybrid/library/makefile @@ -21,8 +21,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -51,6 +53,27 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd) + $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -79,6 +102,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/makefile b/examples/cxx/hybrid/makefile index d3f0729..765c196 100644 --- a/examples/cxx/hybrid/makefile +++ b/examples/cxx/hybrid/makefile @@ -5,15 +5,18 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make -examples := compositors +all_examples := compositors hello multiroot streaming library wildcard \ +filter minimal + +build_examples := compositors ifeq ($(xsde_iostream),y) ifeq ($(xsde_exceptions),y) -examples += hello multiroot streaming +build_examples += hello multiroot streaming ifeq ($(xsde_stl),y) -examples += library wildcard filter +build_examples += library wildcard filter endif endif @@ -21,16 +24,34 @@ endif ifeq ($(xsde_stl),n) ifeq ($(xsde_exceptions),n) -examples += minimal +build_examples += minimal endif endif -default := $(out_base)/ -clean := $(out_base)/.clean +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean + +.PHONY: $(default) $(dist) $(dist-win) $(clean) + +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples))) +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples))) -.PHONY: $(default) $(clean) +# Dist. +# +$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base)) -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) -$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile)) +else +$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile)) +endif diff --git a/examples/cxx/hybrid/minimal/makefile b/examples/cxx/hybrid/minimal/makefile index e61b29a..967ab6c 100644 --- a/examples/cxx/hybrid/minimal/makefile +++ b/examples/cxx/hybrid/minimal/makefile @@ -21,8 +21,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -51,6 +53,27 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd) + $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -79,6 +102,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/multiroot/makefile b/examples/cxx/hybrid/multiroot/makefile index d4b8cac..e3e24c6 100644 --- a/examples/cxx/hybrid/multiroot/makefile +++ b/examples/cxx/hybrid/multiroot/makefile @@ -19,8 +19,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -47,6 +49,29 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/protocol.xsd,$(dist_prefix)/$(path)/protocol.xsd) + $(call install-data,$(src_base)/balance.xml,$(dist_prefix)/$(path)/balance.xml) + $(call install-data,$(src_base)/deposit.xml,$(dist_prefix)/$(path)/deposit.xml) + $(call install-data,$(src_base)/withdraw.xml,$(dist_prefix)/$(path)/withdraw.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -75,6 +100,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/streaming/makefile b/examples/cxx/hybrid/streaming/makefile index 86818b9..05d5510 100644 --- a/examples/cxx/hybrid/streaming/makefile +++ b/examples/cxx/hybrid/streaming/makefile @@ -21,8 +21,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -52,6 +54,31 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/object-pimpl.hxx,$(dist_prefix)/$(path)/object-pimpl.hxx) + $(call install-data,$(src_base)/object-pimpl.cxx,$(dist_prefix)/$(path)/object-pimpl.cxx) + $(call install-data,$(src_base)/object-simpl.hxx,$(dist_prefix)/$(path)/object-simpl.hxx) + $(call install-data,$(src_base)/object-simpl.cxx,$(dist_prefix)/$(path)/object-simpl.cxx) + $(call install-data,$(src_base)/position.xsd,$(dist_prefix)/$(path)/position.xsd) + $(call install-data,$(src_base)/position.xml,$(dist_prefix)/$(path)/position.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -80,6 +107,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/hybrid/wildcard/makefile b/examples/cxx/hybrid/wildcard/makefile index 5628406..4268dbf 100644 --- a/examples/cxx/hybrid/wildcard/makefile +++ b/examples/cxx/hybrid/wildcard/makefile @@ -21,8 +21,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. # @@ -53,6 +55,33 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/body.hxx,$(dist_prefix)/$(path)/body.hxx) + $(call install-data,$(src_base)/body.cxx,$(dist_prefix)/$(path)/body.cxx) + $(call install-data,$(src_base)/envelope-pimpl.hxx,$(dist_prefix)/$(path)/envelope-pimpl.hxx) + $(call install-data,$(src_base)/envelope-pimpl.cxx,$(dist_prefix)/$(path)/envelope-pimpl.cxx) + $(call install-data,$(src_base)/envelope-simpl.hxx,$(dist_prefix)/$(path)/envelope-simpl.hxx) + $(call install-data,$(src_base)/envelope-simpl.cxx,$(dist_prefix)/$(path)/envelope-simpl.cxx) + $(call install-data,$(src_base)/email.xsd,$(dist_prefix)/$(path)/email.xsd) + $(call install-data,$(src_base)/email.xml,$(dist_prefix)/$(path)/email.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -81,6 +110,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/hybrid/xsd-cxx.make) diff --git a/examples/cxx/makefile b/examples/cxx/makefile index 8b4a552..c1014a6 100644 --- a/examples/cxx/makefile +++ b/examples/cxx/makefile @@ -5,16 +5,20 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make -examples := hybrid parser serializer +mappings := hybrid parser serializer -default := $(out_base)/ -test := $(out_base)/.test -clean := $(out_base)/.clean +default := $(out_base)/ +test := $(out_base)/.test +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean -.PHONY: $(default) $(test) $(clean) +.PHONY: $(default) $(test) $(dist) $(dist-win) $(clean) -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(examples))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(mappings))) +$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(mappings))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(mappings))) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(mappings))) +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(mappings))) -$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) +$(foreach m,$(mappings),$(call import,$(src_base)/$m/makefile)) diff --git a/examples/cxx/parser/generated/makefile b/examples/cxx/parser/generated/makefile index 14c039c..3dc9c97 100644 --- a/examples/cxx/parser/generated/makefile +++ b/examples/cxx/parser/generated/makefile @@ -14,7 +14,9 @@ xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options driver := $(out_base)/$(xsd:.xsd=-pdriver) -clean := $(out_base)/.clean +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -42,6 +44,26 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd) + $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -72,6 +94,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) xsd_pimpl_suffix := -pimpl $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/hello/makefile b/examples/cxx/parser/hello/makefile index 7f39cd3..b40fb0c 100644 --- a/examples/cxx/parser/hello/makefile +++ b/examples/cxx/parser/hello/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -39,6 +41,27 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/hello.xsd,$(dist_prefix)/$(path)/hello.xsd) + $(call install-data,$(src_base)/hello.xml,$(dist_prefix)/$(path)/hello.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -67,6 +90,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/library/makefile b/examples/cxx/parser/library/makefile index 6cf3f2b..e093cf8 100644 --- a/examples/cxx/parser/library/makefile +++ b/examples/cxx/parser/library/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -47,6 +49,33 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/library.hxx,$(dist_prefix)/$(path)/library.hxx) + $(call install-data,$(src_base)/library-pimpl-mixin.hxx,$(dist_prefix)/$(path)/library-pimpl-mixin.hxx) + $(call install-data,$(src_base)/library-pimpl-mixin.cxx,$(dist_prefix)/$(path)/library-pimpl-mixin.cxx) + $(call install-data,$(src_base)/library-pimpl-tiein.hxx,$(dist_prefix)/$(path)/library-pimpl-tiein.hxx) + $(call install-data,$(src_base)/library-pimpl-tiein.cxx,$(dist_prefix)/$(path)/library-pimpl-tiein.cxx) + $(call install-data,$(src_base)/library.map,$(dist_prefix)/$(path)/library.map) + $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd) + $(call install-data,$(src_base)/library.xml,$(dist_prefix)/$(path)/library.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -75,6 +104,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/makefile b/examples/cxx/parser/makefile index 5a81a72..92e00ce 100644 --- a/examples/cxx/parser/makefile +++ b/examples/cxx/parser/makefile @@ -5,29 +5,32 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make -examples := +all_examples := generated hello library multiroot polymorphism polyroot \ +mixed wildcard minimal + +build_examples := ifneq ($(xsde_reuse_style),none) -examples += generated +build_examples += generated endif ifeq ($(xsde_stl),y) ifeq ($(xsde_iostream),y) ifeq ($(xsde_exceptions),y) -examples += hello +build_examples += hello ifneq ($(xsde_reuse_style),none) -examples += library multiroot +build_examples += library multiroot ifeq ($(xsde_polymorphic),y) -examples += polymorphism polyroot +build_examples += polymorphism polyroot endif endif ifeq ($(xsde_reuse_style),tiein) -examples += mixed wildcard +build_examples += mixed wildcard endif endif @@ -37,17 +40,34 @@ endif ifeq ($(xsde_stl),n) ifeq ($(xsde_exceptions),n) ifneq ($(xsde_reuse_style),none) -examples += minimal +build_examples += minimal endif endif endif -default := $(out_base)/ -clean := $(out_base)/.clean +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean + +.PHONY: $(default) $(dist) $(dist-win) $(clean) + +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples))) +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples))) -.PHONY: $(default) $(clean) +# Dist. +# +$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base)) -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) -$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile)) +else +$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile)) +endif diff --git a/examples/cxx/parser/minimal/makefile b/examples/cxx/parser/minimal/makefile index 7a1eb8f..c0dfda1 100644 --- a/examples/cxx/parser/minimal/makefile +++ b/examples/cxx/parser/minimal/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -41,6 +43,31 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/gender.hxx,$(dist_prefix)/$(path)/gender.hxx) + $(call install-data,$(src_base)/people-pimpl-mixin.hxx,$(dist_prefix)/$(path)/people-pimpl-mixin.hxx) + $(call install-data,$(src_base)/people-pimpl-tiein.hxx,$(dist_prefix)/$(path)/people-pimpl-tiein.hxx) + $(call install-data,$(src_base)/people.map,$(dist_prefix)/$(path)/people.map) + $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd) + $(call install-data,$(src_base)/people.xml,$(dist_prefix)/$(path)/people.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -69,6 +96,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/mixed/makefile b/examples/cxx/parser/mixed/makefile index 5fa42f1..52072ab 100644 --- a/examples/cxx/parser/mixed/makefile +++ b/examples/cxx/parser/mixed/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -41,6 +43,29 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/anchor.hxx,$(dist_prefix)/$(path)/anchor.hxx) + $(call install-data,$(src_base)/text.map,$(dist_prefix)/$(path)/text.map) + $(call install-data,$(src_base)/text.xsd,$(dist_prefix)/$(path)/text.xsd) + $(call install-data,$(src_base)/text.xml,$(dist_prefix)/$(path)/text.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -69,6 +94,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/multiroot/makefile b/examples/cxx/parser/multiroot/makefile index 92c53b6..f3f2e7a 100644 --- a/examples/cxx/parser/multiroot/makefile +++ b/examples/cxx/parser/multiroot/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -46,6 +48,35 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/protocol.hxx,$(dist_prefix)/$(path)/protocol.hxx) + $(call install-data,$(src_base)/protocol-pimpl-mixin.hxx,$(dist_prefix)/$(path)/protocol-pimpl-mixin.hxx) + $(call install-data,$(src_base)/protocol-pimpl-mixin.cxx,$(dist_prefix)/$(path)/protocol-pimpl-mixin.cxx) + $(call install-data,$(src_base)/protocol-pimpl-tiein.hxx,$(dist_prefix)/$(path)/protocol-pimpl-tiein.hxx) + $(call install-data,$(src_base)/protocol-pimpl-tiein.cxx,$(dist_prefix)/$(path)/protocol-pimpl-tiein.cxx) + $(call install-data,$(src_base)/protocol.map,$(dist_prefix)/$(path)/protocol.map) + $(call install-data,$(src_base)/protocol.xsd,$(dist_prefix)/$(path)/protocol.xsd) + $(call install-data,$(src_base)/balance.xml,$(dist_prefix)/$(path)/balance.xml) + $(call install-data,$(src_base)/deposit.xml,$(dist_prefix)/$(path)/deposit.xml) + $(call install-data,$(src_base)/withdraw.xml,$(dist_prefix)/$(path)/withdraw.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -74,6 +105,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/polymorphism/makefile b/examples/cxx/parser/polymorphism/makefile index a8f5167..764d69d 100644 --- a/examples/cxx/parser/polymorphism/makefile +++ b/examples/cxx/parser/polymorphism/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -46,6 +48,31 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/supermen-pimpl-mixin.hxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.hxx) + $(call install-data,$(src_base)/supermen-pimpl-mixin.cxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.cxx) + $(call install-data,$(src_base)/supermen-pimpl-tiein.hxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.hxx) + $(call install-data,$(src_base)/supermen-pimpl-tiein.cxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.cxx) + $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd) + $(call install-data,$(src_base)/supermen.xml,$(dist_prefix)/$(path)/supermen.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -74,6 +101,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/polyroot/makefile b/examples/cxx/parser/polyroot/makefile index 2a72c3a..7de4341 100644 --- a/examples/cxx/parser/polyroot/makefile +++ b/examples/cxx/parser/polyroot/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -46,6 +48,33 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/supermen-pimpl-mixin.hxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.hxx) + $(call install-data,$(src_base)/supermen-pimpl-mixin.cxx,$(dist_prefix)/$(path)/supermen-pimpl-mixin.cxx) + $(call install-data,$(src_base)/supermen-pimpl-tiein.hxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.hxx) + $(call install-data,$(src_base)/supermen-pimpl-tiein.cxx,$(dist_prefix)/$(path)/supermen-pimpl-tiein.cxx) + $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd) + $(call install-data,$(src_base)/person.xml,$(dist_prefix)/$(path)/person.xml) + $(call install-data,$(src_base)/superman.xml,$(dist_prefix)/$(path)/superman.xml) + $(call install-data,$(src_base)/batman.xml,$(dist_prefix)/$(path)/batman.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -74,6 +103,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/parser/wildcard/makefile b/examples/cxx/parser/wildcard/makefile index c07b11b..166c403 100644 --- a/examples/cxx/parser/wildcard/makefile +++ b/examples/cxx/parser/wildcard/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -39,6 +41,27 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/email.xsd,$(dist_prefix)/$(path)/email.xsd) + $(call install-data,$(src_base)/email.xml,$(dist_prefix)/$(path)/email.xml) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -67,6 +90,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/parser/xsd-cxx.make) diff --git a/examples/cxx/serializer/hello/makefile b/examples/cxx/serializer/hello/makefile index 77e9ad8..5d07a2d 100644 --- a/examples/cxx/serializer/hello/makefile +++ b/examples/cxx/serializer/hello/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -39,6 +41,26 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/hello.xsd,$(dist_prefix)/$(path)/hello.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -67,6 +89,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/serializer/xsd-cxx.make) diff --git a/examples/cxx/serializer/library/makefile b/examples/cxx/serializer/library/makefile index e44c671..5ca18fb 100644 --- a/examples/cxx/serializer/library/makefile +++ b/examples/cxx/serializer/library/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -47,6 +49,32 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/library.hxx,$(dist_prefix)/$(path)/library.hxx) + $(call install-data,$(src_base)/library-simpl-mixin.hxx,$(dist_prefix)/$(path)/library-simpl-mixin.hxx) + $(call install-data,$(src_base)/library-simpl-mixin.cxx,$(dist_prefix)/$(path)/library-simpl-mixin.cxx) + $(call install-data,$(src_base)/library-simpl-tiein.hxx,$(dist_prefix)/$(path)/library-simpl-tiein.hxx) + $(call install-data,$(src_base)/library-simpl-tiein.cxx,$(dist_prefix)/$(path)/library-simpl-tiein.cxx) + $(call install-data,$(src_base)/library.map,$(dist_prefix)/$(path)/library.map) + $(call install-data,$(src_base)/library.xsd,$(dist_prefix)/$(path)/library.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -75,6 +103,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/serializer/xsd-cxx.make) diff --git a/examples/cxx/serializer/makefile b/examples/cxx/serializer/makefile index 0bda4e8..7e454bf 100644 --- a/examples/cxx/serializer/makefile +++ b/examples/cxx/serializer/makefile @@ -5,25 +5,27 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make -examples := +all_examples := hello library polymorphism polyroot wildcard minimal + +build_examples := ifeq ($(xsde_stl),y) ifeq ($(xsde_iostream),y) ifeq ($(xsde_exceptions),y) -examples += hello +build_examples += hello ifneq ($(xsde_reuse_style),none) -examples += library +build_examples += library ifeq ($(xsde_polymorphic),y) -examples += polymorphism polyroot +build_examples += polymorphism polyroot endif endif ifeq ($(xsde_reuse_style),tiein) -examples += wildcard +build_examples += wildcard endif endif @@ -33,17 +35,34 @@ endif ifeq ($(xsde_stl),n) ifeq ($(xsde_exceptions),n) ifneq ($(xsde_reuse_style),none) -examples += minimal +build_examples += minimal endif endif endif -default := $(out_base)/ -clean := $(out_base)/.clean +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean + +.PHONY: $(default) $(dist) $(dist-win) $(clean) + +$(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_examples))) +$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(build_examples))) -.PHONY: $(default) $(clean) +# Dist. +# +$(dist) $(dist-win): path := $(subst $(src_root)/,,$(src_base)) -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) -$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(all_examples))) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +$(foreach e,$(all_examples),$(call import,$(src_base)/$e/makefile)) +else +$(foreach e,$(build_examples),$(call import,$(src_base)/$e/makefile)) +endif diff --git a/examples/cxx/serializer/minimal/makefile b/examples/cxx/serializer/minimal/makefile index 4bd42a1..992343e 100644 --- a/examples/cxx/serializer/minimal/makefile +++ b/examples/cxx/serializer/minimal/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -41,6 +43,30 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/people.hxx,$(dist_prefix)/$(path)/people.hxx) + $(call install-data,$(src_base)/people-simpl-mixin.hxx,$(dist_prefix)/$(path)/people-simpl-mixin.hxx) + $(call install-data,$(src_base)/people-simpl-tiein.hxx,$(dist_prefix)/$(path)/people-simpl-tiein.hxx) + $(call install-data,$(src_base)/people.map,$(dist_prefix)/$(path)/people.map) + $(call install-data,$(src_base)/people.xsd,$(dist_prefix)/$(path)/people.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -69,6 +95,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/serializer/xsd-cxx.make) diff --git a/examples/cxx/serializer/polymorphism/makefile b/examples/cxx/serializer/polymorphism/makefile index 24845cb..203ca26 100644 --- a/examples/cxx/serializer/polymorphism/makefile +++ b/examples/cxx/serializer/polymorphism/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -48,6 +50,32 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/supermen.hxx,$(dist_prefix)/$(path)/supermen.hxx) + $(call install-data,$(src_base)/supermen-simpl-mixin.hxx,$(dist_prefix)/$(path)/supermen-simpl-mixin.hxx) + $(call install-data,$(src_base)/supermen-simpl-mixin.cxx,$(dist_prefix)/$(path)/supermen-simpl-mixin.cxx) + $(call install-data,$(src_base)/supermen-simpl-tiein.hxx,$(dist_prefix)/$(path)/supermen-simpl-tiein.hxx) + $(call install-data,$(src_base)/supermen-simpl-tiein.cxx,$(dist_prefix)/$(path)/supermen-simpl-tiein.cxx) + $(call install-data,$(src_base)/supermen.map,$(dist_prefix)/$(path)/supermen.map) + $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -76,6 +104,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/serializer/xsd-cxx.make) diff --git a/examples/cxx/serializer/polyroot/makefile b/examples/cxx/serializer/polyroot/makefile index afa52b5..d151cc4 100644 --- a/examples/cxx/serializer/polyroot/makefile +++ b/examples/cxx/serializer/polyroot/makefile @@ -20,8 +20,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -48,6 +50,32 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/supermen.hxx,$(dist_prefix)/$(path)/supermen.hxx) + $(call install-data,$(src_base)/supermen-simpl-mixin.hxx,$(dist_prefix)/$(path)/supermen-simpl-mixin.hxx) + $(call install-data,$(src_base)/supermen-simpl-mixin.cxx,$(dist_prefix)/$(path)/supermen-simpl-mixin.cxx) + $(call install-data,$(src_base)/supermen-simpl-tiein.hxx,$(dist_prefix)/$(path)/supermen-simpl-tiein.hxx) + $(call install-data,$(src_base)/supermen-simpl-tiein.cxx,$(dist_prefix)/$(path)/supermen-simpl-tiein.cxx) + $(call install-data,$(src_base)/supermen.map,$(dist_prefix)/$(path)/supermen.map) + $(call install-data,$(src_base)/supermen.xsd,$(dist_prefix)/$(path)/supermen.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -76,6 +104,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/serializer/xsd-cxx.make) diff --git a/examples/cxx/serializer/wildcard/makefile b/examples/cxx/serializer/wildcard/makefile index e2b43a6..c44aa8c 100644 --- a/examples/cxx/serializer/wildcard/makefile +++ b/examples/cxx/serializer/wildcard/makefile @@ -14,8 +14,10 @@ dep := $(obj:.o=.o.d) xsde.l := $(out_root)/libxsde/xsde/xsde.l xsde.l.cpp-options := $(out_root)/libxsde/xsde/xsde.l.cpp-options -driver := $(out_base)/driver -clean := $(out_base)/.clean +driver := $(out_base)/driver +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -41,6 +43,28 @@ $(call include-dep,$(dep)) $(out_base)/: $(driver) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist) $(dist-win) $(dist-common) + +$(dist) $(dist-win) $(dist-common): path := $(subst $(src_root)/,,$(src_base)) + +$(dist-common): + $(call install-data,$(src_base)/driver.cxx,$(dist_prefix)/$(path)/driver.cxx) + $(call install-data,$(src_base)/email.hxx,$(dist_prefix)/$(path)/email.hxx) + $(call install-data,$(src_base)/email.map,$(dist_prefix)/$(path)/email.map) + $(call install-data,$(src_base)/email.xsd,$(dist_prefix)/$(path)/email.xsd) + +$(dist): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README) + +$(dist-win): $(dist-common) + $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) + $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + + # Clean. # .PHONY: $(clean) @@ -69,6 +93,7 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) $(call include,$(scf_root)/xsde/serializer/xsd-cxx.make) diff --git a/examples/makefile b/examples/makefile index 81cba78..5f63a19 100644 --- a/examples/makefile +++ b/examples/makefile @@ -7,14 +7,18 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make examples := cxx -default := $(out_base)/ -test := $(out_base)/.test -clean := $(out_base)/.clean +default := $(out_base)/ +test := $(out_base)/.test +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean -.PHONY: $(default) $(test) $(clean) +.PHONY: $(default) $(test) $(dist) $(dist-win) $(clean) $(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) $(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(examples))) +$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(examples))) +$(dist-win): $(addprefix $(out_base)/,$(addsuffix /.dist-win,$(examples))) $(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) $(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) diff --git a/libxsde/makefile b/libxsde/makefile index dc644f3..0e4e154 100644 --- a/libxsde/makefile +++ b/libxsde/makefile @@ -5,22 +5,16 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make -default := $(out_base)/ -install := $(out_base)/.install -clean := $(out_base)/.clean +default := $(out_base)/ +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean -.PHONY: $(default) $(install) $(clean) +.PHONY: $(default) $(dist) $(dist-win) $(clean) $(default): $(out_base)/xsde/ +$(dist): $(out_base)/xsde/.dist +$(dist-win): $(out_base)/xsde/.dist-win $(clean): $(out_base)/xsde/.clean -$(install): - $(call install-dir,$(src_base)/xsde,$(install_inc_dir)/xsde) - $(call install-data,$(src_base)/GPLv2,$(install_doc_dir)/libxsde/GPLv2) - $(call install-data,$(src_base)/LICENSE,$(install_doc_dir)/libxsde/LICENSE) - $(call install-data,$(src_base)/README,$(install_doc_dir)/libxsde/README) - - -$(call include,$(bld_root)/install.make) - $(call import,$(src_base)/xsde/makefile) diff --git a/libxsde/xsde/makefile b/libxsde/xsde/makefile index f0deaad..1a90807 100644 --- a/libxsde/xsde/makefile +++ b/libxsde/xsde/makefile @@ -437,7 +437,9 @@ cxx_d := $(cxx_o:.o=.o.d) xsde.l := $(out_base)/xsde.l xsde.l.cpp-options := $(out_base)/xsde.l.cpp-options -clean := $(out_base)/.clean +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean # Build. @@ -541,6 +543,16 @@ endif $(out_base)/: $(xsde.l) +# Dist. +# +.PHONY: $(dist) $(dist-win) + +$(dist): + $(call install-dir,$(src_base)/c,$(dist_prefix)/libxsde/xsde/c,\( -name '*.h' -o -name '*.c' -o -name COPYING \)) + $(call install-dir,$(src_base)/cxx,$(dist_prefix)/libxsde/xsde/cxx,-name '*.?xx') + +$(dist-win): $(dist) + # Clean. # .PHONY: $(clean) @@ -569,3 +581,4 @@ endif $(call include,$(bld_root)/cxx/o-l.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) +$(call include,$(bld_root)/install.make) @@ -5,35 +5,95 @@ include $(dir $(lastword $(MAKEFILE_LIST)))build/bootstrap.make -default := $(out_base)/ -test := $(out_base)/.test -install := $(out_base)/.install -clean := $(out_base)/.clean +default := $(out_base)/ +test := $(out_base)/.test +install := $(out_base)/.install +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean +cleandoc := $(out_base)/.cleandoc -.PHONY: $(default) $(test) $(install) $(clean) -$(default): $(out_base)/xsde/ \ - $(out_base)/libxsde/ \ - $(out_base)/tests/ \ - $(out_base)/examples/ +.PHONY: $(default) $(test) $(install) $(dist) $(dist-win) $(clean) +# Build. +# +$(default): $(out_base)/xsde/ \ + $(out_base)/libxsde/ \ + $(out_base)/tests/ \ + $(out_base)/examples/ \ + $(src_base)/documentation/ + +# Test. +# $(test): $(out_base)/tests/.test +# Install. +# $(install): $(out_base)/xsde/.install \ - $(out_base)/libxsde/.install \ $(out_base)/documentation/.install - $(call install-data,$(src_base)/FLOSSE,$(install_doc_dir)/xsde/FLOSSE) $(call install-data,$(src_base)/GPLv2,$(install_doc_dir)/xsde/GPLv2) $(call install-data,$(src_base)/LICENSE,$(install_doc_dir)/xsde/LICENSE) $(call install-data,$(src_base)/NEWS,$(install_doc_dir)/xsde/NEWS) $(call install-data,$(src_base)/README,$(install_doc_dir)/xsde/README) +# Dist. +# +dist-common := $(out_base)/.dist-common + +.PHONY: $(dist-common) + +$(dist-common): + $(call install-dir,$(src_base)/dist/build,$(dist_prefix)/build) + $(call install-dir,$(src_base)/dist/config,$(dist_prefix)/config) + $(call install-dir,$(src_base)/dist/etc,$(dist_prefix)/etc) + $(call install-dir,$(src_base)/dist/examples,$(dist_prefix)/examples) + $(call install-dir,$(src_base)/dist/libxsde,$(dist_prefix)/libxsde) + $(call install-data,$(src_base)/dist/makefile,$(dist_prefix)/makefile) + $(call install-data,$(src_base)/dist/nmakefile,$(dist_prefix)/nmakefile) + +$(dist): $(dist-common) \ + $(out_base)/xsde/.dist \ + $(out_base)/libxsde/.dist \ + $(out_base)/examples/.dist \ + $(src_base)/documentation/.dist + $(call install-dir,$(src_base)/dist/,$(dist_prefix)) + $(call install-data,$(src_base)/GPLv2,$(dist_prefix)/GPLv2) + $(call install-data,$(src_base)/LICENSE,$(dist_prefix)/LICENSE) + $(call install-data,$(src_base)/NEWS,$(dist_prefix)/NEWS) + $(call install-data,$(src_base)/version,$(dist_prefix)/version) + $(call install-data,$(src_base)/dist/INSTALL,$(dist_prefix)/INSTALL) + $(call install-data,$(src_base)/dist/README,$(dist_prefix)/README) + +$(dist-win): $(dist-common) \ + $(out_base)/xsde/.dist-win \ + $(out_base)/libxsde/.dist-win \ + $(out_base)/examples/.dist-win \ + $(src_base)/documentation/.dist-win + $(call install-data,$(src_base)/GPLv2,$(dist_prefix)/GPLv2.txt) + $(call message,,unix2dos $(dist_prefix)/GPLv2.txt) + $(call install-data,$(src_base)/LICENSE,$(dist_prefix)/LICENSE.txt) + $(call message,,unix2dos $(dist_prefix)/LICENSE.txt) + $(call install-data,$(src_base)/NEWS,$(dist_prefix)/NEWS.txt) + $(call message,,unix2dos $(dist_prefix)/NEWS.txt) + $(call install-data,$(src_base)/version,$(dist_prefix)/version.txt) + $(call message,,unix2dos $(dist_prefix)/version.txt) + $(call install-data,$(src_base)/dist/INSTALL,$(dist_prefix)/INSTALL.txt) + $(call message,,unix2dos $(dist_prefix)/INSTALL.txt) + $(call install-data,$(src_base)/dist/README,$(dist_prefix)/README.txt) + $(call message,,unix2dos $(dist_prefix)/README.txt) + +# Clean. +# $(clean): $(out_base)/xsde/.clean \ $(out_base)/libxsde/.clean \ - $(out_base)/tests/.clean \ + $(out_base)/tests/.clean \ $(out_base)/examples/.clean +$(cleandoc): $(src_base)/documentation/.cleandoc + + $(call include,$(bld_root)/install.make) $(call import,$(src_base)/xsde/makefile) diff --git a/xsde/makefile b/xsde/makefile index 9d25cf9..953fbdb 100644 --- a/xsde/makefile +++ b/xsde/makefile @@ -85,12 +85,14 @@ cxx_tun += processing/inheritance/processor.cxx # # -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) +cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) +cxx_od := $(cxx_obj:.o=.o.d) -xsde := $(out_base)/xsde -clean := $(out_base)/.clean -install := $(out_base)/.install +xsde := $(out_base)/xsde +dist := $(out_base)/.dist +dist-win := $(out_base)/.dist-win +clean := $(out_base)/.clean +install := $(out_base)/.install # Import. # @@ -137,14 +139,24 @@ $(call include-dep,$(cxx_od)) .PHONY: $(out_base)/ $(out_base)/: $(xsde) -# install +# Dist. +# +.PHONY: $(dist) $(dist-win) + +$(dist): $(xsde) + $(call install-exec,$<,$(dist_prefix)/bin/xsde) + +$(dist-win): $(xsde) + $(call install-exec,$<,$(dist_prefix)/bin/xsde.exe) + +# Install. # .PHONY: $(install) $(install): $(xsde) $(call install-exec,$<,$(install_bin_dir)/xsde) -# clean +# Clean. # .PHONY: $(clean) |