[go: up one dir, main page]

File: rules

package info (click to toggle)
uftrace 0.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,356 kB
  • sloc: ansic: 49,770; python: 11,181; asm: 837; makefile: 769; sh: 637; cpp: 627; javascript: 191
file content (41 lines) | stat: -rwxr-xr-x 920 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# build with PIE explicitly where appropriate
export CFLAGS_uftrace=-fPIE
export CFLAGS_traceevent=-fPIE
export LDFLAGS_uftrace=-pie

# don't put current build paths in executables
export CFLAGS_configure=-ffile-prefix-map=$(CURDIR)=.

LIBDIR := /usr/lib/$(DEB_HOST_MULTIARCH)/uftrace

%:
	dh $@

ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
# suppress man page generation
export has_pandoc=no
endif

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
# verbose build output
export V=1
endif

override_dh_auto_configure:
	LDFLAGS=-Wl,-z,now,-z,relro CFLAGS=$(CFLAGS_configure) ./configure --prefix=/usr --libdir=$(LIBDIR)

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	@echo no tests
#        $(MAKE) -j1 test
endif

override_dh_auto_clean:
	dh_auto_clean
	$(RM) .config
	$(MAKE) -C check-deps check-clean