#
# Copyright (C) 2008 Till Harbaum <till@harbaum.org>.
#
# This file is part of OSM2Go.
#
# OSM2Go is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OSM2Go is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OSM2Go.  If not, see <http://www.gnu.org/licenses/>.
#

APP = osm2go
PREFIX ?= /usr/local
EXTRA_OBJS = dbus.o

OBJS = main.o map.o osm.o osm_api.o wms.o \
	statusbar.o project.o settings.o pos.o diff.o map_hl.o \
	iconbar.o info.o icon.o track.o gps.o canvas_goocanvas.o \
	area_edit.o josm_presets.o relation_edit.o misc.o map_edit.o \
	josm_elemstyles.o style.o net_io.o banner.o undo.o $(EXTRA_OBJS)

DEFS = -DPACKAGE=\"$(APP)\" -DPREFIX=\"/usr/local\"
CFLAGS = -Wall $(DEFS) -g -O2   -DUSE_GOOCANVAS -DMAEMO_CHANGES -I/usr/include/goocanvas-1.0 -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1   -pthread -I/usr/include/gnome-vfs-2.0 -I/usr/include/gnome-vfs-module-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I/usr/include/libxml2    -DUSE_HILDON -DMAEMO_CHANGES -DMAEMO_GTK -I/usr/include/hildon-1 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1   -I/usr/include/dbus-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/dbus-1.0/include   -DMAEMO_CHANGES -I/usr/include/hildon-fm-2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1   -DENABLE_LIBLOCATION -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -DMAEMO_VERSION=\"5.0-alpha\" -DMAEMO_VERSION_MAJOR=5
LDFLAGS =  -lcurl -ldl -lssl -lcrypto -lz   -lgoocanvas -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -pthread -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0   -lxml2   -lhildon-1 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -losso -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0   -lhildonfm -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -llocation -lgconf-2 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0  

all: $(APP)

%.o: %.c
	gcc $(CFLAGS) -o $@ -c $<

$(APP): $(OBJS)
	gcc $(LDFLAGS) -o $@ $(OBJS)

clean:
	rm -f osm2go *.o *~ */*~ \#*\# version.h *.bak

install: $(APP)
	install -d $(DESTDIR)$(PREFIX)/bin
	install $(APP) $(DESTDIR)$(PREFIX)/bin

-include ../version.mk

dep: version.h
	makedepend -Y *.c

# DO NOT DELETE

area_edit.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
area_edit.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
area_edit.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
area_edit.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
area_edit.o: net_io.h banner.h
banner.o: banner.h appdata.h version.h pos.h osm.h canvas.h undo.h map.h
banner.o: map_hl.h osm_api.h project.h statusbar.h area_edit.h settings.h
banner.o: diff.h iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
banner.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
banner.o: net_io.h
canvas_gnomecanvas.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h
canvas_gnomecanvas.o: map_hl.h osm_api.h project.h statusbar.h area_edit.h
canvas_gnomecanvas.o: settings.h diff.h iconbar.h icon.h info.h track.h gps.h
canvas_gnomecanvas.o: wms.h josm_presets.h relation_edit.h misc.h map_edit.h
canvas_gnomecanvas.o: josm_elemstyles.h style.h net_io.h banner.h
canvas_goocanvas.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h
canvas_goocanvas.o: map_hl.h osm_api.h project.h statusbar.h area_edit.h
canvas_goocanvas.o: settings.h diff.h iconbar.h icon.h info.h track.h gps.h
canvas_goocanvas.o: wms.h josm_presets.h relation_edit.h misc.h map_edit.h
canvas_goocanvas.o: josm_elemstyles.h style.h net_io.h banner.h
dbus.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
dbus.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
dbus.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
dbus.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
dbus.o: banner.h
diff.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
diff.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
diff.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
diff.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
diff.o: banner.h
gps.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
gps.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
gps.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
gps.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
gps.o: banner.h
icon.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
icon.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
icon.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
icon.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
icon.o: banner.h
iconbar.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
iconbar.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
iconbar.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
iconbar.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
iconbar.o: net_io.h banner.h
info.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
info.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
info.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
info.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
info.o: banner.h
josm_elemstyles.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h
josm_elemstyles.o: map_hl.h osm_api.h project.h statusbar.h area_edit.h
josm_elemstyles.o: settings.h diff.h iconbar.h icon.h info.h track.h gps.h
josm_elemstyles.o: wms.h josm_presets.h relation_edit.h misc.h map_edit.h
josm_elemstyles.o: josm_elemstyles.h style.h net_io.h banner.h
josm_presets.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h
josm_presets.o: map_hl.h osm_api.h project.h statusbar.h area_edit.h
josm_presets.o: settings.h diff.h iconbar.h icon.h info.h track.h gps.h wms.h
josm_presets.o: josm_presets.h relation_edit.h misc.h map_edit.h
josm_presets.o: josm_elemstyles.h style.h net_io.h banner.h
main.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
main.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
main.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
main.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
main.o: banner.h
map.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
map.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
map.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
map.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
map.o: banner.h
map_edit.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
map_edit.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
map_edit.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
map_edit.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
map_edit.o: net_io.h banner.h
map_hl.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
map_hl.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
map_hl.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
map_hl.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
map_hl.o: net_io.h banner.h
misc.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
misc.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
misc.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
misc.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
misc.o: banner.h
net_io.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
net_io.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
net_io.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
net_io.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
net_io.o: net_io.h banner.h
osm.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
osm.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
osm.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
osm.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
osm.o: banner.h
osm_api.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
osm_api.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
osm_api.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
osm_api.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
osm_api.o: net_io.h banner.h
pos.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
pos.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
pos.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
pos.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
pos.o: banner.h
project.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
project.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
project.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
project.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
project.o: net_io.h banner.h
relation_edit.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h
relation_edit.o: map_hl.h osm_api.h project.h statusbar.h area_edit.h
relation_edit.o: settings.h diff.h iconbar.h icon.h info.h track.h gps.h
relation_edit.o: wms.h josm_presets.h relation_edit.h misc.h map_edit.h
relation_edit.o: josm_elemstyles.h style.h net_io.h banner.h
settings.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
settings.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
settings.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
settings.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
settings.o: net_io.h banner.h
statusbar.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
statusbar.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
statusbar.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
statusbar.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h
statusbar.o: net_io.h banner.h
style.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
style.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
style.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
style.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
style.o: banner.h
track.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
track.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
track.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
track.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
track.o: banner.h
undo.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
undo.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
undo.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
undo.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
undo.o: banner.h
wms.o: appdata.h version.h pos.h osm.h canvas.h undo.h map.h map_hl.h
wms.o: osm_api.h project.h statusbar.h area_edit.h settings.h diff.h
wms.o: iconbar.h icon.h info.h track.h gps.h wms.h josm_presets.h
wms.o: relation_edit.h misc.h map_edit.h josm_elemstyles.h style.h net_io.h
wms.o: banner.h
