Annotation of OpenXM/src/gmp/Makefile, Revision 1.25
1.25 ! takayama 1: # $OpenXM: OpenXM/src/gmp/Makefile,v 1.24 2021/03/24 14:32:47 fujimoto 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.20 ohara 6: MASTER_SITE=http://www.math.kobe-u.ac.jp/pub/OpenXM/misc/
1.25 ! takayama 7: DISTNAME=gmp-6.2.1
1.19 takayama 8: DISTFILES=${DISTNAME}.tar.bz2
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.19 takayama 24: cat ${DISTDIR}/${DISTFILES} | (cd work ; tar xjvf -) ; \
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: fi
1.10 ohara 36: @touch work/.patch_done
1.7 takayama 37:
1.21 takayama 38: configure : patch
1.10 ohara 39: @if [ ! -f work/.configure_done ]; then \
1.11 ohara 40: prefix=`cd ${OpenXM_HOME}; pwd` ; \
1.24 fujimoto 41: if [ -z $TARGET_TYPE ]; then \
42: if [ "`uname | sed -e 's/_.*$$//'`" = "CYGWIN" ]; then \
43: make configure-cygwin ; \
44: elif [ "`uname | sed -e 's/_.*$$//'`" = "MSYS" ]; then \
45: make configure-msys ; \
46: else \
47: make configure-others ; \
48: fi ; \
49: else \
50: make configure-cross ; \
1.21 takayama 51: fi ; \
1.9 takayama 52: fi
1.10 ohara 53: @touch work/.configure_done
1.9 takayama 54:
1.21 takayama 55: configure-cygwin:
56: prefix=`cd ${OpenXM_HOME}; pwd` ; \
57: (cd ${WRKSRC}; CC=${CC} ./configure --prefix=$$prefix --enable-cxx --enable-static --disable-shared)
58: configure-msys:
59: prefix=`cd ${OpenXM_HOME}; pwd` ; \
60: (cd ${WRKSRC}; CC=${CC} ./configure --prefix=$$prefix --enable-cxx --build=x86_64-w64-mingw32 )
61: configure-others:
62: prefix=`cd ${OpenXM_HOME}; pwd` ; \
63: (cd ${WRKSRC}; CC=${CC} ./configure --prefix=$$prefix --enable-cxx)
1.24 fujimoto 64: configure-cross:
65: prefix=`cd ${OpenXM_HOME}; pwd` ; \
66: (cd ${WRKSRC}; CC=${CC} ./configure --host=${TARGET_TYPE} --prefix=$$prefix --enable-cxx)
1.21 takayama 67:
1.9 takayama 68: build : configure
1.10 ohara 69: @if [ ! -f work/.build_done ]; then \
1.14 ohara 70: (cd ${WRKSRC} ; ${MAKE} CC=${CC}) ; \
1.7 takayama 71: fi
1.10 ohara 72: @touch work/.build_done
1.7 takayama 73:
1.8 ohara 74: install: build
75: -mkdir ${PREFIX}/bin ${PREFIX}/lib
1.10 ohara 76: @if [ ! -f work/.install_done ]; then \
1.14 ohara 77: (cd ${WRKSRC} ; ${MAKE} install) ; \
1.23 takayama 78: for i in config.h gmp-impl.h gmp-mparam.h fib_table.h mp_bases.h fac_table.h ; do \
1.14 ohara 79: cp ${WRKSRC}/$$i ${OpenXM_HOME}/include ; \
1.8 ohara 80: done ; \
1.7 takayama 81: fi
1.10 ohara 82: @touch work/.install_done
1.7 takayama 83:
84: clean:
1.14 ohara 85: -${RM} -rf work
1.8 ohara 86:
87: distclean: clean
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>