File: rules

package info (click to toggle)
ares 147%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 35,244 kB
  • sloc: cpp: 334,263; ansic: 98,696; sh: 123; makefile: 31
file content (46 lines) | stat: -rwxr-xr-x 1,124 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all qa=+all

DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)

# DEB_VERSION
include /usr/share/dpkg/pkg-info.mk

CMAKE_OPTIONS := \
	-DARES_BUILD_LOCAL=OFF \
	-DARES_ENABLE_MINIMUM_CPU=OFF \
	-DARES_SKIP_DEPS=ON \
	-DARES_VERSION_OVERRIDE="v$(DEB_VERSION)" \
	-DWITH_SYSTEM_ZLIB=ON

cores := a26;fc;sfc;sg;ms;ps1;pce;ng;msx;cv;myvision;gb;gba;ws;ngp;spec
# Reimplementation of older disable-md-on-32bit.patch
ifneq ($(shell $(CXX) -E -dM - < /dev/null | grep INT128),)
	cores += ;md
endif

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
    BUILDOPT=RelWithDebInfo
else
    BUILDOPT=Debug
endif

# Enforce Debian microarchitecture baseline on amd64
# Reimplementation of no-optional-extensions.patch
ifeq ($(DEB_HOST_ARCH_CPU),amd64)
	export DEB_CFLAGS_MAINT_APPEND=-march=x86-64
	export DEB_CXXFLAGS_MAINT_APPEND=-march=x86-64
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
	$(CMAKE_OPTIONS) \
	-DCMAKE_BUILD_TYPE=$(BUILDOPT) \
	-DARES_CORES="$(cores)"

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp