Refactoring:
[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
14 all: $(TARGET)
15
16 tests: test test1
17
18 $(TARGET): simple-launcher.o launchable-item.o launcher-item.o sla-list.o
19         $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
20
21 test: test.o launcher-item.o
22         g++ -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS) -losso
23
24 test1: test1.o sla-list.o launcher-item.o
25         g++ -g -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS)
26
27 clean:
28         rm -f *.d *.o $(TARGET) test test1
29
30 install: $(TARGET)
31         install -d $(DESTDIR)/usr/share/applications/hildon-home
32         install -m 0644 simple-launcher.desktop $(DESTDIR)/usr/share/applications/hildon-home
33         install -d $(DESTDIR)/usr/lib/hildon-home
34         install -m 0644 $(TARGET) $(DESTDIR)/usr/lib/hildon-home
35
36 -include *.d