blob: c77b000d0982eb3cd869d461fffe98d4d4dc270f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# $NetBSD: inplace.mk,v 1.3 2007/08/01 18:16:38 joerg Exp $
#
# This Makefile fragment builds a working copy of libnbcompat inside
# ${WRKDIR} and adds the appropriate paths to CPPFLAGS and LDFLAGS.
# This can be used in place of libnbcompat/buildlink3.mk where it is
# included by a bootstrap package Makefile.
LIBNBCOMPAT_FILESDIR= ${.CURDIR}/../../pkgtools/libnbcompat/files
LIBNBCOMPAT_SRCDIR= ${WRKDIR}/libnbcompat
CPPFLAGS+= -I${LIBNBCOMPAT_SRCDIR}
LDFLAGS+= -L${LIBNBCOMPAT_SRCDIR}
LIBS+= -lnbcompat
do-extract: libnbcompat-extract
libnbcompat-extract:
${_PKG_SILENT}${_PKG_DEBUG} \
${CP} -R ${LIBNBCOMPAT_FILESDIR} ${LIBNBCOMPAT_SRCDIR}
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
NBCOMPAT_CONFIGURE_ARGS+= --build=${NATIVE_MACHINE_GNU_PLATFORM:Q}
.endif
NBCOMPAT_CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q}
pre-configure: libnbcompat-build
libnbcompat-build:
${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
cd ${LIBNBCOMPAT_SRCDIR} && ${SETENV} \
AWK="${AWK}" CC="${CC}" CFLAGS="${CFLAGS:M*}" \
CPPFLAGS="${CPPFLAGS:M*}" \
${CONFIGURE_ENV:NLIBS=*} ${CONFIG_SHELL} \
${CONFIGURE_SCRIPT} ${NBCOMPAT_CONFIGURE_ARGS} && \
${MAKE_PROGRAM}
|