Fix:Core:Check for fontconfig and provide own fonts if not present
[navit-package] / navit / Makefile.am
1 include $(top_srcdir)/Makefile.inc
2 DIST_SUBDIRS=binding map fib-1.1 font gui graphics osd speech support vehicle xpm maps
3 SUBDIRS=binding map fib-1.1 font gui graphics osd speech support vehicle xpm
4 if BUILD_SAMPLEMAP
5   SUBDIRS += maps
6 endif
7
8 if FONTS
9   SUBDIRS += fonts
10 endif
11
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
14 if BUILD_SAMPLEMAP
15   BUILT_SOURCES += osm2navit$(EXEEXT)
16 endif
17
18 bin_PROGRAMS = navit osm2navit
19
20 pkgdata_DATA = navit.xml
21
22 EXTRA_DIST = navit.xml 
23
24 noinst_LTLIBRARIES        = libnavit.la
25 libnavit_la_SOURCES = atom.c attr.c cache.c callback.c compass.c coord.c country.c cursor.c data_window.c debug.c \
26         event.c event_glib.h file.c graphics.c gui.c item.c layout.c log.c main.c map.c \
27         mapset.c maptype.c menu.c navit.c navigation.c osd.c param.c phrase.c plugin.c popup.c \
28         profile.c projection.c route.c search.c speech.c transform.c track.c \
29         util.c vehicle.c xmlconfig.c atom.h attr.h attr_def.h cache.h callback.h color.h compass.h coord.h country.h \
30         cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h event.h \
31         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\
32         map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \
33         param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h \
34         transform.h track.h util.h vehicle.h window.h xmlconfig.h zipfile.h \
35         navit_nls.h
36
37 navit_SOURCES = start.c
38 navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ -Lfib-1.1 -lfib
39
40 osm2navit_CPPFLAGS = $(AM_CPPFLAGS) @ZLIB_CFLAGS@ @POSTGRESQL_CFLAGS@
41 osm2navit_SOURCES = osm2navit.c
42 osm2navit_LDADD = libnavit.la @NAVIT_LIBS@ @ZLIB_LIBS@ @POSTGRESQL_LIBS@ @INTLLIBS@
43
44 if EVENT_GLIB
45   libnavit_la_SOURCES += event_glib.c
46 endif
47
48 if !PLUGINS
49   navit_SOURCES += builtin.c
50   navit_LDADD += $(wildcard $(top_builddir)/navit/*/*/*.la)
51   osm2navit_SOURCES += support-builtin.c
52   osm2navit_LDADD += $(wildcard $(top_builddir)/navit/support/*/*.la)
53 endif
54
55 if SUPPORT_WIN32
56   navit_LDADD += resource.rsc
57 if SUPPORT_WIN32CE
58   navit_LDADD += -lcommctrl
59 else
60   navit_LDADD += -lgdi32 -lcomctl32
61 endif
62
63 resource.rsc: $(top_srcdir)/navit/gui/win32/resources/resource.rc
64         $(WINDRES) -I $(top_srcdir)/navit/gui/win32/resources $(top_srcdir)/navit/gui/win32/resources/resource.rc resource.rsc
65 endif
66
67 .PHONY: version.h.tmp
68
69 version.h.tmp:
70         echo "#include \"config.h\"" >version.h.tmp
71 if SOURCE_MODE_SVN
72         echo "#define SVN_VERSION \"$$(LANG=C svnversion 2>/dev/null)\"" >>version.h.tmp
73 else
74         echo "#define SVN_VERSION \"@SOURCE_MODE@\"" >>version.h.tmp
75 endif
76         if ! diff version.h.tmp version.h >/dev/null 2>/dev/null; \
77         then \
78                 mv version.h.tmp version.h; \
79         fi
80
81 version.h: version.h.tmp
82
83 distclean-local:
84         rm -f version.h version.h.tmp builtin.c support-builtin.c
85
86 builtin.c: $(top_builddir)/config.h
87         ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >builtin.c
88         echo "extern void builtin_init(void);" >>builtin.c
89         echo "void builtin_init(void) {" >>builtin.c
90         ls $(top_builddir)/navit/*/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/    module_/" >>builtin.c
91         echo "}" >>builtin.c
92 support-builtin.c: $(top_builddir)/config.h
93         ls $(top_builddir)/navit/support/*/*.la | sed -e "s/.la/_init(void);/" -e "s/.*lib/extern void module_/" >support-builtin.c
94         echo "extern void builtin_init(void);" >>support-builtin.c
95         echo "void builtin_init(void) {" >>support-builtin.c
96         ls $(top_builddir)/navit/support/*/*.la | sed -e "s/.la/_init();/" -e "s/.*\\/lib/      module_/" >>support-builtin.c
97         echo "}" >>support-builtin.c