diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2013-04-20 07:07:12 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2013-04-20 07:07:12 +0100 |
commit | 06378cb509ae72cccc1fe1cbf0e9a378ee7139b1 (patch) | |
tree | ebbb21c35ce2069f417e95723c80482b8142440c /basis.mk | |
download | ci-tools-06378cb509ae72cccc1fe1cbf0e9a378ee7139b1.tar.gz ci-tools-06378cb509ae72cccc1fe1cbf0e9a378ee7139b1.tar.bz2 |
working to some extent
Diffstat (limited to 'basis.mk')
-rw-r--r-- | basis.mk | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/basis.mk b/basis.mk new file mode 100644 index 0000000..1358f39 --- /dev/null +++ b/basis.mk @@ -0,0 +1,39 @@ +#!/bin/make +# +# NetSurf Source makefile for libraries and browser + +export TARGET ?= gtk +export PKG_CONFIG_PATH = $(TMP_PREFIX)/lib/pkgconfig +TMP_PREFIX := $(CURDIR)/prefix-$(TARGET) + +###TARGS### + +define do_clean + $(MAKE) distclean --directory=$1 TARGET=$(TARGET) + +endef + +define do_prefix_install + $(MAKE) install --directory=$1 TARGET=$(TARGET) PREFIX=$(TMP_PREFIX) DESTDIR= + +endef + + +.PHONY: build install clean + +build: $(TMP_PREFIX)/build-stamp + +$(TMP_PREFIX)/build-stamp: + mkdir -p $(TMP_PREFIX)/include + mkdir -p $(TMP_PREFIX)/lib + $(foreach L,$(NSLIBTARG),$(call do_prefix_install,$(L))) + $(MAKE) --directory=$(NETSURF_TARG) PREFIX=$(PREFIX) TARGET=$(TARGET) + touch $@ + +install: $(TMP_PREFIX)/build-stamp + $(MAKE) install --directory=$(NETSURF_TARG) TARGET=$(TARGET) PREFIX=$(PREFIX) DESTDIR=$(DESTDIR) + +clean: + $(RM) -r $(TMP_PREFIX) + $(foreach L,$(NSLIBTARG),$(call do_clean,$(L))) + $(MAKE) clean --directory=$(NETSURF_TARG) TARGET=$(TARGET) |