If MACHINE_ARCH contains armv[467], use arm instead.

This commit is contained in:
matt 2013-08-04 23:37:54 +00:00
parent e193aeee34
commit 6618efcaf4
1 changed files with 9 additions and 6 deletions

View File

@ -1,10 +1,12 @@
# $NetBSD: Makefile,v 1.14 2012/11/26 18:57:33 drochner Exp $
# $NetBSD: Makefile,v 1.15 2013/08/04 23:37:54 matt Exp $
.include <bsd.init.mk>
# We don't install gmp, just provide it for GCC.
LIBISPRIVATE?= yes
LIBGMP_MACHINE_ARCH?= ${MACHINE_ARCH:C/armv[467]/arm/}
.if ${LIBISPRIVATE} != "yes"
INCS= gmp.h
INCSDIR= /usr/include
@ -145,7 +147,7 @@ CLEANFILES+= ${_dir}_${_srcfile}
.endfor
CPPFLAGS+= -I. -I${DIST} -I${.CURDIR}/arch/${MACHINE_ARCH} -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H
CPPFLAGS+= -I. -I${DIST} -I${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH} -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H
WITHOUT_MAN= yes
@ -179,13 +181,14 @@ perfsqr.h: gen-psqr.c
CLEANFILES+= ${DPSRCS} gen-fac_ui gen-fib gen-bases gen-psqr gen-trialdivtab
.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
.include "${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/Makefile.inc"
# XXX stuff looks for "../config.m4"
dummy:
mkdir dummy
${.OBJDIR}/config.m4: ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4
cp ${.CURDIR}/arch/${MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
${.OBJDIR}/config.m4: ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/config.m4
cp ${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
CLEANFILES+= config.m4
clean: cleandummy
@ -218,7 +221,7 @@ CLEANFILES+= mpn_${_build}
.PATH: ${DIST} \
${DIST}/mpn/generic \
${.CURDIR}/arch/${MACHINE_ARCH} \
${.CURDIR}/arch/${LIBGMP_MACHINE_ARCH} \
${DIST}/mpf \
${DIST}/mpz