xref: /netbsd/tools/gmp/Makefile (revision 49c60c95)
1#	$NetBSD: Makefile,v 1.5 2021/09/18 01:47:10 christos Exp $
2#
3
4GNUHOSTDIST=   ${.CURDIR}/../../external/lgpl3/gmp/dist
5
6CONFIGURE_ARGS+=--disable-shared
7
8CPPFLAGS+=	${HOST_CPPFLAGS}
9
10.include "${.CURDIR}/../Makefile.gnuhost"
11
12# Don't override CFLAGS and CXXFLAGS, it breaks ABI detection.
13# PATH needs special treating since "make" tries to expand $PATH
14# when variable is used.
15CONFIGURE_ENV:=	${CONFIGURE_ENV:NPATH=*:NCFLAGS=*:NCXXFLAGS=*} \
16		PATH="${TOOLDIR:Q}/bin:$$PATH"
17
18# Force avoiding possibly non-executable install-sh.
19CONFIGURE_ENV+=	ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d"
20
21# mknative-gmp support
22#
23# XXX early version; does not use mknative.common yet.
24
25native-gmp: .native/.configure_done
26	@echo 'Extracting GNU GMP configury for a native toolchain.'
27	(cd ${.OBJDIR}/.native && \
28	 ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp copy-files)
29	@echo 'HA HA, only joking. Manual fixes maybe needed now.'
30
31.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
32	mkdir .native 2>/dev/null || true
33	(cd ${.OBJDIR}/.native && \
34	 ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp all)
35