#/* AbiWord build scripts # * Copyright (c) 2007 Hubert Figuiere # * # * This program is free software; you can redistribute it and/or # * modify it under the terms of the GNU General Public License # * as published by the Free Software Foundation; either version 2 # * of the License, or (at your option) any later version. # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the implied warranty of # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # * GNU General Public License for more details. # * # * You should have received a copy of the GNU General Public License # * along with this program; if not, write to the Free Software # * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # * 02111-1307, USA. ifeq ($(ARCH),) ARCH=$(shell arch) endif BUILDDIR=build-$(ARCH) PATCHES=$(wildcard patches/*) all: Makefile ../ports.mk build tarball: tarball-stamp tarball-stamp: $(TARBALL) tar zxvf $(TARBALL) && touch $@ $(TARBALL): curl $(DOWNLOAD_URL) -O patch: patch-stamp patch-stamp: $(PATCHES) tarball-stamp if [ -d patches ] ; then \ for i in $(PATCHES) ; do \ patch -d $(PORTDIR) -N -p0 < $$i ; \ done \ fi && \ touch $@ configure: configure-stamp configure-stamp: patch-stamp mkdir -p $(BUILDDIR) export CPPFLAGS="-isysroot $(ABISDK) -I$(PREFIX)/include" export LDFLAGS="-isysroot $(ABISDK) -L$(PREFIX)/lib" (cd $(BUILDDIR) && PATH=$(PREFIX)/bin:$(PATH) PKG_CONFIG_PATH=$(ABISDK)/$(PREFIX)/lib/pkgconfig:/usr/lib/pkgconfig \ CPPFLAGS="-isysroot $(ABISDK) -I$(PREFIX)/include" \ LDFLAGS="-isysroot $(ABISDK) -L$(PREFIX)/lib" \ ../$(PORTDIR)/configure $(CONFIGURE_ARGS) --prefix=$(PREFIX) --disable-static --enable-shared ) \ && touch $@ build: configure build-stamp install-sdk-stamp build-stamp: (cd $(BUILDDIR) && make ) && touch $@ install: install-stamp install-stamp: build-stamp (cd $(BUILDDIR) && make install) && touch $@ install-sdk: install-sdk-stamp: install-stamp (cd $(BUILDDIR) && DESTDIR=$(ABISDK) make install) && touch $@ clean: rm -f *-stamp rm -fr $(BUILDDIR) rm -fr $(PORTDIR) unused-build-stamp: mkdir -p $(PPCBUILDDIR) (cd $(PPCBUILDDIR) \ && CC=$(CCPPC) CFLAGS="$(PPC_CFLAGS)" LDFLAGS="$(PPC_LDFLAGS)" DYLD_LIBRARY_PATH=$(ABIDYLD_PATH) PATH=$(ABIPATH) \ $(TOPDIR)/popt/configure --prefix=$(PREFIX) \ --with-libiconv-prefix=$(ABISDK)/usr --with-libintl-prefix=$(ABISDK)/usr \ && make && DESTDIR=$(ABISDK) make install ) @touch $@