2 # -*- mode: makefile; coding: utf-8 -*-
4 # Uncomment this to turn on verbose mode.
9 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
15 CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D DEBUG -D VALGRIND
16 EXTRA_ARGS = --with-backtrace
21 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
26 ifneq (,$(findstring sprofiling,$(DEB_BUILD_OPTIONS)))
27 CFLAGS += -D SIZE_DEBUG
35 CFLAGS="$(CFLAGS)"; LDFLAGS="$(LDFLAGS)"; ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
47 rm -f build-stamp install*-stamp
49 [ ! -f Makefile ] || $(MAKE) distclean
53 install: install-stamp
54 install-stamp: build-stamp
60 $(MAKE) DESTDIR=`pwd`/debian/tmp install
64 # Build architecture-independent files here.
65 binary-indep: build install
68 # dh_installdocs -i -A README
69 # dh_installchangelogs -i debian/no-upstream-changelog
70 # dh_install -i --sourcedir=debian/tmp
81 # Build architecture-dependent files here.
82 binary-arch: build install
85 dh_installchangelogs -a -plibcitadel2
87 dh_install -a --sourcedir=debian/tmp
89 dh_strip -a --dbg-package=libcitadel2-dbg
100 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
102 binary: binary-indep binary-arch
103 .PHONY: build clean binary-indep binary-arch binary install