File: rules

package info (click to toggle)
wlcs 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,288 kB
  • sloc: cpp: 12,596; xml: 6,521; ansic: 300; sh: 164; makefile: 33
file content (48 lines) | stat: -rwxr-xr-x 1,327 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
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifneq (,$(filter $(DEB_HOST_ARCH), armel mips mipsel powerpc))
  export DEB_LDFLAGS_MAINT_APPEND = -latomic
endif

WITH_ASAN  = -DWLCS_BUILD_ASAN=ON
WITH_UBSAN = -DWLCS_BUILD_UBSAN=ON
WITH_TSAN  = -DWLCS_BUILD_TSAN=ON

ifeq ($(DEB_DISTRIBUTION),xenial)
  ifneq ($(filter arm64 ppc64el, $(DEB_HOST_ARCH)),)
    # arm64 on 16.04 does not have tsan
    WITH_TSAN = -DWLCS_BUILD_TSAN=OFF
  endif
endif

ifneq ($(filter armel armhf i386 mipsel mips64el s390x alpha hppa ia64 m68k powerpc riscv64 sh4 sparc64 x32, $(DEB_HOST_ARCH)),)
  WITH_TSAN = -DWLCS_BUILD_TSAN=OFF
endif

ifneq ($(filter mipsel mips64el alpha hppa ia64 m68k powerpc riscv64 sh4, $(DEB_HOST_ARCH)),)
  WITH_UBSAN = -DWLCS_BUILD_UBSAN=OFF
endif

ifneq ($(filter mipsel mips64el s390x alpha hppa ia64 m68k riscv64 sh4 sparc64, $(DEB_HOST_ARCH)),)
  WITH_ASAN = -DWLCS_BUILD_ASAN=OFF
endif

COMMON_CONFIGURE_OPTIONS =\
  $(WITH_ASAN) \
  $(WITH_UBSAN) \
  $(WITH_TSAN) \
  -DCMAKE_INSTALL_LIBEXECDIR="lib/${DEB_HOST_MULTIARCH}"

override_dh_auto_configure:
	dh_auto_configure -- $(COMMON_CONFIGURE_OPTIONS)

%:
	dh $@

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..