File: rules

package info (click to toggle)
retroarch 1.7.3%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 49,188 kB
  • sloc: ansic: 600,492; cpp: 23,670; objc: 8,299; asm: 6,404; sh: 2,203; xml: 2,144; makefile: 1,867; python: 1,582; java: 941; perl: 393
file content (70 lines) | stat: -rwxr-xr-x 2,473 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Copyright (C) 2012-2015 Hunter Kaller
# Copyright (C) 2014-2017 Sergio Benjamim

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Fix hardening-no-bindnow and hardening-no-pie
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow,+pie

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export DEB_CXXFLAGS_MAINT_STRIP=-O2
export DEB_CFLAGS_MAINT_STRIP=-O2

export QT_SELECT := qt5

ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)

ifeq ($(ARCH), $(filter $(ARCH), amd64 i386))
	CONFIG_EXTRA_FLAGS=--enable-sse
else ifeq ($(ARCH),armhf)
	CONFIG_EXTRA_FLAGS=--disable-cg --enable-opengles --enable-neon --enable-floathard
else ifeq ($(ARCH),arm64)
	CONFIG_EXTRA_FLAGS=--disable-cg --enable-opengles
endif

GIT_HASH := "b2ceb50"

%:
	dh $@

override_dh_auto_configure:
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
		retroarch.cfg > debian/retroarch.cfg
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
		debian/retroarch.dirs.in > debian/retroarch.dirs
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
		debian/retroarch.install.in > debian/retroarch.install
	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
		debian/retroarch.links.in > debian/retroarch.links
	# See ./configure --help for valid flags
	# disable flags (i.e. --disable-ffmpeg for example) if there is no package relative to the feature in Build-Depends
	./configure --prefix=/usr --disable-oss --disable-vg --disable-vulkan --disable-builtinminiupnpc $(CONFIG_EXTRA_FLAGS)

override_dh_auto_build:
	dh_auto_build -- GIT_VERSION="'$(GIT_HASH)'"
	# SoftFilters
	dh_auto_build -- -C gfx/video_filters/
	# Audio DSP plugins
	dh_auto_build -- -C libretro-common/audio/dsp_filters/

override_dh_auto_install:

override_dh_auto_clean:
	touch config.mk
	dh_auto_clean
	dh_auto_clean -- -C gfx/video_filters/ clean
	dh_auto_clean -- -C libretro-common/audio/dsp_filters/ clean