|
| 1 | +#!/usr/bin/make -f |
| 2 | + |
| 3 | +BUILDDIR = build |
| 4 | +BUILDDEBUGDIR = build-debug |
| 5 | + |
| 6 | +# firstly called by launchpad |
| 7 | +clean: |
| 8 | + rm -rf $(BUILDDIR) |
| 9 | + rm -rf $(BUILDDEBUGDIR) |
| 10 | + |
| 11 | +# secondly called by launchpad |
| 12 | +build: build-arch |
| 13 | + |
| 14 | +build-arch: |
| 15 | + mkdir $(BUILDDIR) |
| 16 | + cd $(BUILDDIR);cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DOPTION_BUILD_TESTS=Off -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_DOCS=On .. |
| 17 | + make -C $(BUILDDIR) |
| 18 | + mkdir $(BUILDDEBUGDIR) |
| 19 | + cd $(BUILDDEBUGDIR);cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DOPTION_BUILD_TESTS=Off -DOPTION_BUILD_EXAMPLES=Off -DOPTION_BUILD_DOCS=Off .. |
| 20 | + make -C $(BUILDDEBUGDIR) |
| 21 | + |
| 22 | +# thirdly called by launchpad |
| 23 | +binary: binary-arch |
| 24 | + |
| 25 | +binary-arch: libcmake-init libcmake-init-dev libcmake-init-docs libcmake-init-dbg libcmake-init-examples-data libcmake-init-examples libcmake-init-all |
| 26 | + |
| 27 | +libcmake-init: |
| 28 | + cd $(BUILDDIR); DESTDIR=../debian/tmp COMPONENT=runtime make component_install |
| 29 | + mkdir -p debian/tmp/DEBIAN |
| 30 | + dpkg-gencontrol -plibcmake-init |
| 31 | + dpkg --build debian/tmp .. |
| 32 | + rm -rf debian/tmp |
| 33 | + |
| 34 | +libcmake-init-dev: |
| 35 | + cd $(BUILDDIR); DESTDIR=../debian/tmp COMPONENT=dev make component_install |
| 36 | + mkdir -p debian/tmp/DEBIAN |
| 37 | + dpkg-gencontrol -plibcmake-init-dev |
| 38 | + dpkg --build debian/tmp .. |
| 39 | + rm -rf debian/tmp |
| 40 | + |
| 41 | +libcmake-init-docs: |
| 42 | + cd $(BUILDDIR); DESTDIR=../debian/tmp COMPONENT=docs make component_install |
| 43 | + mkdir -p debian/tmp/DEBIAN |
| 44 | + dpkg-gencontrol -plibcmake-init-docs |
| 45 | + dpkg --build debian/tmp .. |
| 46 | + rm -rf debian/tmp |
| 47 | + |
| 48 | +libcmake-init-dbg: |
| 49 | + cd $(BUILDDEBUGDIR); DESTDIR=../debian/tmp COMPONENT=runtime make component_install |
| 50 | + cd $(BUILDDEBUGDIR); DESTDIR=../debian/tmp COMPONENT=dev make component_install |
| 51 | + rm -rf debian/tmp/usr/include |
| 52 | + rm debian/tmp/usr/share/*/*-config.cmake |
| 53 | + rm debian/tmp/usr/share/*/AUTHORS |
| 54 | + rm debian/tmp/usr/share/*/LICENSE |
| 55 | + rm debian/tmp/usr/share/*/README.md |
| 56 | + rm debian/tmp/usr/share/*/VERSION |
| 57 | + rm debian/tmp/usr/share/*/cmake/*/*-export.cmake |
| 58 | + mkdir -p debian/tmp/DEBIAN |
| 59 | + dpkg-gencontrol -plibcmake-init-dbg |
| 60 | + dpkg --build debian/tmp .. |
| 61 | + rm -rf debian/tmp |
| 62 | + |
| 63 | +libcmake-init-examples-data: |
| 64 | + cd $(BUILDDIR); DESTDIR=../debian/tmp COMPONENT=examples_data make component_install |
| 65 | + mkdir -p debian/tmp/DEBIAN |
| 66 | + dpkg-gencontrol -plibcmake-init-examples-data |
| 67 | + dpkg --build debian/tmp .. |
| 68 | + rm -rf debian/tmp |
| 69 | + |
| 70 | +libcmake-init-examples: |
| 71 | + cd $(BUILDDIR); DESTDIR=../debian/tmp COMPONENT=examples_qt make component_install |
| 72 | + mkdir -p debian/tmp/DEBIAN |
| 73 | + dpkg-gencontrol -plibcmake-init-examples |
| 74 | + dpkg --build debian/tmp .. |
| 75 | + rm -rf debian/tmp |
| 76 | + |
| 77 | +libcmake-init-all: |
| 78 | + mkdir -p debian/tmp/DEBIAN |
| 79 | + dpkg-gencontrol -plibcmake-init-all |
| 80 | + dpkg --build debian/tmp .. |
| 81 | + rm -rf debian/tmp |
| 82 | + |
| 83 | +.PHONY: build build-arch binary binary-arch clean libcmake-init libcmake-init-dev libcmake-init-docs libcmake-init-dbg libcmake-init-examples-data libcmake-init-examples libcmake-init-all |
0 commit comments