summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-04-30 13:07:29 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2014-04-30 13:07:29 (GMT)
commit325d4643fc8536f1a461e7889b3568085bfc3312 (patch)
treeaf15fc296f3fbefa66c4cf35a17b8308e9bbc0d1
parentef5ffaf00951a72d45d8280b6f75302058b106fd (diff)
downloadnetsurf-all-325d4643fc8536f1a461e7889b3568085bfc3312.tar.gz
netsurf-all-325d4643fc8536f1a461e7889b3568085bfc3312.tar.bz2
Improve handling of target specific library builds
-rw-r--r--Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 1fb4fba..78c2356 100644
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,23 @@ NETSURF_TARG := netsurf
# nsgenbind host tool
NSGENBIND_TARG := nsgenbind
-NSLIB_TARG := buildsystem libwapcaplet libparserutils libcss libhubbub libdom libnsbmp libnsgif librosprite libnsfb libsvgtiny
+NSLIB_ALL_TARG := buildsystem libwapcaplet libparserutils libcss libhubbub libdom libnsbmp libnsgif librosprite libsvgtiny
+
+NSLIB_FB_TARG := libnsfb
NSLIB_RO_TARG := librufl libpencil
+# only build what we reuire for the target
+ifeq ($(TARGET),riscos)
+ NSLIB_TARG := $(NSLIB_ALL_TARG) $(NSLIB_RO_TARG)
+else
+ ifeq ($(TARGET),framebuffer)
+ NSLIB_TARG := $(NSLIB_ALL_TARG) $(NSLIB_FB_TARG)
+ else
+ NSLIB_TARG := $(NSLIB_ALL_TARG)
+ endif
+endif
+
# clean macro for each sub target
define do_clean
$(MAKE) distclean --directory=$1 TARGET=$(TARGET)
@@ -40,9 +53,6 @@ $(TMP_PREFIX)/build-stamp:
mkdir -p $(TMP_PREFIX)/lib
mkdir -p $(TMP_PREFIX)/bin
$(foreach L,$(NSLIB_TARG),$(call do_prefix_install,$(L)))
-ifeq ($(TARGET),riscos)
- $(foreach L,$(NSLIB_RO_TARG),$(call do_prefix_install,$(L)))
-endif
$(MAKE) install --directory=$(NSGENBIND_TARG) PREFIX=$(TMP_PREFIX) TARGET=$(shell uname -s)
$(MAKE) --directory=$(NETSURF_TARG) PREFIX=$(PREFIX) TARGET=$(TARGET)
touch $@
@@ -56,9 +66,6 @@ install: $(TMP_PREFIX)/build-stamp
clean:
$(RM) -r $(TMP_PREFIX)
$(foreach L,$(NSLIB_TARG),$(call do_clean,$(L)))
-ifeq ($(TARGET),riscos)
- $(foreach L,$(NSLIB_RO_TARG),$(call do_clean,$(L)))
-endif
$(MAKE) clean --directory=$(NSGENBIND_TARG) TARGET=$(TARGET)
$(MAKE) clean --directory=$(NETSURF_TARG) TARGET=$(TARGET)