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 # Disable python binding
32 CONFFLAGS += --disable-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
43 CONFFLAGS += --enable-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 configure ] || sh autogen.sh
63 LDFLAGS="$(LINKER_FLAGS)" \
65 ./configure $(CONFFLAGS)
70 build-stamp: config-stamp
77 clean: clean-patched unpatch
81 rm -f build-stamp config-stamp
83 # Add here commands to clean up after the build process.
84 [ ! -f Makefile ] || $(MAKE) distclean
85 find $(CURDIR) -name Makefile.in -print0 | xargs -0 rm -f
86 find $(CURDIR)/intl -mindepth 1 -name VERSION -o -type f -print0 | xargs -0 rm -f
87 find $(CURDIR)/po -mindepth 1 -name '*.po.in' -o -name Makefile.am -o -print0 | xargs -0 rm -f
88 find $(CURDIR) -name .libs -type d -print0 | xargs -0 rm -rf
89 find $(CURDIR) -name .deps -type d -print0 | xargs -0 rm -rf
90 rm -f ABOUT-NLS INSTALL aclocal.m4 compile config.guess \
91 config.h.in config.rpath config.sub configure depcomp \
92 install-sh missing mkinstalldirs ltmain.sh
93 rm -rf autom4te.cache m4
104 # Add here commands to install the package into debian/tmp.
105 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
107 # Remove unused .la files
108 find $(CURDIR)/debian/tmp/usr/lib/navit -name \*.la -print0 | xargs -0 rm -f
110 # Default navit configuration file moved into /etc
111 mv $(CURDIR)/debian/tmp/usr/share/navit/navit.xml \
112 $(CURDIR)/debian/navit/etc/navit
114 # Handled by debian/navit.docs
115 rm $(CURDIR)/debian/tmp/usr/share/navit/README
117 # Generate icon for Debian menu
118 convert $(CURDIR)/navit/xpm/desktop_icons/128x128/navit.png -resize 32x32 $(CURDIR)/debian/navit-data/usr/share/pixmaps/navit.xpm
122 # Build architecture-independent files here.
123 binary-indep: build install
126 dh_installchangelogs -i
128 dh_installexamples -i
130 # dh_installdebconf -i
131 # dh_installlogrotate -i
132 # dh_installemacsen -i
133 # dh_installcatalogs -i
154 # Build architecture-dependent files here.
155 binary-arch: build install
158 dh_installchangelogs -a
160 dh_installexamples -a
162 # dh_installdebconf -a
163 # dh_installlogrotate -a
164 # dh_installemacsen -a
165 # dh_installcatalogs -a
189 binary: binary-indep binary-arch
190 .PHONY: build clean binary-indep binary-arch binary install