File: rules

package info (click to toggle)
xbacklight 1.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: sh: 4,150; ansic: 302; makefile: 48
file content (39 lines) | stat: -rwxr-xr-x 1,036 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
34
35
36
37
38
39
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
include /usr/share/dpkg/architecture.mk

CFLAGS = -Wall -g

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEFLAGS += -j$(NUMJOBS)
endif

BUILDDIR = build

override_dh_auto_configure:
	autoreconf -vfi
	dh_auto_configure --builddirectory=$(BUILDDIR) -- \
		--disable-silent-rules \
		CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"

build build-arch build-indep binary binary-arch binary-indep:
	dh $@ --builddirectory=$(BUILDDIR)

clean:
	dh $@ --builddirectory=$(BUILDDIR)
	rm -f aclocal.m4 configure config.guess config.sub config.h.in
	rm -f depcomp install-sh missing
	find -name Makefile.in -delete