2017-08-22 12:57:18 +03:00
|
|
|
# $NetBSD: Makefile.netbsd-gmp,v 1.5 2017/08/22 09:57:18 mrg Exp $
|
2011-10-30 05:50:32 +04:00
|
|
|
|
|
|
|
# hack makefile to help build gmp ./configure
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
|
|
|
|
|
2013-07-19 02:40:58 +04:00
|
|
|
TARGET?=${MACHINE_GNU_PLATFORM}
|
2011-10-30 05:50:32 +04:00
|
|
|
#TARGET=mips64el-netbsd
|
|
|
|
ENV_ARGS=\
|
|
|
|
CC=${CC:Q}' '${CCADDFLAGS:Q} \
|
|
|
|
CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
|
|
|
|
AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
|
|
|
|
NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \
|
|
|
|
LIBS=-lintl
|
|
|
|
|
2017-08-22 12:57:18 +03:00
|
|
|
.include "Makefile.arch"
|
|
|
|
NEWCONFIGDIR?= ${NETBSDSRCDIR}
|
|
|
|
ARCHDIR= ${NEWCONFIGDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH}
|
|
|
|
|
2011-10-30 05:50:32 +04:00
|
|
|
all:
|
2017-08-22 12:57:18 +03:00
|
|
|
mkdir -p build
|
|
|
|
cd build && env ${ENV_ARGS} ${NETBSDSRCDIR}/external/lgpl3/gmp/dist/configure --host=${TARGET} --target=${TARGET}
|
|
|
|
|
|
|
|
copy-files:
|
|
|
|
cd build && cp gmp.h gmp-mparam.h config.h config.m4 ${ARCHDIR}
|
|
|
|
sed -i -e 's/define.*CONFIG_TOP_SRCDIR.*//' ${ARCHDIR}/config.m4
|
|
|
|
sed -i -e 's/__GMP_CC.*/__GMP_CC "gcc"/' ${ARCHDIR}/gmp.h
|
|
|
|
sed -i -e 's/GMP_MPARAM_H_SUGGEST[ ]"\/.*dist\/mpn/GMP_MPARAM_H_SUGGEST ".\/mpn/' ${ARCHDIR}/config.h
|
|
|
|
|
|
|
|
.include <bsd.obj.mk>
|