Annotation of OpenXM/src/gmp/Makefile, Revision 1.17
1.17 ! ohara 1: # $OpenXM: OpenXM/src/gmp/Makefile,v 1.16 2008/04/01 12:13:39 ohara Exp $
1.1 takayama 2: OpenXM_HOME=../..
1.7 takayama 3: PREFIX=${OpenXM_HOME}
4: DISTDIR=${OpenXM_HOME}/../OpenXM_dist
1.10 ohara 5: RM = /bin/rm
1.8 ohara 6: MASTER_SITE=ftp://ftp.math.kobe-u.ac.jp/pub/OpenXM/misc/
1.15 ohara 7: DISTNAME=gmp-4.2.2
1.16 ohara 8: DISTFILES=${DISTNAME}-core2.tgz
1.14 ohara 9: WRKSRC=work/${DISTNAME}
1.15 ohara 10: #PATCHFILES = gmp.diff
11: PATCHFILES =
1.7 takayama 12:
13: all : build
14:
15: fetch:
1.10 ohara 16: -mkdir work
17: @if [ ! -f work/.fetch_done ]; then \
1.8 ohara 18: ${OpenXM_HOME}/bin/oxfetch.sh ${MASTER_SITE}${DISTFILES} ${DISTDIR}; \
1.7 takayama 19: fi
1.10 ohara 20: @touch work/.fetch_done
1.7 takayama 21:
1.8 ohara 22: extract: fetch
1.10 ohara 23: @if [ ! -f work/.extract_done ]; then \
1.8 ohara 24: cat ${DISTDIR}/${DISTFILES} | (cd work ; tar xzvf -) ; \
1.7 takayama 25: fi
1.10 ohara 26: @touch work/.extract_done
1.8 ohara 27:
28: patch: extract
1.14 ohara 29: @if [ ! -f work/.patch_done ]; then \
1.17 ! ohara 30: for i in ${PATCHFILES} "" ; do \
! 31: if [ -f "$$i" ]; then \
! 32: cat $$i | (cd ${WRKSRC}; patch -p0) ; \
! 33: fi ; \
1.14 ohara 34: done ; \
35: if [ `uname` = Darwin -a `uname -m` = i386 ]; then \
36: (cd ${WRKSRC}/mpn/x86; ${RM} *dive_1* */*dive_1* */*/*dive_1* */*mode1o* */*/*mode1o*) ; \
37: fi ; \
38: fi
1.10 ohara 39: @touch work/.patch_done
1.7 takayama 40:
1.9 takayama 41: configure: patch
1.10 ohara 42: @if [ ! -f work/.configure_done ]; then \
1.11 ohara 43: prefix=`cd ${OpenXM_HOME}; pwd` ; \
1.14 ohara 44: (cd ${WRKSRC} ; CC=${CC} ./configure --prefix="$$prefix" --enable-cxx) ; \
1.9 takayama 45: fi
1.10 ohara 46: @touch work/.configure_done
1.9 takayama 47:
48: build : configure
1.10 ohara 49: @if [ ! -f work/.build_done ]; then \
1.14 ohara 50: (cd ${WRKSRC} ; ${MAKE} CC=${CC}) ; \
1.7 takayama 51: fi
1.10 ohara 52: @touch work/.build_done
1.7 takayama 53:
1.8 ohara 54: install: build
55: -mkdir ${PREFIX}/bin ${PREFIX}/lib
1.10 ohara 56: @if [ ! -f work/.install_done ]; then \
1.14 ohara 57: (cd ${WRKSRC} ; ${MAKE} install) ; \
1.13 ohara 58: for i in config.h gmp-impl.h gmp-mparam.h fib_table.h mp_bases.h; do \
1.14 ohara 59: cp ${WRKSRC}/$$i ${OpenXM_HOME}/include ; \
1.8 ohara 60: done ; \
1.7 takayama 61: fi
1.10 ohara 62: @touch work/.install_done
1.7 takayama 63:
64: clean:
1.14 ohara 65: -${RM} -rf work
1.8 ohara 66:
67: distclean: clean
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>