1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
#!/usr/bin/make -f
# Debian 'rules' file for the Hydrogen Drum Machine.
#
# To make the build more verbose, uncomment the following line:
#export DH_VERBOSE=1
#
# To enable scons PARALLEL BUILDS (e.g. -j 4), run like this:
# $ COMPOSITE_PARALLEL=4 dpkg-buildpackage -rfakeroot
# ...or uncomment the following line:
#COMPOSITE_PARALLEL=4
# ...or invoke dpkg-buildpackage like this:
# $ dpkg-buildpackage -j4 -rfakeroot
# However, the -j4 here will run more than gcc in parallel.
# Check for parallel builds.
# NUMJOBS script goodie courtesy of http://lists.debian.org/debian-policy/2007/08/msg00005.html
, := ,
NUMJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(subst $(,), ,$(DEB_BUILD_OPTIONS))))
ifneq ("$(COMPOSITE_PARALLEL)","")
COMPOSITE_PARALLEL_BUILDS=-j $(COMPOSITE_PARALLEL)
else
ifneq ("$(NUMJOBS)","")
COMPOSITE_PARALLEL_BUILDS=-j $(NUMJOBS)
endif
endif
BUILDDIR=$(CURDIR)/build
DESTDIR=$(CURDIR)/debian/composite
configure: configure-stamp
configure-stamp:
if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR) ; fi
cd $(BUILDDIR) ; \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWANT_LRDF=ON \
../..
touch $@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
cd $(BUILDDIR) && make $(COMPOSITE_PARALLEL_BUILDS)
touch $@
clean:
dh_testdir
dh_testroot
rm -rf $(BUILDDIR) $(DESTDIR) build-stamp configure-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
mkdir -p $(DESTDIR)/usr/bin
cd $(BUILDDIR) && make install DESTDIR=$(DESTDIR)
touch $@
docs:
docs_install:
# Build architecture-independent files here.
binary-indep: build install docs docs_install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installman
dh_link
# dh_strip
dh_compress
dh_compress -X.py
dh_fixperms
# dh_python
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|