3 # Uncomment this to turn on verbose mode.
6 include /usr/share/quilt/quilt.make
9 #let's help configure to figure out our host/build system
10 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
14 CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
16 CONFFLAGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
19 CONFFLAGS += --prefix=/usr
20 # svg2png is required to display country flags
21 CONFFLAGS += --enable-svg2png-scaling-flag="8 16 32 48 96"
23 # Force svg2png conversion using rsvg-convert since it is the most reliable
25 CONFFLAGS += --with-svg2png-use-rsvg-convert
28 CONFFLAGS += --enable-gui-gtk --enable-gui-internal \
31 # Enable python binding
32 CONFFLAGS += --enable-binding-python
36 CONFFLAGS += --disable-graphics-gd --disable-graphics-sdl
38 # don't build the samplemap - we don't want to download
39 # stuff while building...
40 CONFFLAGS += --disable-samplemap
42 # Disable garmin until libgarmin enters Debian
43 CONFFLAGS += --disable-garmin
45 # disable gypsy support as there's no gypsy in Debian
46 CONFFLAGS += --disable-vehicle-gypsy
48 # Avoid floating point calculation for armel
49 ifeq ($(DEB_HOST_ARCH), armel)
50 CONFFLAGS += --enable-avoid-float
53 #let's take care of optimization + debug builds
55 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
61 config-stamp: debian/stamp-patched
62 [ -f ltmain.sh ] || cp /usr/share/libtool/ltmain.sh .
63 [ -f configure ] || sh autogen.sh
64 LDFLAGS="$(LINKER_FLAGS)" \
66 ./configure $(CONFFLAGS)
71 build-stamp: config-stamp
78 clean: clean-patched unpatch
82 rm -f build-stamp config-stamp
84 # Add here commands to clean up after the build process.
85 [ ! -f Makefile ] || $(MAKE) distclean
86 find $(CURDIR) -name Makefile.in -print0 | xargs -0 rm -f
87 find $(CURDIR)/intl -mindepth 1 -name VERSION -o -type f -print0 | xargs -0 rm -f
88 find $(CURDIR)/po -mindepth 1 -name '*.po.in' -o -name Makefile.am -o -print0 | xargs -0 rm -f
89 find $(CURDIR) -name .libs -type d -print0 | xargs -0 rm -rf
90 find $(CURDIR) -name .deps -type d -print0 | xargs -0 rm -rf
91 rm -f ABOUT-NLS INSTALL aclocal.m4 compile config.guess \
92 config.h.in config.rpath config.sub configure depcomp \
93 install-sh missing mkinstalldirs ltmain.sh
94 rm -rf autom4te.cache m4
95 rm -f navit/graphics/cogl/graphics_cogl.loT
106 # Add here commands to install the package into debian/tmp.
107 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
109 # Default navit configuration file moved into /etc
110 mv $(CURDIR)/debian/tmp/usr/share/navit/navit.xml \
111 $(CURDIR)/debian/navit/etc/navit
113 # Handled by debian/navit.docs
114 rm $(CURDIR)/debian/tmp/usr/share/navit/README
118 # Build architecture-independent files here.
119 binary-indep: build install
122 dh_installchangelogs -i
124 dh_installexamples -i
126 # dh_installdebconf -i
127 # dh_installlogrotate -i
128 # dh_installemacsen -i
129 # dh_installcatalogs -i
150 # Build architecture-dependent files here.
151 binary-arch: build install
154 dh_installchangelogs -a
156 dh_installexamples -a
158 # dh_installdebconf -a
159 # dh_installlogrotate -a
160 # dh_installemacsen -a
161 # dh_installcatalogs -a
185 binary: binary-indep binary-arch
186 .PHONY: build clean binary-indep binary-arch binary install