File: rules

package info (click to toggle)
libpng1.6 1.6.55-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,208 kB
  • sloc: ansic: 58,258; sh: 6,981; awk: 794; cpp: 684; makefile: 617; python: 391; asm: 22
file content (36 lines) | stat: -rwxr-xr-x 1,142 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS   := hardening=+all
export DEB_CFLAGS_MAINT_APPEND   := $(shell dpkg-buildflags --get CPPFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND := $(shell dpkg-buildflags --get CPPFLAGS)
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
CC?=gcc

%:
	dh $@ --buildsystem=cmake

include /usr/share/dpkg/architecture.mk

ifneq (,$(filter $(DEB_HOST_ARCH_CPU),powerpc ppc64))
# VSX is an extension of AltiVec, which is not part of the baseline.
# see https://wiki.debian.org/ArchitectureSpecificsMemo
override_dh_auto_configure:
	dh_auto_configure -- -DPNG_POWERPC_VSX=off
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -g -O2 -c -o pngtest.o pngtest.c -I obj-$(DEB_HOST_GNU_TYPE)
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o pngtest-static -Wall -g -O2  pngtest.o obj-$(DEB_HOST_GNU_TYPE)/libpng16.a -lz -lm
	./pngtest-static
endif
endif

override_dh_makeshlibs:
	dh_makeshlibs --add-udeb=libpng16-16-udeb -a