1 include $(top_srcdir)/Makefile.inc
3 SUBDIRS=fib-1.1 support
7 DIST_SUBDIRS=binding map maptool fib-1.1 font fonts gui graphics osd speech support vehicle xpm maps
8 SUBDIRS+=binding map font gui graphics osd speech vehicle xpm
24 AM_CPPFLAGS = -I$(top_srcdir)/navit/fib-1.1 @NAVIT_CFLAGS@ @ZLIB_CFLAGS@ -DPREFIX=\"@prefix@\" -DLIBDIR=\"@libdir@\" -DMODULE=navit
25 BUILT_SOURCES = version.h navit_config.h
28 lib_LTLIBRARIES = libnavit.la
29 libnavit_la_LDFLAGS = -module -avoid-version @MODULE_LDFLAGS@ -Wl,--no-undefined
30 libnavit_la_LIBADD = @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib -llog
34 noinst_LTLIBRARIES = libnavit.la
37 pkgdata_DATA = navit.xml
39 EXTRA_DIST = navit_shipped.xml navit.dtd
41 libnavit_la_SOURCES = announcement.c atom.c attr.c cache.c callback.c command.c compass.c config_.c coord.c country.c data_window.c debug.c \
42 event.c event_glib.h file.c graphics.c gui.c item.c layout.c log.c main.c map.c \
43 linguistics.c mapset.c maptype.c menu.c messages.c navit.c navigation.c osd.c param.c phrase.c plugin.c popup.c \
44 profile.c projection.c roadprofile.c route.c routech.c search.c speech.c start_real.c transform.c track.c \
45 util.c vehicle.c vehicleprofile.c xmlconfig.c announcement.h atom.h attr.h attr_def.h cache.h callback.h color.h command.h compass.h config_.h coord.h country.h \
46 data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h event.h \
47 file.h graphics.h gtkext.h gui.h item.h item_def.h keys.h log.h layer.h layout.h linguistics.h main.h map-share.h map.h\
48 map_data.h mapset.h maptype.h menu.h messages.h navigation.h navit.h osd.h \
49 param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h roadprofile.h search.h speech.h start_real.h \
50 transform.h track.h util.h vehicle.h vehicleprofile.h window.h xmlconfig.h zipfile.h \
51 navit_nls.h sunriset.c sunriset.h
55 navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,$(XSLTS)), $(addsuffix .xslt,$(addprefix xslt/,$(xslt))))
57 if [ ! -f "$(builddir)/navit.dtd" ]; then cp -f $(srcdir)/navit.dtd $(builddir)/navit.dtd; fi
58 for i in $^; do if [ "$${i%.xslt}" != "$$i" ]; then echo "Applying $$i" ; @SAXON@ -snone navit.xml.new $$i >navit.xml.tmp || exit ; mv navit.xml.tmp navit.xml.new || exit ; fi ; done
59 mv navit.xml.new navit.xml
64 libnavit_la_SOURCES += android.c
68 android/AndroidManifest.xml: android/AndroidManifest.xml.in
69 mkdir -p $(builddir)/android
70 sed '0,/<uses-sdk/!d' <$< >$@
71 for i in $(subst $(comma), ,@ANDROID_PERMISSIONS@); do echo " <uses-permission android:name=\"android.permission.$$i\" />" >>$@; done
72 sed '0,/<uses-sdk/d' <$< >>$@
75 android/build.xml: android/AndroidManifest.xml
77 if [ "$(builddir)" != "$(srcdir)" ]; then cp -rp $(srcdir)/android/* $(builddir)/android; fi
78 android update project -t 3 -p android
80 apk: all android/build.xml navit.xml
81 mkdir -p android/libs/armeabi
82 cp .libs/*.so */*/.libs/*.so android/libs/armeabi
83 for i in $(shell cd $(srcdir)/xpm && echo *.xpm); do convert $(srcdir)/xpm/$$i android/res/drawable/$${i%.xpm}.png; done
84 for i in $(shell cd $(srcdir)/xpm && echo *.png); do cp $(srcdir)/xpm/$$i android/res/drawable/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done
85 if [ "$(builddir)" != "$(srcdir)" ]; then for i in $(shell cd $(builddir)/xpm && echo *.png); do cp $(builddir)/xpm/$$i android/res/drawable/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done ; fi
86 mkdir -p android/res/raw
87 for i in $(shell cd ../po && echo *.mo); do cp ../po/$$i android/res/raw/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done
88 cp navit.xml android/res/raw
89 cd android && ant debug
92 navit_SOURCES = start.c
93 navit_LDADD = libnavit.la @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
98 libnavit_la_SOURCES += event_glib.c
102 navit_SOURCES += builtin.c
103 navit_LDADD += $(wildcard $(top_builddir)/navit/*/*/*.la)
107 navit_LDADD += resource.rsc
109 navit_LDADD += -lcommctrl
111 navit_LDADD += -lgdi32 -lcomctl32
114 resource.rsc: $(top_srcdir)/navit/gui/win32/resources/resource.rc
115 $(WINDRES) -I $(top_srcdir)/navit/gui/win32/resources $(top_srcdir)/navit/gui/win32/resources/resource.rc resource.rsc
118 .PHONY: version.h.tmp
121 echo "#include \"config.h\"" >version.h.tmp
123 echo "#define SVN_VERSION \"$$(LANG=C svnversion 2>/dev/null)\"" >>version.h.tmp
125 echo "#define SVN_VERSION \"@SOURCE_MODE@\"" >>version.h.tmp
127 echo "#define NAVIT_VARIANT \"@NAVIT_VARIANT@\"" >>version.h.tmp
128 if ! diff version.h.tmp version.h >/dev/null 2>/dev/null; \
130 mv version.h.tmp version.h; \
133 version.h: version.h.tmp
135 navit_config.h: ../config.h
136 cp ../config.h navit_config.h.tmp
137 if ! diff navit_config.h.tmp navit_config.h >/dev/null 2>/dev/null; \
139 mv navit_config.h.tmp navit_config.h; \
144 rm -f version.h version.h.tmp navit_config.h navit_config.h.tmp builtin.c support-builtin.c navit.xml
145 if [ "$(builddir)" != "$(srcdir)" ]; then rm -f navit.dtd; fi
147 builtin.c: $(top_builddir)/config.h
148 ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >builtin.c
149 echo "extern void builtin_init(void);" >>builtin.c
150 echo "void builtin_init(void) {" >>builtin.c
151 ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/ module_/" >>builtin.c
153 support-builtin.c: $(top_builddir)/config.h
154 ls $(top_builddir)/navit/support/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >support-builtin.c
155 echo "extern void builtin_init(void);" >>support-builtin.c
156 echo "void builtin_init(void) {" >>support-builtin.c
157 ls $(top_builddir)/navit/support/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/ module_/" >>support-builtin.c
158 echo "}" >>support-builtin.c