4 # Uncomment this to turn on verbose mode.
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15 ################################################################################
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
29 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
30 CELLINFO_MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
33 # nostrip is handled by dh_strip
35 ################################################################################
41 if [ -r /usr/share/misc/config.sub ] && [ ! -f config.sub.backup ]; then \
42 mv -v config.sub config.sub.backup; \
43 cp -f /usr/share/misc/config.sub $(CURDIR)/config.sub; \
46 if [ -r /usr/share/misc/config.guess ] && [ ! -f config.guess.backup ]; then \
47 mv -v config.guess config.guess.backup; \
48 cp -f /usr/share/misc/config.guess $(CURDIR)/config.guess; \
57 if [ -f config.sub.backup ]; then \
58 mv -fv config.sub.backup config.sub; \
61 if [ -f config.guess.backup ]; then \
62 mv -fv config.guess.backup config.guess; \
65 $(RM) config-stamp configure-stamp
67 configure: configure-stamp
73 --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
75 --mandir=/usr/share/man \
77 CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs,--as-needed"
81 build: config build-stamp
82 build-stamp: configure
85 $(MAKE) $(CELLINFO_MAKEFLAGS)
90 # # touch config.status to prevent execution of autoconf
91 [ ! -f Makefile ] || ( touch config.status && $(MAKE) distclean || true )
93 clean: config-clean distclean
105 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
107 # Build architecture-independent files here.
108 binary-indep: build install
112 dh_installchangelogs -p celltowerinfo NEWS
113 dh_installdocs -p celltowerinfo
114 dh_installexamples -p celltowerinfo
122 # Build architecture-dependent files here.
123 binary-arch: build install
130 dh_install -a --sourcedir=debian/tmp
131 chmod +x $(CURDIR)/debian/maemo-optify
132 $(CURDIR)/debian/maemo-optify
142 binary: binary-indep binary-arch
143 .PHONY: config config-clean configure build clean binary-indep binary-arch binary install