From cf66e0a413468f9da4aaf05d61ec785bd7287ba2 Mon Sep 17 00:00:00 2001 From: Steven Luo Date: Sun, 21 Feb 2010 21:37:12 -0800 Subject: [PATCH] Update build system 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. --- Makefile | 13 +++++++++++-- config-ui/Makefile | 18 ++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8442de4..d608e3c 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,16 @@ PREFIX = /usr APP = browser-switchboard obj = main.o launcher.o dbus-server-bindings.o configfile.o log.o -all: $(APP) +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) @@ -32,4 +41,4 @@ install: all clean: rm -f $(APP) *.o dbus-server-glue.h -.PHONY: strip install +.PHONY: strip install diablo fremantle diff --git a/config-ui/Makefile b/config-ui/Makefile index 42f2003..c0c13b4 100644 --- a/config-ui/Makefile +++ b/config-ui/Makefile @@ -20,10 +20,20 @@ happ_obj = $(APP).happ.o $(other_obj) 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' app: $(APP) -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) @@ -60,4 +70,4 @@ install-plugin: plugin 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 -- 1.7.9.5