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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
#!/usr/bin/make -f
DH_VERBOSE := 1
export LC_ALL=C.UTF-8
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CFLAGS_MAINT_APPEND+=-DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
export DEB_CXXFLAGS_MAINT_APPEND+=-DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
export CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS)
prefix=$(CURDIR)/debian/$(DEB_SOURCE)/usr
libexecdir=$(prefix)/lib/$(DEB_SOURCE)
AMD64_SIMDE=avx2 avx sse4.1 ssse3 sse3
I386_SIMDE=sse2 sse
%:
dh $@
override_dh_autoreconf:
dh_autoreconf --sourcedirectory=$(CURDIR)/deps/vowpal_wabbit
override_dh_clean:
rm -Rf ./deps/DYNAMIC/build/CMakeFiles
dh_clean
override_dh_auto_clean:
find $(CURDIR)/include/ -type f -a '!' -name vg_git_version.hpp -delete
dh_auto_clean || true
override_dh_auto_build-arch:
mkdir -p $(CURDIR)/debian/help
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
mkdir -p $(prefix)
mkdir -p $(libexecdir)
for SIMD in $(AMD64_SIMDE) ; do \
export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
make clean ; \
dh_auto_build -- SFX=-$${SIMD} all test/build_graph bin/shuf ; \
done
CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" dh_auto_build -- SFX=-plain all test/build_graph bin/shuf
cp bin/vg-plain debian/help/vg
ifeq (i386,$(DEB_HOST_ARCH))
for SIMD in $(I386_SIMDE) ; do \
export CXXFLAGS="$(CXXFLAGS) -m$${SIMD}" && export CFLAGS="$(CFLAGS) -m$${SIMD}" && \
make clean ; \
dh_auto_build -- SFX=-$${SIMD} ; \
done
endif
else
dh_auto_build -- all test/build_graph bin/shuf
cp bin/vg debian/help/
endif
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
PATH=$$PATH:$(CURDIR)/debian/help \
help2man \
--no-discard-stderr \
--no-info \
--help-option=help \
--version-option=version \
--name='tools for working with genome variation graphs' \
vg > debian/vg.1
endif
override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
cp -v $(CURDIR)/bin/vg-* $(CURDIR)/debian/help/
set +e \
; export PATH="$$PATH:$(CURDIR)/debian/help" \
; for BIN in $(CURDIR)/debian/help/vg-* \
; do echo "Testing $${BIN}" \
&& cp -v "$${BIN}" "$(CURDIR)/debian/help/vg" \
&& . $(CURDIR)/source_me.sh \
&& ( cd $(CURDIR)/test && prove -v t/ ) \
; if [ $$? != 0 ] \
&& [ "$${BIN}" = "$(CURDIR)/debian/help/vg-plain" ] \
; then exit 255 \
; fi \
; done \
; set -e
else
export PATH=$$PATH:$(CURDIR)/debian/help \
&& . $(CURDIR)/source_me.sh \
&& ( cd $(CURDIR)/test && prove -v t/ )
endif
endif
override_dh_auto_test-indep:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
echo No arch independent tests
endif
override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
dh_auto_build -- docs
endif
override_dh_auto_install-arch:
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
dh_install debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
dh_install bin/vg* usr/lib/$(DEB_SOURCE)/
mkdir -p $(prefix)/bin
cd $(prefix)/bin \
&& for prog in vg ; do \
ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
else
dh_install bin/vg usr/bin/
endif
override_dh_auto_install-indep:
override_dh_gencontrol:
dh_gencontrol -- -Vsimde:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libsimde-dev")"
|