diff options
Diffstat (limited to 'dist/examples/cxx/hybrid/polyroot/makefile')
-rw-r--r-- | dist/examples/cxx/hybrid/polyroot/makefile | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/dist/examples/cxx/hybrid/polyroot/makefile b/dist/examples/cxx/hybrid/polyroot/makefile new file mode 100644 index 0000000..d38f04c --- /dev/null +++ b/dist/examples/cxx/hybrid/polyroot/makefile @@ -0,0 +1,58 @@ +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 supermen.o supermen-pskel.o supermen-pimpl.o \ +supermen-sskel.o supermen-simpl.o $(root)/libxsde/xsde/libxsde.a + +driver.o: driver.cxx supermen.hxx supermen-pimpl.hxx supermen-simpl.hxx +supermen.o: supermen.cxx supermen.hxx +supermen-pskel.o: supermen-pskel.cxx +supermen-pimpl.o: supermen-pimpl.cxx +supermen-simpl.o: supermen-simpl.cxx +supermen-simpl.o: supermen-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 \ +--generate-polymorphic --generate-typeinfo --root-element person $< + +# 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-pimpl.?xx supermen-pskel.?xx supermen-simpl.?xx \ +supermen-sskel.?xx supermen.?xx supermen-pimpl.o supermen-pskel.o \ +supermen-simpl.o supermen-sskel.o supermen.o driver.o driver |