Disable "save" button after file is saved because temp file is moved
[gps-tracker] / Makefile
1 VERSION=1.0
2 DESTDIR=/
3 # define a list of pkg-config packages we want to use
4 pkg_packages := gtk+-2.0 hildon-1 liblocation hildon-fm-2
5
6 # get the necessary flags for compiling
7 PKG_CFLAGS := $(shell pkg-config --cflags $(pkg_packages))
8 # get the necessary flags for linking
9 PKG_LDFLAGS := $(shell pkg-config --libs $(pkg_packages))
10
11 # additional flags
12 # -Wall: warnings
13 # -g: debugging
14 ADD_CFLAGS := -Wall
15 CDEBUG=-g
16
17 # combine the flags (so that CFLAGS/LDFLAGS from the command line
18 # still work).
19 CFLAGS  := $(PKG_CFLAGS) $(ADD_CFLAGS) $(CFLAGS)
20 LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
21
22 ifdef DEBUG
23 CFLAGS += $(CDEBUG)
24 LDFLAGS += $(CDEBUG)
25 else
26 CFLAGS += -O2
27 endif
28
29 AUX_FILES=Makefile
30
31 ICON_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/share/icons/hicolor
32 BIN_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/bin
33 DESKTOP_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=desktopentrydir`
34 DBUS_SERVICE_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=dbusservicedir`
35 CP_LIB_DIR=$(DESTDIR)`pkg-config hildon-control-panel --variable=pluginlibdir`
36 CP_DESKTOP_DIR=$(DESTDIR)`pkg-config hildon-control-panel --variable=plugindesktopentrydir`
37 MIME_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/share/mime/packages
38 BACKUP_DIR=$(DESTDIR)/etc/osso-backup/applications
39
40 targets = gps-tracker
41
42 .PHONY: all
43 all: $(targets)
44
45 %: %.o
46         $(CC) $^ -o $@ $(LDFLAGS)
47
48 .PHONY: clean
49 clean:
50         $(RM) $(targets) *.o
51
52 # for s in 64 40 26;do S=${s}x$s; convert -resize $S gps-tracker-128x128.png gps-tracker-$S.png;done
53
54 install:
55         mkdir -p $(ICON_DIR)/64x64/hildon/
56         mkdir -p $(ICON_DIR)/40x40/hildon/
57         mkdir -p $(ICON_DIR)/26x26/hildon/
58         mkdir -p $(ICON_DIR)/scalable/hildon/
59         mkdir -p $(BIN_DIR)
60         mkdir -p $(DESKTOP_DIR)
61         mkdir -p $(DBUS_SERVICE_DIR)
62         mkdir -p $(CP_LIB_DIR)
63         mkdir -p $(CP_DESKTOP_DIR)
64         mkdir -p $(MIME_DIR)
65         mkdir -p $(BACKUP_DIR)
66         cp --target-directory=$(BIN_DIR) $(targets)
67         cp gps-tracker-64x64.png $(ICON_DIR)/64x64/hildon/gps-tracker.png
68         cp gps-tracker-40x40.png $(ICON_DIR)/40x40/hildon/gps-tracker.png
69         cp gps-tracker-26x26.png $(ICON_DIR)/26x26/hildon/gps-tracker.png
70         cp gps-tracker-128x128.png $(ICON_DIR)/scalable/hildon/gps-tracker.png
71         cp gps-tracker.desktop $(DESKTOP_DIR)
72
73 dist: clean