2016-03-11 23:56:33 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.if !targets(__<${_this:T}>__)
|
|
|
|
__<${_this:T}>__:
|
|
|
|
|
|
|
|
# Makefile for the compatibility libraries.
|
2021-12-09 15:22:51 +00:00
|
|
|
# - 32-bit compat libraries on PowerPC, and AMD64.
|
2016-03-11 23:56:33 +00:00
|
|
|
|
2019-10-15 21:08:49 +00:00
|
|
|
.include <bsd.compat.mk>
|
2016-06-15 23:58:03 +00:00
|
|
|
|
2016-03-11 23:56:33 +00:00
|
|
|
# Yes, the flags are redundant.
|
2017-11-01 21:22:05 +00:00
|
|
|
LIBCOMPATWMAKEENV+= \
|
2020-10-08 17:30:05 +00:00
|
|
|
INSTALL="${INSTALL_CMD} -U" \
|
2016-03-11 23:56:33 +00:00
|
|
|
PATH=${TMPPATH} \
|
2022-07-01 07:33:16 +00:00
|
|
|
SYSROOT=${WORLDTMP} \
|
2016-03-11 23:56:33 +00:00
|
|
|
LIBDIR=/usr/lib${libcompat} \
|
|
|
|
SHLIBDIR=/usr/lib${libcompat} \
|
2022-08-11 22:17:52 +00:00
|
|
|
LIBDATADIR=/usr/lib${libcompat} \
|
2016-03-11 23:56:33 +00:00
|
|
|
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
|
2016-04-14 21:06:10 +00:00
|
|
|
.if ${MK_META_MODE} != "no"
|
|
|
|
# Don't rebuild build-tools targets during normal build.
|
2017-04-06 18:21:59 +00:00
|
|
|
LIBCOMPATWMAKEENV+= BUILD_TOOLS_META=.NOMETA
|
2016-04-14 21:06:10 +00:00
|
|
|
.endif
|
2016-05-29 06:20:15 +00:00
|
|
|
LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
|
2016-05-29 06:20:36 +00:00
|
|
|
CXX="${XCXX} ${LIBCOMPATCXXFLAGS} ${LIBCOMPATCFLAGS}" \
|
2016-05-29 06:20:15 +00:00
|
|
|
CPP="${XCPP} ${LIBCOMPATCFLAGS}" \
|
2022-07-01 07:33:16 +00:00
|
|
|
DESTDIR=${WORLDTMP} \
|
2016-03-11 23:56:33 +00:00
|
|
|
-DNO_CPU_CFLAGS \
|
2022-02-02 21:34:29 +00:00
|
|
|
MK_BOOT=no \
|
2016-03-11 23:56:33 +00:00
|
|
|
MK_CTF=no \
|
2022-02-02 21:34:29 +00:00
|
|
|
MK_TESTS=no
|
2021-08-01 09:10:49 +00:00
|
|
|
LIBCOMPATWMAKE+= ${TIME_ENV} ${LIBCOMPATWMAKEENV} ${MAKE} ${LIBCOMPATWMAKEFLAGS} \
|
2017-11-05 00:11:47 +00:00
|
|
|
OBJTOP=${LIBCOMPAT_OBJTOP} \
|
|
|
|
OBJROOT='$${OBJTOP}/' \
|
2017-11-05 00:11:51 +00:00
|
|
|
MAKEOBJDIRPREFIX= \
|
2016-03-11 23:56:33 +00:00
|
|
|
MK_MAN=no MK_HTML=no
|
2016-04-05 21:12:03 +00:00
|
|
|
LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \
|
2018-08-03 18:52:51 +00:00
|
|
|
${IMAKE_INSTALL} \
|
2016-03-25 19:12:13 +00:00
|
|
|
-DLIBRARIES_ONLY
|
2016-03-11 23:56:33 +00:00
|
|
|
|
2018-07-30 14:28:00 +00:00
|
|
|
_LC_LIBDIRS.yes= lib
|
2018-07-30 14:42:59 +00:00
|
|
|
_LC_LIBDIRS.yes+= gnu/lib
|
2016-03-12 18:41:27 +00:00
|
|
|
_LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib
|
|
|
|
_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib
|
|
|
|
_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib
|
2016-03-11 23:56:33 +00:00
|
|
|
|
2016-03-25 19:12:38 +00:00
|
|
|
_LC_INCDIRS= \
|
|
|
|
include \
|
2021-10-04 12:16:32 +00:00
|
|
|
lib/ncurses/tinfo \
|
2016-03-25 19:12:38 +00:00
|
|
|
${_LC_LIBDIRS.yes}
|
|
|
|
|
2018-06-15 17:03:57 +00:00
|
|
|
.if ${MK_FILE} != "no"
|
|
|
|
_libmagic= lib/libmagic
|
|
|
|
.endif
|
2021-05-31 14:24:04 +00:00
|
|
|
.if ${MK_PMC} != "no"
|
2018-06-15 16:48:09 +00:00
|
|
|
_jevents= lib/libpmc/pmu-events
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2016-03-11 23:56:33 +00:00
|
|
|
# Shared logic
|
|
|
|
build${libcompat}: .PHONY
|
|
|
|
@echo
|
|
|
|
@echo "--------------------------------------------------------------"
|
2019-10-15 21:22:13 +00:00
|
|
|
@echo ">>> stage 4.3: building lib${libcompat} shim libraries"
|
2016-03-11 23:56:33 +00:00
|
|
|
@echo "--------------------------------------------------------------"
|
2018-06-29 21:15:26 +00:00
|
|
|
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
|
2022-07-01 07:33:16 +00:00
|
|
|
-p ${WORLDTMP}/usr >/dev/null
|
2016-03-11 23:56:33 +00:00
|
|
|
.if ${MK_DEBUG_FILES} != "no"
|
2018-06-29 21:15:26 +00:00
|
|
|
${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \
|
2022-07-01 07:33:16 +00:00
|
|
|
-p ${WORLDTMP}/usr/lib/debug/usr >/dev/null
|
2016-03-11 23:56:33 +00:00
|
|
|
.endif
|
2021-10-04 12:16:32 +00:00
|
|
|
.for _dir in lib/ncurses/tinfo ${_libmagic} ${_jevents}
|
2018-06-15 18:50:24 +00:00
|
|
|
.for _t in ${_obj} build-tools
|
2016-03-11 23:56:33 +00:00
|
|
|
${_+_}cd ${.CURDIR}/${_dir}; \
|
|
|
|
WORLDTMP=${WORLDTMP} \
|
|
|
|
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
|
2021-08-04 18:20:50 +00:00
|
|
|
${MAKE} DESTDIR= \
|
2017-11-02 18:08:36 +00:00
|
|
|
OBJTOP=${LIBCOMPAT_OBJTOP} \
|
|
|
|
OBJROOT='$${OBJTOP}/' \
|
2017-11-05 00:11:51 +00:00
|
|
|
MAKEOBJDIRPREFIX= \
|
2021-08-04 18:17:34 +00:00
|
|
|
DIRPRFX=${_dir}/ \
|
|
|
|
-DNO_LINT \
|
|
|
|
-DNO_CPU_CFLAGS \
|
|
|
|
MK_ASAN=no \
|
|
|
|
MK_CTF=no \
|
|
|
|
MK_RETPOLINE=no \
|
2021-08-04 18:20:50 +00:00
|
|
|
MK_SSP=no \
|
2021-08-04 18:17:34 +00:00
|
|
|
MK_UBSAN=no \
|
|
|
|
MK_WERROR=no \
|
2018-06-15 18:50:24 +00:00
|
|
|
${_t}
|
|
|
|
.endfor
|
2016-03-11 23:56:33 +00:00
|
|
|
.endfor
|
|
|
|
${_+_}cd ${.CURDIR}; \
|
|
|
|
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
|
|
|
|
|
|
|
|
distribute${libcompat} install${libcompat}: .PHONY
|
|
|
|
.for _dir in ${_LC_LIBDIRS.yes}
|
|
|
|
${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} ${.TARGET:S/${libcompat}$//}
|
|
|
|
.endfor
|
|
|
|
|
2019-11-07 22:58:10 +00:00
|
|
|
.endif # !targets(__<${_this:T}>__)
|