File: rules

package info (click to toggle)
bglibs 2.04%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,368 kB
  • sloc: ansic: 15,820; perl: 674; sh: 64; makefile: 26
file content (34 lines) | stat: -rwxr-xr-x 866 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CC = gcc
include /usr/share/dpkg/default.mk
DESTDIR=$(CURDIR)/debian/tmp
PKG_LIB = debian/libbg2
PKG_DEV = debian/libbg-dev

%:
	dh $@

override_dh_auto_configure:
	echo $(CC) $(CFLAGS) $(CPPFLAGS) > conf-cc
	echo $(CC) $(LDFLAGS) > conf-ld
	echo $(DESTDIR)/usr/share/man > conf-man
	echo $(DESTDIR)/usr/bin > conf-bin
	echo $(CURDIR)/$(PKG_DEV)/usr/include > conf-include
	echo $(CURDIR)/$(PKG_LIB)/usr/lib > conf-lib

override_dh_auto_build:
	dh_auto_build -- libraries man programs
	doxygen config.dxy

override_dh_auto_test:
	dh_auto_test -- selftests

override_dh_auto_install:
	$(MAKE) install
	rm $(PKG_LIB)/usr/lib/*.la
	# Static linking is part of development suite
	mkdir $(PKG_DEV)/usr/lib
	mv $(PKG_LIB)/usr/lib/*.a $(PKG_DEV)/usr/lib
	mv $(PKG_LIB)/usr/lib/libbg.so $(PKG_DEV)/usr/lib