#
# Copyright (C) 2008 Till Harbaum <till@harbaum.org>.
#
# This file is part of Maep.
#
# Maep 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.
#
# Maep 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 Maep.  If not, see <http://www.gnu.org/licenses/>.
#

APP = maep
prefix = /usr
datarootdir = ${prefix}/share
datadir = ${prefix}/share
EXTRA_OBJS =  converter.o osm-gps-map.o osm-gps-map-osd-classic.o
VERSION = $${VERSION_PREFIX}1.0.1$${VERSION_SUFFIX}

bindir = ${exec_prefix}/bin

OBJS = main.o gps.o $(EXTRA_OBJS) 

DEFS = -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DICONPATH=\"$(datadir)/$(APP)/\" -DAPP=\"$(APP)\"
CFLAGS = -Wall -O2 $(DEFS) -g -O2 -pthread -DORBIT2=1 -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/orbit-2.0 -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/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DORBIT2=1 -pthread -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -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   -D_REENTRANT -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/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
LDFLAGS =  -pthread -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lrt -lgmodule-2.0 -lgobject-2.0 -lglib-2.0   -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lgconf-2 -lglib-2.0   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   

all: $(APP)

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

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

install:
	install -d $(DESTDIR)$(prefix)$(bindir)
	install $(APP) $(DESTDIR)$(prefix)$(bindir)

clean:
	rm -f maep *.o *~ \#*\#

dep:
	makedepend -Y -fMakefile.in *.c


