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
|