File: rules

package info (click to toggle)
dxvk 2.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,932 kB
  • sloc: cpp: 114,314; ansic: 572; sh: 468; makefile: 45
file content (81 lines) | stat: -rwxr-xr-x 2,740 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

# The name of the build-*.txt profile to choose
BUILD_NAME = win$(DEB_HOST_ARCH_BITS)

# The directory in which we will build
BUILD_DIR   = build-$(BUILD_NAME)

%:
	dh $@ --buildsystem=ninja --builddirectory=$(BUILD_DIR)

# fails with: unrecognized option '-z'
export DEB_BUILD_MAINT_OPTIONS := hardening=-relro

# Use amd64 build flags when building the package on 64 bit architectures, i386
# otherwise
ifeq ($(DEB_HOST_ARCH_BITS),64)
	CFLAGS = $(shell dpkg-architecture -aamd64 -f -c dpkg-buildflags --get CFLAGS)
	CXXFLAGS = $(shell dpkg-architecture -aamd64 -f -c dpkg-buildflags --get CXXFLAGS)
else
	CFLAGS = $(shell dpkg-architecture -ai386 -f -c dpkg-buildflags --get CFLAGS)
	CXXFLAGS = $(shell dpkg-architecture -ai386 -f -c dpkg-buildflags --get CXXFLAGS)
endif

LDFLAGS += -flto -Wl,--build-id

# Meson flags
# TODO: why do dll files end-up in the bindir directory???
MESON_FLAGS = --buildtype=plain \
               --cross-file=build-$(BUILD_NAME).txt \
			   --prefix=/usr \
			   --bindir=lib/dxvk/wine$(DEB_HOST_ARCH_BITS) \
			   --libdir=lib/dxvk/wine$(DEB_HOST_ARCH_BITS) \
               $(BUILD_DIR)

override_dh_auto_configure:
	echo "blhc: ignore-line-regexp: C\+\+ linker for the build machine: .*"

	mkdir -p include/vulkan/include include/spirv/include
	# DXVK 2.0 now links to vulkan and spirv headers using submodules
	# add temporary symlinks to use packaged headers instead
	ln -s /usr/include/vulkan include/vulkan/include/vulkan
	ln -s /usr/include/vk_video include/vulkan/include/vk_video
	ln -s /usr/include/spirv include/spirv/include/spirv
	# DXVK 2.1 now embeds libdisplay-info
	# TODO: use libdisplay-info-src instead when no need for the fork
	#ln -s /usr/src/libdisplay-info-src subprojects/libdisplay-info
	tar xf debian/vendor.xz

	echo "MESON_FLAGS: $(MESON_FLAGS)"
	meson setup $(MESON_FLAGS)

execute_after_dh_auto_install:
	# we could change the install script but then the previous installations would be broken
	rename 's/\.dll$$/.dll.so/' debian/tmp/usr/lib/dxvk/wine$(DEB_HOST_ARCH_BITS)/*.dll

override_dh_strip:
	# strip debug info out of ddls and store it in a separate debug file
	# (dh_strip for windows)
	./debian/strip_debug.sh dxvk-wine$(DEB_HOST_ARCH_BITS)
	# call dh_strip to create the doc directory
	dh_strip

override_dh_shlibdeps:
	dh_shlibdeps -- -l/usr/lib/$(DEB_HOST_MULTIARCH)/wine

execute_after_dh_clean:
	rm -rf include/vulkan include/spirv subprojects



vendor:
	rm -rf subprojects
	mkdir subprojects/
	git clone -b windows https://gitlab.freedesktop.org/JoshuaAshton/libdisplay-info.git subprojects/libdisplay-info
	rm -rf subprojects/*/.git*
	tar cvJf debian/vendor.xz subprojects
	rm -rf subprojects