diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-03-02 12:14:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-03-02 12:14:54 +0200 |
commit | 6c63b913179127e09ed7d9da8920493ccceec6ce (patch) | |
tree | 95684b51b4ab60e6468a592a53e33c2cf00027ab /examples/cxx/hybrid/filter/makefile | |
parent | 3fd3cfc36784be43f545f2f0973e3dc58f475996 (diff) |
Add make support for creating binary distributions
Two new make targets, dist and dist-win, were added that allow one
to create a binary distribution from the current build. The dist
target creates a UNIX distribution while dist-win -- Windows.
The simplified build systems for the runtime library and examples
that were kept separately are now part of the project (the dist/
subdirectory).
Diffstat (limited to 'examples/cxx/hybrid/filter/makefile')
-rw-r--r-- | examples/cxx/hybrid/filter/makefile | 32 |
1 files changed, 30 insertions, 2 deletions
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) |