File: rules

package info (click to toggle)
stockfish 2.1.1%2Bgit20111006-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 716 kB
  • sloc: cpp: 8,099; makefile: 436
file content (91 lines) | stat: -rwxr-xr-x 2,181 bytes parent folder | download
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
#!/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=x86-32-old

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=bigendian-32
endif

# no compile on the first shot
ifneq (,$(findstring powerpc,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=bigendian-32
endif

ifneq (,$(findstring s390,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=bigendian-32
endif

ifneq (,$(findstring sparc,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=bigendian-32
endif

ifneq (,$(findstring mips,$(DEB_BUILD_ARCH)))
TARGET := profile-build ARCH=bigendian-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 ia64,$(DEB_BUILD_ARCH)))
TARGET := build ARCH=general-64
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 && make testrun
endif


%:
	dh $@ --sourcedirectory=src --with quilt

override_dh_auto_clean:
	cd src && rm -rf *.gcda && touch .depend && make clean

override_dh_auto_build:
	cd src && make $(TARGET2)

override_dh_auto_test:
	$(TESTCMD)

override_dh_installman:
	dh_installman debian/stockfish.6