daef9e607419bf8d95eb4158773a93136bbfd4c2
[navit-package] / navit / Makefile.am
1 include $(top_srcdir)/Makefile.inc
2 DIST_SUBDIRS=binding data fib-1.1 gui graphics osd speech support vehicle xpm maps
3 SUBDIRS=binding data fib-1.1 gui graphics osd speech support vehicle xpm
4 if BUILD_SAMPLEMAP
5   SUBDIRS += maps
6 endif
7
8 AM_CPPFLAGS = -I$(top_srcdir)/navit/fib-1.1 @NAVIT_CFLAGS@ @ZLIB_CFLAGS@ -DPREFIX=\"@prefix@\" -DMODULE=navit
9 BUILT_SOURCES=osm2navit$(EXEEXT) version.h
10 bin_PROGRAMS = navit osm2navit
11
12 pkgdata_DATA = navit.xml
13
14 EXTRA_DIST = navit.xml 
15
16 noinst_LTLIBRARIES        = libnavit.la
17 libnavit_la_SOURCES = attr.c cache.c callback.c compass.c coord.c country.c cursor.c data_window.c debug.c \
18         event.c event_glib.h file.c graphics.c gui.c item.c layout.c log.c main.c map.c \
19         mapset.c maptype.c menu.c navit.c navigation.c osd.c param.c phrase.c plugin.c popup.c \
20         profile.c projection.c route.c search.c speech.c transform.c track.c \
21         util.c vehicle.c xmlconfig.c attr.h attr_def.h cache.h callback.h color.h compass.h coord.h country.h \
22         cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h event.h \
23         file.h graphics.h gtkext.h gui.h item.h item_def.h keys.h log.h layer.h layout.h main.h map-share.h map.h\
24         map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \
25         param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h \
26         transform.h track.h util.h vehicle.h window.h xmlconfig.h zipfile.h
27
28 navit_SOURCES = start.c
29 navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
30
31 osm2navit_CPPFLAGS = $(AM_CPPFLAGS) @ZLIB_CFLAGS@ @POSTGRESQL_CFLAGS@
32 osm2navit_SOURCES = osm2navit.c
33 osm2navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @POSTGRESQL_LIBS@ @INTLLIBS@
34
35 if EVENT_GLIB
36   libnavit_la_SOURCES += event_glib.c
37 endif
38
39 if !PLUGINS
40   navit_SOURCES += builtin.c
41   navit_LDADD += $(wildcard $(top_builddir)/navit/*/*/*.la)
42 endif
43
44 .PHONY: version.h.tmp
45
46 version.h.tmp:
47         echo "#include \"config.h\"" >version.h.tmp
48         echo "#define SVN_VERSION \"$$(LANG=C svnversion 2>/dev/null)\"" >>version.h.tmp
49         if ! diff version.h.tmp version.h >/dev/null 2>/dev/null; \
50         then \
51                 mv version.h.tmp version.h; \
52         fi
53
54 version.h: version.h.tmp
55
56 distclean-local:
57         rm -f version.h version.h.tmp
58
59 builtin.c:
60         ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >builtin.c
61         echo "extern void builtin_init(void);" >>builtin.c
62         echo "void builtin_init(void) {" >>builtin.c
63         ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/    module_/" >>builtin.c
64         echo "}" >>builtin.c