File: rules

package info (click to toggle)
mpeg2dec 0.5.1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,788 kB
  • ctags: 1,850
  • sloc: ansic: 15,471; asm: 279; sh: 225; makefile: 119
file content (56 lines) | stat: -rwxr-xr-x 2,023 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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

LDFLAGS += -Wl,-z,defs -Wl,--as-needed

# leave it to the upstream configure to select the opt flag, presumably -O3
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    DEB_OPT_FLAG :=
endif

# override misc optimization flags which are enabled in configure.ac
# XXX (LM) I was told sparc32 isn't so hot these days; ultrasparc might be ok

# a) (all arches) this CPU override might not be needed for x86, as $host is
#    used which should imply i486, but is probably needed for sparc as Debian's
#    sparc port supports sun4m which is older than ultrasparc and this is
#    safest anyway; -march should be used instead of -mcpu, but as upstream
#    uses -mcpu, this is safest
# XXX -mcpu=base not supported despite gcc(1) claiming so
#CFLAGS += -mcpu=base
ifeq ($(DEB_HOST_ARCH),i386)
CFLAGS += -mcpu=i486
endif
ifeq ($(DEB_HOST_ARCH),sparc)
CFLAGS += -mcpu=v7
endif

ifeq ($(DEB_HOST_ARCH),powerpc)
# b) (powerpc) G3s and other OldWorld systems are still supported and don't
#    have altivec
CFLAGS += -mno-altivec -UARCH_PPC
endif
ifeq ($(DEB_HOST_ARCH),sparc)
# c) (sparc) Debian's sparc port supports sun4m which is older than ultrasparc;
#    VIS is an UltraSPARC extension
CFLAGS += -mno-vis
endif

# retrieve the shared library package name (with SONAME) from control
libmpeg2N := $(shell sed -rn 's/^Package:[[:space:]]*(libmpeg2-[0-9]+)[[:space:]]*$$/\1/p' debian/control)

DEB_CONFIGURE_EXTRA_FLAGS += --enable-shared
DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
DEB_SHLIBDEPS_INCLUDE += debian/$(libmpeg2N)/usr/lib/$(DEB_HOST_MULTIARCH)
DEB_DH_MAKESHLIBS_ARGS_libmpeg2-4 += -V 'libmpeg2-4 (>= 0.5.1)'
DEB_AC_AUX_DIR := autotools
DEB_DH_INSTALL_ARGS += --sourcedir=debian/tmp

DEB_MAKE_CHECK_TARGET := check