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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
TARGET := profile-build ARCH=general-$(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=x86-32-old
endif
ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=x86-64
endif
# no compile on the first shot so building without profile
ifneq (,$(findstring hppa,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
# no compile on the first shot
ifneq (,$(findstring powerpc,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
ifneq (,$(findstring s390,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=general-32
endif
ifneq (,$(findstring sparc,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
ifneq (,$(findstring mips,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=general-32
endif
# Profiling fails due to compiler issues
ifneq (,$(findstring mipsel,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
ifneq (,$(findstring alpha,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-64
endif
# no compile on the first shot
ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
ifneq (,$(findstring armhf,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
ifneq (,$(findstring ia64,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=general-64 optimize=no
endif
ifneq (,$(findstring m86k,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-32
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
TARGET2 := $(TARGET:profile-build=build)
else
TARGET2 := $(TARGET)
endif
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
TESTCMD :=
else
TESTCMD := cd src && ./stockfish bench 32 1 10 default depth
endif
%:
dh $@ --sourcedirectory=src
override_dh_auto_clean:
cd src && rm -rf *.gcda && touch .depend && make clean
override_dh_auto_build:
# cd src && make $(TARGET2)
dh_auto_build --sourcedirectory=src --parallel -- $(TARGET2)
override_dh_auto_test:
$(TESTCMD)
override_dh_installman:
dh_installman debian/stockfish.6
|