Ensure that all objects for the plugin are built with -fPIC
[browser-switch] / config-ui / Makefile
index eed97ed..74c894d 100644 (file)
@@ -1,7 +1,7 @@
 CC = gcc
-CFLAGS = -Wall -Os -mcpu=arm1136jf-s -mthumb
+CFLAGS = -Wall -Os
 CFLAGS_PLUGIN = -fPIC
-CPPFLAGS = `pkg-config --cflags gtk+-2.0`
+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`
@@ -11,12 +11,14 @@ LDFLAGS_PLUGIN = -shared $(LDFLAGS_HILDON) \
        `pkg-config --libs dbus-1` `pkg-config --libs hildon-control-panel`
 PREFIX = /usr/local
 
+other_obj = ../configfile.o
+
 APP = browser-switchboard-cp
-app_obj = $(APP).app.o
+app_obj = $(APP).app.o $(other_obj)
 HILDON_APP = $(APP)-hildon
-happ_obj = $(APP).happ.o
+happ_obj = $(APP).happ.o $(other_obj)
 PLUGIN = lib$(APP).so
-plugin_obj = $(APP).plugin.o
+plugin_obj = $(APP).plugin.o ../configfile.plugin.o
 
 all: plugin
 plugin: $(PLUGIN)
@@ -48,10 +50,12 @@ strip: $(PLUGIN)
        strip $(PLUGIN)
 
 install: all
-       mkdir -p $(DESTDIR)$(PREFIX)/share/hildon-control-panel
-       install -c -m 0755 $(PLUGIN) $(DESTDIR)$(PREFIX)/share/hildon-control-panel
+       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
+       rm -f $(APP) $(HILDON_APP) $(PLUGIN) *.o ../configfile.o
 
 .PHONY: strip install plugin app hildon-app