Image names in Makefile wrong
[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 -g
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 endif
26
27 AUX_FILES=Makefile
28
29 ICON_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/share/icons/hicolor
30 BIN_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/bin
31 DESKTOP_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=desktopentrydir`
32 DBUS_SERVICE_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=dbusservicedir`
33 CP_LIB_DIR=$(DESTDIR)`pkg-config hildon-control-panel --variable=pluginlibdir`
34 CP_DESKTOP_DIR=$(DESTDIR)`pkg-config hildon-control-panel --variable=plugindesktopentrydir`
35 MIME_DIR=$(DESTDIR)`pkg-config osso-af-settings --variable=prefix`/share/mime/packages
36 BACKUP_DIR=$(DESTDIR)/etc/osso-backup/applications
37
38 targets = gps-tracker
39
40 .PHONY: all
41 all: $(targets)
42
43 %: %.o
44         $(CC) $^ -o $@ $(LDFLAGS)
45
46 .PHONY: clean
47 clean:
48         $(RM) $(targets) *.o
49
50 # for s in 64 40 26;do S=${s}x$s; convert -resize $S gps-tracker-128x128.png gps-tracker-$S.png;done
51
52 install:
53         mkdir -p $(ICON_DIR)/64x64/hildon/
54         mkdir -p $(ICON_DIR)/40x40/hildon/
55         mkdir -p $(ICON_DIR)/26x26/hildon/
56         mkdir -p $(BIN_DIR)
57         mkdir -p $(DESKTOP_DIR)
58         mkdir -p $(DBUS_SERVICE_DIR)
59         mkdir -p $(CP_LIB_DIR)
60         mkdir -p $(CP_DESKTOP_DIR)
61         mkdir -p $(MIME_DIR)
62         mkdir -p $(BACKUP_DIR)
63         cp --target-directory=$(BIN_DIR) $(targets)
64         cp gps-tracker-64x64.png $(ICON_DIR)/64x64/hildon/gps-tracker.png
65         cp gps-tracker-40x40.png $(ICON_DIR)/40x40/hildon/gps-tracker.png
66         cp gps-tracker-26x26.png $(ICON_DIR)/26x26/hildon/gps-tracker.png
67
68 dist: clean