* added applet initialization into applet-wrapper
[simple-launcher] / Makefile
index 46a4255..07c07ee 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,19 @@
 GTKCFLAGS := $(shell pkg-config gtk+-2.0 --cflags)
 GTKLIBS := $(shell pkg-config gtk+-2.0 --libs)
 
+GCONFCFLAGS := $(shell pkg-config gconf-2.0 --cflags)
+GCONFLIBS := $(shell pkg-config gconf-2.0 --libs)
+
 DBUSCFLAGS := $(shell pkg-config dbus-1 --cflags)
 DBUSLIBS := $(shell pkg-config dbus-1 --libs)
 
-CXXFLAGS=-Wall -g -MMD $(GTKCFLAGS) $(DBUSCFLAGS)
+HILDONCFLAGS := $(shell pkg-config hildon-1 --cflags)
+HILDONLIBS := $(shell pkg-config hildon-1 --libs)
+
+HDESKTOPCFLAGS := $(shell pkg-config libhildondesktop --cflags)
+HDESKTOPLIBS := $(shell pkg-config libhildondesktop --libs)
+
+CXXFLAGS=-Wall -g -MMD $(HILDONCFLAGS) $(HDESKTOPCFLAGS) $(GTKCFLAGS) $(DBUSCFLAGS) $(GCONFCFLAGS)
 #LDFLAGS = -module -avoid-version
 LDFLAGS = -shared
 LIBS = -lstdc++
@@ -13,27 +22,40 @@ TARGET=simple-launcher.so
 DESKTOP_FILE=simple-launcher.desktop
 BACKUP_CONF=simple-launcher.backup
 
-all: $(TARGET)
-
-tests: test test1
+SOURCES := \
+       dialog-entry.cc \
+       gconf-wrapper.cc \
+       launchable-item.cc \
+       launcher-item.cc \
+       settings-dialog.cc \
+       settings-page-entries.cc \
+       settings-page-items.cc \
+       simple-launcher.cc \
+       utils.cc \
+       applet-wrapper.cc
 
-$(TARGET): simple-launcher.o launchable-item.o launcher-item.o sla-list.o utils.o
-       $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+OBJS := $(SOURCES:%.cc=%.o)
 
-test: test.o launcher-item.o
-       g++ -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS) -losso
+all: $(TARGET)
 
-test1: test1.o sla-list.o launcher-item.o
-       g++ -g -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS)
+$(TARGET): $(OBJS)
+       $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 clean:
-       rm -f *.d *.o $(TARGET) test test1
+       rm -f *.d *.o $(TARGET)
 
 install: $(TARGET)
        install -d $(DESTDIR)/usr/share/applications/hildon-home
        install -m 0644 $(DESKTOP_FILE) $(DESTDIR)/usr/share/applications/hildon-home
        install -d $(DESTDIR)/usr/lib/hildon-home
        install -m 0644 $(TARGET) $(DESTDIR)/usr/lib/hildon-home
-       @install -m 0644 $(BACKUP_CONF) $(DESTDIR)/etc/osso-backup/applications/simple-launcher.conf
+       install -d $(DESTDIR)/etc/osso-backup/applications
+       install -m 0644 $(BACKUP_CONF) $(DESTDIR)/etc/osso-backup/applications/simple-launcher.conf
+
+pclean:
+       fakeroot debian/rules clean
+
+package:
+       dpkg-buildpackage -rfakeroot -uc -b
 
 -include *.d