As currently set up, it takes far too much external knowledge to
generate builds for Fremantle (a set of EXTRA_CPPFLAGS as well as
EXTRA_LDFLAGS); this is because the Makefiles were originally written
when there was only one target system (Diablo).
To fix this, provide new "diablo" and "fremantle" targets that can be
used to build the appropriate browser-switchboard without further
configuration, and make the "all" target print out a help message. For
the config UI, provide new "fremantle-hildon-app" and "fremantle-plugin"
targets, and rename the existing targets to "diablo-hildon-app" and
"diablo-plugin" to match.
APP = browser-switchboard
obj = main.o launcher.o dbus-server-bindings.o configfile.o log.o
APP = browser-switchboard
obj = main.o launcher.o dbus-server-bindings.o configfile.o log.o
+all:
+ @echo 'Usage:'
+ @echo ' make diablo -- build for Diablo'
+ @echo ' make fremantle -- build for Fremantle'
+diablo: $(APP)
+fremantle:
+ @$(MAKE) \
+ EXTRA_CPPFLAGS='-DFREMANTLE `pkg-config --cflags dbus-1` $(EXTRA_CPPFLAGS)' \
+ EXTRA_LDFLAGS='`pkg-config --libs dbus-1` $(EXTRA_LDFLAGS)' $(APP)
+
$(APP): dbus-server-glue.h $(obj)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(APP) $(obj)
$(APP): dbus-server-glue.h $(obj)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(APP) $(obj)
clean:
rm -f $(APP) *.o dbus-server-glue.h
clean:
rm -f $(APP) *.o dbus-server-glue.h
+.PHONY: strip install diablo fremantle
PLUGIN = lib$(APP).so
plugin_obj = $(APP).plugin.o ../configfile.plugin.o
PLUGIN = lib$(APP).so
plugin_obj = $(APP).plugin.o ../configfile.plugin.o
-all: plugin
-plugin: $(PLUGIN)
+all:
+ @echo 'Usage:'
+ @echo ' make app -- build standalone GTK+ application'
+ @echo ' make diablo-hildon-app -- build standalone Diablo Hildon application'
+ @echo ' make diablo-plugin -- build Diablo hildon-control-panel plugin'
+ @echo ' make fremantle-hildon-app -- build standalone Fremantle Hildon application'
+ @echo ' make fremantle-plugin -- build Fremantle hildon-control-panel plugin'
-hildon-app: $(HILDON_APP)
+diablo-hildon-app: $(HILDON_APP)
+diablo-plugin: $(PLUGIN)
+fremantle-hildon-app:
+ @$(MAKE) EXTRA_CPPFLAGS='-DFREMANTLE $(EXTRA_CPPFLAGS)' $(HILDON_APP)
+fremantle-plugin:
+ @$(MAKE) EXTRA_CPPFLAGS='-DFREMANTLE $(EXTRA_CPPFLAGS)' $(PLUGIN)
$(APP): $(app_obj)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(APP) $(app_obj)
$(APP): $(app_obj)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(APP) $(app_obj)
clean:
rm -f $(APP) $(HILDON_APP) $(PLUGIN) *.o ../configfile.o
clean:
rm -f $(APP) $(HILDON_APP) $(PLUGIN) *.o ../configfile.o
-.PHONY: strip strip-plugin install install-plugin plugin app hildon-app
+.PHONY: strip strip-plugin install install-plugin app diablo-hildon-app diablo-plugin fremantle-hildon-app fremantle-plugin