+VERSION=1.0
+DESTDIR=/
# define a list of pkg-config packages we want to use
pkg_packages := gtk+-2.0 hildon-1 liblocation hildon-fm-2
# -Wall: warnings
# -g: debugging
ADD_CFLAGS := -Wall -g
+CDEBUG=-g
# combine the flags (so that CFLAGS/LDFLAGS from the command line
# still work).
CFLAGS := $(PKG_CFLAGS) $(ADD_CFLAGS) $(CFLAGS)
LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
+ifdef DEBUG
+CFLAGS += $(CDEBUG)
+LDFLAGS += $(CDEBUG)
+endif
+
+AUX_FILES=Makefile
+
+ICON_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/share/icons/hicolor
+BIN_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/bin
+DESKTOP_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=desktopentrydir`
+DBUS_SERVICE_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=dbusservicedir`
+CP_LIB_DIR=$(DESTDIR)`pkg-config hildon-control-panel --variable=pluginlibdir`
+CP_DESKTOP_DIR=$(DESTDIR)`pkg-config hildon-control-panel --variable=plugindesktopentrydir`
+MIME_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/share/mime/packages
+BACKUP_DIR=$(DESTDIR)/etc/osso-backup/applications
+
targets = gps-tracker
.PHONY: all
clean:
$(RM) $(targets) *.o
-run: $(targets)
- run-standalone.sh `pwd`/gps-tracker
+# for s in 64 40 26;do S=${s}x$s; convert -resize $S gps-tracker-128x128.png gps-tracker-$S.png;done
+
+install:
+ mkdir -p $(ICON_DIR)/64x64/hildon/
+ mkdir -p $(ICON_DIR)/40x40/hildon/
+ mkdir -p $(ICON_DIR)/26x26/hildon/
+ mkdir -p $(BIN_DIR)
+ mkdir -p $(DESKTOP_DIR)
+ mkdir -p $(DBUS_SERVICE_DIR)
+ mkdir -p $(CP_LIB_DIR)
+ mkdir -p $(CP_DESKTOP_DIR)
+ mkdir -p $(MIME_DIR)
+ mkdir -p $(BACKUP_DIR)
+ cp --target-directory=$(BIN_DIR) $(targets)
+ cp gps-tracker-64.png $(ICON_DIR)/64x64/hildon/gps-tracker.png
+ cp gps-tracker-40.png $(ICON_DIR)/40x40/hildon/gps-tracker.png
+ cp gps-tracker-26.png $(ICON_DIR)/26x26/hildon/gps-tracker.png
+
+dist: clean