fix a small memory leak in case user cancels the selection after new items appeared...
[simple-launcher] / Makefile
1 GTKCFLAGS := $(shell pkg-config gtk+-2.0 --cflags)
2 GTKLIBS := $(shell pkg-config gtk+-2.0 --libs)
3
4 DBUSCFLAGS := $(shell pkg-config dbus-1 --cflags)
5 DBUSLIBS := $(shell pkg-config dbus-1 --libs)
6
7 CXXFLAGS=-Wall -g -MMD $(GTKCFLAGS) $(DBUSCFLAGS)
8 #LDFLAGS = -module -avoid-version
9 LDFLAGS = -shared
10 LIBS = -lstdc++
11
12 TARGET=simple-launcher.so
13 DESKTOP_FILE=simple-launcher.desktop
14 BACKUP_CONF=simple-launcher.backup
15
16 all: $(TARGET)
17
18 tests: test test1
19
20 $(TARGET): simple-launcher.o launchable-item.o launcher-item.o sla-list.o utils.o settings-dialog.o
21         $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
22
23 test: test.o launcher-item.o
24         g++ -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS) -losso
25
26 test1: test1.o sla-list.o launcher-item.o
27         g++ -g -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS)
28
29 clean:
30         rm -f *.d *.o $(TARGET) test test1
31
32 install: $(TARGET)
33         install -d $(DESTDIR)/usr/share/applications/hildon-home
34         install -m 0644 $(DESKTOP_FILE) $(DESTDIR)/usr/share/applications/hildon-home
35         install -d $(DESTDIR)/usr/lib/hildon-home
36         install -m 0644 $(TARGET) $(DESTDIR)/usr/lib/hildon-home
37         install -d $(DESTDIR)/etc/osso-backup/applications
38         install -m 0644 $(BACKUP_CONF) $(DESTDIR)/etc/osso-backup/applications/simple-launcher.conf
39
40 -include *.d