1 include $(top_srcdir)/Makefile.inc
2 DIST_SUBDIRS=binding map fib-1.1 font fonts gui graphics osd speech support vehicle xpm maps
3 SUBDIRS=binding map fib-1.1 font gui graphics osd speech support vehicle xpm
12 AM_CPPFLAGS = -I$(top_srcdir)/navit/fib-1.1 @NAVIT_CFLAGS@ @ZLIB_CFLAGS@ -DPREFIX=\"@prefix@\" -DLIBDIR=\"@libdir@\" -DMODULE=navit
13 BUILT_SOURCES = version.h navit_config.h
15 BUILT_SOURCES += osm2navit$(EXEEXT)
19 lib_LTLIBRARIES = libnavit.la
20 libnavit_la_LDFLAGS = -module -avoid-version @MODULE_LDFLAGS@ -Wl,--no-undefined
21 libnavit_la_LIBADD = @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib -llog
24 bin_PROGRAMS = navit osm2navit
25 noinst_LTLIBRARIES = libnavit.la
28 pkgdata_DATA = navit.xml
30 EXTRA_DIST = navit_shipped.xml
32 libnavit_la_SOURCES = announcement.c atom.c attr.c cache.c callback.c command.c compass.c coord.c country.c cursor.c data_window.c debug.c \
33 event.c event_glib.h file.c graphics.c gui.c item.c layout.c log.c main.c map.c \
34 linguistics.c mapset.c maptype.c menu.c messages.c navit.c navigation.c osd.c param.c phrase.c plugin.c popup.c \
35 profile.c projection.c roadprofile.c route.c search.c speech.c start_real.c transform.c track.c \
36 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 coord.h country.h \
37 cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h event.h \
38 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\
39 map_data.h mapset.h maptype.h menu.h messages.h navigation.h navit.h osd.h \
40 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 \
41 transform.h track.h util.h vehicle.h vehicleprofile.h window.h xmlconfig.h zipfile.h \
45 navit.xml: navit_shipped.xml $(foreach xslt, $(subst $(comma), ,@XSLTS@), $(addsuffix .xslt,$(addprefix xslt/,$(xslt))))
48 if [ "$(builddir)" != "$(srcdir)" ]; then cp $(srcdir)/navit.dtd $(builddir)/navit.dtd; fi
49 for i in $^; do if [ "$${i%.xslt}" != "$$i" ]; then saxon -snone navit.xml.tmp $$i >navit.xml.new || exit ; fi ; done
50 mv navit.xml.new navit.xml
54 libnavit_la_SOURCES += android.c
60 android/build.xml: android/AndroidManifest.xml
61 if [ "$(builddir)" != "$(srcdir)" ]; then cp -rp $(srcdir)/android $(builddir)/android; fi
62 android update project -t 3 -p android
64 apk: all android/build.xml navit.xml
65 mkdir -p android/libs/armeabi
66 cp .libs/*.so */*/.libs/*.so android/libs/armeabi
67 for i in $(shell cd $(srcdir)/xpm && echo *.xpm); do convert $(srcdir)/xpm/$$i android/res/drawable/$${i%.xpm}.png; done
68 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
69 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
70 mkdir -p android/res/raw
71 for i in $(shell cd ../po && echo *.mo); do cp ../po/$$i android/res/raw/$$( echo $$i | tr "[A-Z]" "[a-z]") ; done
72 cp navit.xml android/res/raw
73 cd android && ant debug
76 navit_SOURCES = start.c
77 navit_LDADD = libnavit.la @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
79 osm2navit_CPPFLAGS = $(AM_CPPFLAGS) @ZLIB_CFLAGS@ @POSTGRESQL_CFLAGS@
80 osm2navit_SOURCES = osm2navit.c
81 osm2navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @POSTGRESQL_LIBS@ @INTLLIBS@
85 libnavit_la_SOURCES += event_glib.c
89 navit_SOURCES += builtin.c
90 navit_LDADD += $(wildcard $(top_builddir)/navit/*/*/*.la)
91 osm2navit_SOURCES += support-builtin.c
92 osm2navit_LDADD += $(wildcard $(top_builddir)/navit/support/*/*.la)
96 navit_LDADD += resource.rsc
98 navit_LDADD += -lcommctrl
100 navit_LDADD += -lgdi32 -lcomctl32
103 resource.rsc: $(top_srcdir)/navit/gui/win32/resources/resource.rc
104 $(WINDRES) -I $(top_srcdir)/navit/gui/win32/resources $(top_srcdir)/navit/gui/win32/resources/resource.rc resource.rsc
107 .PHONY: version.h.tmp
110 echo "#include \"config.h\"" >version.h.tmp
112 echo "#define SVN_VERSION \"$$(LANG=C svnversion 2>/dev/null)\"" >>version.h.tmp
114 echo "#define SVN_VERSION \"@SOURCE_MODE@\"" >>version.h.tmp
116 echo "#define NAVIT_VARIANT \"@NAVIT_VARIANT@\"" >>version.h.tmp
117 if ! diff version.h.tmp version.h >/dev/null 2>/dev/null; \
119 mv version.h.tmp version.h; \
122 version.h: version.h.tmp
124 navit_config.h: ../config.h
125 cp ../config.h navit_config.h.tmp
126 if ! diff navit_config.h.tmp navit_config.h >/dev/null 2>/dev/null; \
128 mv navit_config.h.tmp navit_config.h; \
133 rm -f version.h version.h.tmp navit_config.h navit_config.h.tmp builtin.c support-builtin.c
135 builtin.c: $(top_builddir)/config.h
136 ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >builtin.c
137 echo "extern void builtin_init(void);" >>builtin.c
138 echo "void builtin_init(void) {" >>builtin.c
139 ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/ module_/" >>builtin.c
141 support-builtin.c: $(top_builddir)/config.h
142 ls $(top_builddir)/navit/support/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >support-builtin.c
143 echo "extern void builtin_init(void);" >>support-builtin.c
144 echo "void builtin_init(void) {" >>support-builtin.c
145 ls $(top_builddir)/navit/support/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/ module_/" >>support-builtin.c
146 echo "}" >>support-builtin.c