]> git.street.me.uk Git - andy/viking.git/blob - src/Makefile.am
Merge pull request #32 from davidedelvento/installnotes
[andy/viking.git] / src / Makefile.am
1 # This is the Makefile for the Viking GPS viewer program.
2 # This file is licensed through the GPL version 2 or newer.
3
4 SUBDIRS = icons
5
6 bin_PROGRAMS = viking
7
8 noinst_LIBRARIES = libviking.a
9
10 authors.h: $(top_srcdir)/AUTHORS
11         rm -f $@
12         echo "/* Generated file. */" >> $@
13         echo "const gchar *AUTHORS[] = {\\" >> $@
14         sed -e "s/ \*\*.*//" -e 's/^/"/' -e 's/$$/",\\/' -e '$$s/\\$$//' $< >> $@
15         echo "NULL};" >> $@
16
17 if HAVE_XSLTPROC
18 documenters.h: $(top_srcdir)/help/C/viking.xml
19         $(XP) $(srcdir)/docbook2documenters.xsl $(top_srcdir)/help/C/viking.xml > $@
20 else
21 documenters.h:
22         rm -f $@
23         echo "/* Generated file. */" >> $@
24         echo "const gchar *DOCUMENTERS[] = {\\" >> $@
25         echo "NULL};" >> $@
26 endif
27
28 BUILT_SOURCES = authors.h documenters.h
29
30 vikenumtypes.h: vikenumtypes.h.template $(ENUM_H_FILES) $(GLIB_MKENUMS)
31         (cd $(srcdir) && $(GLIB_MKENUMS) --template vikenumtypes.h.template $(ENUM_H_FILES)) > $@
32
33 vikenumtypes.c: vikenumtypes.c.template $(ENUM_H_FILES) $(GLIB_MKENUMS)
34         (cd $(srcdir) && $(GLIB_MKENUMS) --template vikenumtypes.c.template $(ENUM_H_FILES)) > $@
35
36 EXTRA_DIST = \
37         misc/fpconv-license.txt \
38         docbook2documenters.xsl \
39         vikenumtypes.h.template \
40         vikenumtypes.c.template
41
42 BUILT_SOURCES += vikenumtypes.h vikenumtypes.c
43
44 $(BUILT_SOURCES): $(srcdir)/Makefile.am
45
46 ENUM_H_FILES = \
47         vikviewport.h
48
49 libviking_a_SOURCES = \
50         bbox.h \
51         map_ids.h \
52         modules.h modules.c \
53         curl_download.c curl_download.h \
54         compression.c compression.h \
55         menu.xml.h \
56         degrees_converters.c degrees_converters.h \
57         globals.c globals.h \
58         viking.h mapcoord.h config.h \
59         vik_compat.c vik_compat.h \
60         viktrack.c viktrack.h \
61         vikwaypoint.c vikwaypoint.h \
62         clipboard.c clipboard.h \
63         coords.c coords.h \
64         gpsmapper.c gpsmapper.h \
65         gpspoint.c gpspoint.h \
66         geojson.c geojson.h \
67         dir.c dir.h \
68         file.c file.h \
69         fileutils.c fileutils.h \
70         file_magic.c file_magic.h \
71         authors.h \
72         documenters.h \
73         dialog.c dialog.h \
74         util.c util.h \
75         ui_util.c ui_util.h \
76         download.c download.h \
77         jpg.c jpg.h \
78         vikenumtypes.c vikenumtypes.h \
79         viktreeview.c viktreeview.h \
80         viktrwlayer.c viktrwlayer.h \
81         viklayer.c viklayer.h \
82         viklayerspanel.c viklayerspanel.h \
83         vikcoordlayer.c vikcoordlayer.h \
84         vikstatus.c vikstatus.h \
85         vikwindow.c vikwindow.h \
86         vikviewport.c vikviewport.h \
87         vikaggregatelayer.c vikaggregatelayer.h \
88         vikgobjectbuilder.c vikgobjectbuilder.h \
89         vikgpslayer.c vikgpslayer.h \
90         vikgeoreflayer.c vikgeoreflayer.h \
91         vikfileentry.c vikfileentry.h \
92         vikgototool.c vikgototool.h \
93         vikgotoxmltool.c vikgotoxmltool.h \
94         vikgoto.c vikgoto.h \
95         viktrwlayer_export.c viktrwlayer_export.h \
96         viktrwlayer_tpwin.c viktrwlayer_tpwin.h \
97         viktrwlayer_wpwin.c viktrwlayer_wpwin.h \
98         viktrwlayer_propwin.c viktrwlayer_propwin.h \
99         viktrwlayer_analysis.c viktrwlayer_analysis.h \
100         viktrwlayer_tracklist.c viktrwlayer_tracklist.h \
101         viktrwlayer_waypointlist.c viktrwlayer_waypointlist.h \
102         vikrouting.c vikrouting.h \
103         vikroutingengine.c vikroutingengine.h \
104         vikroutingwebengine.c vikroutingwebengine.h \
105         vikutils.c vikutils.h \
106         toolbar.c toolbar.h toolbar.xml.h \
107         thumbnails.c thumbnails.h \
108         md5_hash.c md5_hash.h \
109         background.c background.h \
110         vikradiogroup.c vikradiogroup.h \
111         vikcoord.c vikcoord.h \
112         mapcache.c mapcache.h \
113         maputils.c maputils.h \
114         vikmapsource.c vikmapsource.h \
115         vikmapsourcedefault.c vikmapsourcedefault.h \
116         vikmapslayer.c vikmapslayer.h \
117         vikmapslayer_compat.c vikmapslayer_compat.h \
118         vikmaptype.c vikmaptype.h \
119         vikslippymapsource.c vikslippymapsource.h \
120         vikwmscmapsource.c vikwmscmapsource.h \
121         viktmsmapsource.c viktmsmapsource.h \
122         metatile.c metatile.h \
123         gpx.c gpx.h \
124         garminsymbols.c garminsymbols.h \
125         acquire.c acquire.h \
126         babel.c babel.h \
127         babel_ui.c babel_ui.h \
128         datasource_file.c \
129         datasource_geojson.c \
130         datasource_gps.c datasource_gps.h \
131         datasource_routing.c \
132         datasource_gc.c \
133         datasource_bfilter.c \
134         datasource_wikipedia.c \
135         datasource_url.c \
136         datasources.h \
137         googlesearch.c googlesearch.h \
138         dem.c dem.h \
139         vikdemlayer.h vikdemlayer.c \
140         vikdatetime_edit_dialog.c vikdatetime_edit_dialog.h \
141         vikfilelist.c vikfilelist.h \
142         vikexttool.c vikexttool.h \
143         vikexttools.c vikexttools.h \
144         vikwebtool.c vikwebtool.h \
145         vikwebtoolcenter.c vikwebtoolcenter.h \
146         vikwebtoolbounds.c vikwebtoolbounds.h \
147         vikwebtoolformat.c vikwebtoolformat.h \
148         vikexttool_datasources.c vikexttool_datasources.h \
149         vikwebtool_datasource.c vikwebtool_datasource.h \
150         dems.c dems.h \
151         srtm_continent.c \
152         uibuilder.c uibuilder.h \
153         print-preview.c print-preview.h \
154         print.c print.h \
155         kmz.c kmz.h \
156         viklayer_defaults.c viklayer_defaults.h \
157         settings.c settings.h \
158         preferences.c preferences.h \
159         misc/fpconv.c misc/fpconv.h misc/powers.h \
160         misc/strtod.c misc/strtod.h \
161         misc/kdtree.c misc/kdtree.h \
162         misc/gtkhtml.c misc/gtkhtml-private.h
163
164 if BING
165 libviking_a_SOURCES += \
166         bingmapsource.c bingmapsource.h \
167         bing.c bing.h
168 endif
169
170 if GOOGLE
171 libviking_a_SOURCES += \
172         google.c google.h
173 endif
174
175 if TERRASERVER
176 libviking_a_SOURCES += \
177         terraservermapsource.c terraservermapsource.h \
178         terraserver.c terraserver.h
179 endif
180
181 if EXPEDIA
182 libviking_a_SOURCES += \
183         expedia.c expedia.h
184 endif
185
186 if OPENSTREETMAP
187 libviking_a_SOURCES += \
188         osm.c osm.h \
189         osm-traces.c osm-traces.h \
190         datasource_osm_my_traces.c \
191         datasource_osm.c
192 endif
193
194 if BLUEMARBLE
195 libviking_a_SOURCES += \
196         bluemarble.c bluemarble.h
197 endif
198
199 if GEONAMES
200 libviking_a_SOURCES += \
201         geonames.c geonames.h \
202         geonamessearch.c geonamessearch.h
203 endif
204
205 if GEOTAG
206 libviking_a_SOURCES += \
207         datasource_geotag.c \
208         geotag_exif.c geotag_exif.h \
209         viktrwlayer_geotag.c viktrwlayer_geotag.h
210 endif
211
212 # libexif doesn't have write support of EXIF info - so reused this code from command line exif tool
213 if LIBEXIF
214 libviking_a_SOURCES += \
215         libjpeg/jpeg-data.c libjpeg/jpeg-data.h \
216         libjpeg/jpeg-marker.c libjpeg/jpeg-marker.h
217 endif
218
219 if MAPNIK
220 libviking_a_SOURCES += \
221         vikmapniklayer.c vikmapniklayer.h \
222         mapnik_interface.cpp mapnik_interface.h
223 endif
224
225 viking_SOURCES = main.c
226
227 LDADD           = $(noinst_LIBRARIES) $(PACKAGE_LIBS) @EXPAT_LIBS@ @LIBCURL@ icons/libicons.a
228 if WINDOWS
229 LDADD += \
230         ../win32/installer/pixmaps/viking_icon.o
231 endif
232
233 AM_CFLAGS               = -Wall -g -D_GNU_SOURCE \
234         $(PACKAGE_CFLAGS) \
235         @EXPAT_CFLAGS@ @LIBCURL_CPPFLAGS@
236 AM_CPPFLAGS             = \
237         $(PACKAGE_CFLAGS) \
238         -DVIKING_DATADIR=\""$(pkgdatadir)"\" \
239         -DVIKING_SYSCONFDIR=\""$(sysconfdir)/$(PACKAGE)"\"
240
241 @INTLTOOL_DESKTOP_RULE@
242
243 desktopdir = $(datadir)/applications
244 desktop_in_files = viking.desktop.in
245 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
246 EXTRA_DIST += $(desktop_in_files)
247
248 CLEANFILES = $(BUILT_SOURCES) $(desktop_DATA)