#!/usr/bin/make -f include /usr/share/quilt/quilt.make # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) ifeq (linux,$(DEB_HOST_ARCH_OS)) ARCH_DEPENDENT_CONFIGURE_PARAMS = --enable-native-affinity else ARCH_DEPENDENT_CONFIGURE_PARAMS = --enable-hwloc endif CFLAGS = $(shell dpkg-buildflags --get CFLAGS) CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) config.status: configure $(QUILT_STAMPFN) dh_testdir [ -r config.sub.orig ] || \ cp -f config.sub config.sub.orig [ -r config.guess.orig ] || \ cp -f config.guess config.guess.orig [ ! -r /usr/share/misc/config.sub ] || \ cp -f /usr/share/misc/config.sub config.sub [ ! -r /usr/share/misc/config.guess ] || \ cp -f /usr/share/misc/config.guess config.guess CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) $(INSTALL_PROGRAM)" ./configure \ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --enable-taskstats --enable-openvz --enable-vserver \ --enable-cgroup $(ARCH_DEPENDENT_CONFIGURE_PARAMS) build: build-stamp build-arch: build build-indep: build build-stamp: config.status scripts/MakeHeader.py Process.c scripts/MakeHeader.py TraceScreen.c dh build --before dh_auto_configure dh build --after dh_auto_configure touch build-stamp clean: unpatch dh_testdir dh_testroot rm -f build-stamp ([ -f Makefile ] && $(MAKE) distclean) || true [ ! -r config.guess.orig ] || \ mv -f config.guess.orig config.guess || : [ ! -r config.sub.orig ] || \ mv -f config.sub.orig config.sub || : dh_clean install: build dh install --before dh_auto_install $(MAKE) install DESTDIR=$(CURDIR)/debian/htop find $(CURDIR)/debian/htop -type d -empty -delete dh install --after dh_auto_install binary-indep: binary-arch: install dh binary-arch binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install