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
|
#!/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
include /usr/share/dpkg/architecture.mk
TARGET := profile-build ARCH=general-$(DEB_HOST_ARCH_BITS)
ifneq (,$(findstring amd64,$(DEB_HOST_ARCH)))
TARGET := profile-build ARCH=x86-64
endif
# no compile on the first shot so building without profile
ifeq (hppa,$(DEB_HOST_ARCH_CPU))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
endif
# no compile on the first shot
ifneq (,$(findstring powerpc,$(DEB_HOST_ARCH_CPU)))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
ifneq (,$(findstring s390,$(DEB_HOST_ARCH_CPU)))
TARGET := profile-build ARCH=general-$(DEB_HOST_ARCH_BITS)
endif
ifneq (,$(findstring sparc,$(DEB_HOST_ARCH_CPU)))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
endif
ifneq (,$(findstring mips,$(DEB_HOST_ARCH_CPU)))
TARGET := profile-build ARCH=general-$(DEB_HOST_ARCH_BITS)
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
# Profiling fails due to compiler issues
ifneq (,$(findstring mipsel,$(DEB_HOST_ARCH_CPU)))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
ifeq (alpha,$(DEB_HOST_ARCH_CPU))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
endif
ifneq (,$(findstring armel,$(DEB_HOST_ARCH)))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
ifneq (,$(findstring armhf,$(DEB_HOST_ARCH)))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
endif
ifeq (ia64,$(DEB_HOST_ARCH_CPU))
TARGET := profile-build ARCH=general-$(DEB_HOST_ARCH_BITS) optimize=no
endif
ifeq (m68k,$(DEB_HOST_ARCH_CPU))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
ifeq (sh4,$(DEB_HOST_ARCH_CPU))
TARGET := build ARCH=general-$(DEB_HOST_ARCH_BITS)
export DEB_LDFLAGS_MAINT_APPEND=-latomic
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:
dh_auto_build --sourcedirectory=src -- $(TARGET2)
override_dh_auto_test:
$(TESTCMD)
override_dh_auto_install:
dh_auto_install -O--sourcedirectory=src -- PREFIX=debian/stockfish/usr
override_dh_installman:
dh_installman debian/stockfish.6
|