File: rules

package info (click to toggle)
libpng1.6 1.6.36-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,608 kB
  • sloc: ansic: 58,101; sh: 4,974; awk: 782; makefile: 544; asm: 205; cpp: 135
file content (33 lines) | stat: -rwxr-xr-x 1,051 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
#!/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 DEB_LDFLAGS_MAINT_APPEND  := -Wl,--as-needed
CC?=gcc

%:
	dh $@

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

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

override_dh_installexamples:
	dh_installexamples -plibpng-dev example.c pngtest.c pngtest.png

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