DBUSCFLAGS := $(shell pkg-config dbus-1 --cflags)
DBUSLIBS := $(shell pkg-config dbus-1 --libs)
-CXXFLAGS=-Wall -g -MMD $(GTKCFLAGS) $(DBUSCFLAGS) $(GCONFCFLAGS)
+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++
DESKTOP_FILE=simple-launcher.desktop
BACKUP_CONF=simple-launcher.backup
-all: $(TARGET)
-
-tests: test test1 test2
-
-$(TARGET): simple-launcher.o launchable-item.o launcher-item.o sla-list.o utils.o settings-dialog.o gconf-wrapper.o dialog-entry.o settings-page-entries.o
- $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+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
-test: test.o launcher-item.o
- g++ -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS) -losso
+OBJS := $(SOURCES:%.cc=%.o)
-test1: test1.o sla-list.o launcher-item.o
- g++ -g -o $@ $^ $(GTKLIBS) $(DBUSLIBS) $(LIBS)
+all: $(TARGET)
-test2: test2.o gconf-wrapper.o
- g++ -g -o $@ $^ $(GCONFLIBS)
+$(TARGET): $(OBJS)
+ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
- rm -f *.d *.o $(TARGET) test test1 test2
+ rm -f *.d *.o $(TARGET)
install: $(TARGET)
install -d $(DESTDIR)/usr/share/applications/hildon-home
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