]> git.street.me.uk Git - andy/viking.git/blob - src/Makefile.am
Reduce compiler warnings on Windows.
[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         authors.h \
71         documenters.h \
72         dialog.c dialog.h \
73         util.c util.h \
74         ui_util.c ui_util.h \
75         download.c download.h \
76         jpg.c jpg.h \
77         vikenumtypes.c vikenumtypes.h \
78         viktreeview.c viktreeview.h \
79         viktrwlayer.c viktrwlayer.h \
80         viklayer.c viklayer.h \
81         viklayerspanel.c viklayerspanel.h \
82         vikcoordlayer.c vikcoordlayer.h \
83         vikstatus.c vikstatus.h \
84         vikwindow.c vikwindow.h \
85         vikviewport.c vikviewport.h \
86         vikaggregatelayer.c vikaggregatelayer.h \
87         vikgobjectbuilder.c vikgobjectbuilder.h \
88         vikgpslayer.c vikgpslayer.h \
89         vikgeoreflayer.c vikgeoreflayer.h \
90         vikfileentry.c vikfileentry.h \
91         vikgototool.c vikgototool.h \
92         vikgotoxmltool.c vikgotoxmltool.h \
93         vikgoto.c vikgoto.h \
94         viktrwlayer_export.c viktrwlayer_export.h \
95         viktrwlayer_tpwin.c viktrwlayer_tpwin.h \
96         viktrwlayer_wpwin.c viktrwlayer_wpwin.h \
97         viktrwlayer_propwin.c viktrwlayer_propwin.h \
98         viktrwlayer_analysis.c viktrwlayer_analysis.h \
99         viktrwlayer_tracklist.c viktrwlayer_tracklist.h \
100         viktrwlayer_waypointlist.c viktrwlayer_waypointlist.h \
101         vikrouting.c vikrouting.h \
102         vikroutingengine.c vikroutingengine.h \
103         vikroutingwebengine.c vikroutingwebengine.h \
104         vikutils.c vikutils.h \
105         toolbar.c toolbar.h toolbar.xml.h \
106         thumbnails.c thumbnails.h \
107         md5_hash.c md5_hash.h \
108         background.c background.h \
109         vikradiogroup.c vikradiogroup.h \
110         vikcoord.c vikcoord.h \
111         mapcache.c mapcache.h \
112         maputils.c maputils.h \
113         vikmapsource.c vikmapsource.h \
114         vikmapsourcedefault.c vikmapsourcedefault.h \
115         vikmapslayer.c vikmapslayer.h \
116         vikmapslayer_compat.c vikmapslayer_compat.h \
117         vikmaptype.c vikmaptype.h \
118         vikslippymapsource.c vikslippymapsource.h \
119         vikwmscmapsource.c vikwmscmapsource.h \
120         viktmsmapsource.c viktmsmapsource.h \
121         metatile.c metatile.h \
122         gpx.c gpx.h \
123         garminsymbols.c garminsymbols.h \
124         acquire.c acquire.h \
125         babel.c babel.h \
126         babel_ui.c babel_ui.h \
127         datasource_file.c \
128         datasource_geojson.c \
129         datasource_gps.c datasource_gps.h \
130         datasource_routing.c \
131         datasource_gc.c \
132         datasource_bfilter.c \
133         datasource_wikipedia.c \
134         datasource_url.c \
135         datasources.h \
136         googlesearch.c googlesearch.h \
137         dem.c dem.h \
138         vikdemlayer.h vikdemlayer.c \
139         vikdatetime_edit_dialog.c vikdatetime_edit_dialog.h \
140         vikfilelist.c vikfilelist.h \
141         vikexttool.c vikexttool.h \
142         vikexttools.c vikexttools.h \
143         vikwebtool.c vikwebtool.h \
144         vikwebtoolcenter.c vikwebtoolcenter.h \
145         vikwebtoolbounds.c vikwebtoolbounds.h \
146         vikwebtoolformat.c vikwebtoolformat.h \
147         vikexttool_datasources.c vikexttool_datasources.h \
148         vikwebtool_datasource.c vikwebtool_datasource.h \
149         dems.c dems.h \
150         srtm_continent.c \
151         uibuilder.c uibuilder.h \
152         print-preview.c print-preview.h \
153         print.c print.h \
154         kmz.c kmz.h \
155         viklayer_defaults.c viklayer_defaults.h \
156         settings.c settings.h \
157         preferences.c preferences.h \
158         misc/fpconv.c misc/fpconv.h misc/powers.h \
159         misc/strtod.c misc/strtod.h \
160         misc/kdtree.c misc/kdtree.h
161
162 if BING
163 libviking_a_SOURCES += \
164         bingmapsource.c bingmapsource.h \
165         bing.c bing.h
166 endif
167
168 if GOOGLE
169 libviking_a_SOURCES += \
170         google.c google.h
171 endif
172
173 if TERRASERVER
174 libviking_a_SOURCES += \
175         terraservermapsource.c terraservermapsource.h \
176         terraserver.c terraserver.h
177 endif
178
179 if EXPEDIA
180 libviking_a_SOURCES += \
181         expedia.c expedia.h
182 endif
183
184 if OPENSTREETMAP
185 libviking_a_SOURCES += \
186         osm.c osm.h \
187         osm-traces.c osm-traces.h \
188         datasource_osm_my_traces.c \
189         datasource_osm.c
190 endif
191
192 if BLUEMARBLE
193 libviking_a_SOURCES += \
194         bluemarble.c bluemarble.h
195 endif
196
197 if GEONAMES
198 libviking_a_SOURCES += \
199         geonames.c geonames.h \
200         geonamessearch.c geonamessearch.h
201 endif
202
203 if GEOTAG
204 libviking_a_SOURCES += \
205         datasource_geotag.c \
206         geotag_exif.c geotag_exif.h \
207         viktrwlayer_geotag.c viktrwlayer_geotag.h
208 endif
209
210 # libexif doesn't have write support of EXIF info - so reused this code from command line exif tool
211 if LIBEXIF
212 libviking_a_SOURCES += \
213         libjpeg/jpeg-data.c libjpeg/jpeg-data.h \
214         libjpeg/jpeg-marker.c libjpeg/jpeg-marker.h
215 endif
216
217 if MAPNIK
218 libviking_a_SOURCES += \
219         vikmapniklayer.c vikmapniklayer.h \
220         mapnik_interface.cpp mapnik_interface.h
221 endif
222
223 viking_SOURCES = main.c
224
225 LDADD           = libviking.a $(PACKAGE_LIBS) @EXPAT_LIBS@ @LIBCURL@ icons/libicons.a
226 if WINDOWS
227 LDADD += \
228         ../win32/installer/pixmaps/viking_icon.o
229 endif
230
231 AM_CFLAGS               = -Wall -g -D_GNU_SOURCE \
232         $(PACKAGE_CFLAGS) \
233         @EXPAT_CFLAGS@ @LIBCURL_CPPFLAGS@
234 AM_CPPFLAGS             = \
235         $(PACKAGE_CFLAGS) \
236         -DVIKING_DATADIR=\""$(pkgdatadir)"\" \
237         -DVIKING_SYSCONFDIR=\""$(sysconfdir)/$(PACKAGE)"\"
238
239 @INTLTOOL_DESKTOP_RULE@
240
241 desktopdir = $(datadir)/applications
242 desktop_in_files = viking.desktop.in
243 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
244 EXTRA_DIST += $(desktop_in_files)
245
246 CLEANFILES = $(BUILT_SOURCES) $(desktop_DATA)