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
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
include /usr/share/dpkg/default.mk
# for hardening you might like to uncomment this:
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CFLAGS_MAINT_APPEND=-DSIMDE_ENABLE_OPENMP -fopenmp-simd
export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
prefix=$(CURDIR)/debian/$(DEB_SOURCE)/usr
libexecdir=$(prefix)/lib/$(DEB_SOURCE)
%:
dh $@
override_dh_auto_build:
sed -i 's/\/usr\/bin\/env perl/\/usr\/bin\/perl/' scripts/*
sed -i 's/memeory/memory/' *.c *.h *.md
sed -i 's/automaticly/automatically/' *.c
sed -i 's/ouput/output/' *.c
sed -i 's/vaule/value/' *.c
sed -i 's/annonymous/anonymous/' *.h
ifeq (amd64,$(DEB_HOST_ARCH))
mkdir -p $(prefix)
mkdir -p $(libexecdir)
for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
export CFLAGS="$(CFLAGS) -m$${SIMD}" ; \
make clean ; \
dh_auto_build -- SFX=-$${SIMD} ; \
done
else ifeq (i386,$(DEB_HOST_ARCH))
mkdir -p $(prefix)
mkdir -p $(libexecdir)
for SIMD in ssse3 sse3 sse2 sse mmx; do \
export CFLAGS="$(CXXFLAGS) -m$${SIMD}" ; \
make clean ; \
dh_auto_build -- SFX=-$${SIMD} ; \
done
dh_auto_build -- SFX=-plain
else
dh_auto_build
endif
override_dh_auto_install:
ifeq (amd64,$(DEB_HOST_ARCH))
dh_install -p $(DEB_SOURCE) debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
for SIMD in avx2 avx sse4.1 ssse3 sse3 sse2 ; do \
export CFLAGS="$(CFLAGS) -m$${SIMD}" ; \
dh_auto_build -- SFX=-$${SIMD} BIN=$(libexecdir) install ; \
done
mkdir -p $(prefix)/bin
cd $(prefix)/bin \
&& for prog in kbm2 pgzf wtdbg-cns wtdbg2 wtpoa-cns ; do \
ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
else ifeq (i386,$(DEB_HOST_ARCH))
dh_install -p $(DEB_SOURCE) debian/bin/simd-dispatch /usr/lib/$(DEB_SOURCE)/
for SIMD in sse2 sse mmx ; do \
export CFLAGS="$(CFLAGS) -m$${SIMD}" ; \
dh_auto_build -- SFX=-$${SIMD} BIN=$(libexecdir) install ; \
done
export CLFAGS="$(CFLAGS)" ; dh_auto_build -- SFX=-plain BIN=$(libexecdir) \
install
mkdir -p $(prefix)/bin
cd $(prefix)/bin \
&& for prog in kbm2 pgzf wtdbg-cns wtdbg2 wtpoa-cns ; do \
ln -s ../lib/$(DEB_SOURCE)/simd-dispatch $${prog} ; done
else
make BIN=debian/$(DEB_SOURCE)/usr/bin install
endif
|