CC = gcc
-CFLAGS = -Wall -Os
+CFLAGS = -Wall -Os $(EXTRA_CFLAGS)
CFLAGS_PLUGIN = -fPIC
CPPFLAGS = -I../ `pkg-config --cflags gtk+-2.0`
CPPFLAGS_HILDON = -DHILDON `pkg-config --cflags hildon-1`
CPPFLAGS_PLUGIN = $(CPPFLAGS_HILDON) -DHILDON_CP_APPLET \
- `pkg-config --cflags dbus-1` `pkg-config --cflags hildon-control-panel`
+ `pkg-config --cflags libosso` `pkg-config --cflags hildon-control-panel`
LDFLAGS = `pkg-config --libs gtk+-2.0`
LDFLAGS_HILDON = `pkg-config --libs hildon-1`
LDFLAGS_PLUGIN = -shared $(LDFLAGS_HILDON) \
- `pkg-config --libs dbus-1` `pkg-config --libs hildon-control-panel`
-PREFIX = /usr/local
+ `pkg-config --libs libosso` `pkg-config --libs hildon-control-panel`
+PREFIX = /usr
other_obj = ../configfile.o
HILDON_APP = $(APP)-hildon
happ_obj = $(APP).happ.o $(other_obj)
PLUGIN = lib$(APP).so
-plugin_obj = $(APP).plugin.o $(other_obj)
+plugin_obj = $(APP).plugin.o ../configfile.plugin.o
all: plugin
plugin: $(PLUGIN)
$(CC) $(CFLAGS) $(CFLAGS_PLUGIN) $(CPPFLAGS) $(CPPFLAGS_PLUGIN) \
-c -o $@ $<
-strip: $(PLUGIN)
+strip: strip-plugin
+strip-plugin: plugin
strip $(PLUGIN)
-install: all
- mkdir -p $(DESTDIR)$(PREFIX)/share/hildon-control-panel
+install: install-plugin
+install-plugin: plugin
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/hildon-control-panel
+ mkdir -p $(DESTDIR)$(PREFIX)/share/applications/hildon-control-panel
install -c -m 0755 $(PLUGIN) $(DESTDIR)$(PREFIX)/lib/hildon-control-panel
install -c -m 0644 $(APP).desktop $(DESTDIR)$(PREFIX)/share/applications/hildon-control-panel
clean:
rm -f $(APP) $(HILDON_APP) $(PLUGIN) *.o ../configfile.o
-.PHONY: strip install plugin app hildon-app
+.PHONY: strip strip-plugin install install-plugin plugin app hildon-app