On Having Built Linux for a Small System


Explanation: Config/uClibc-dev/v0.9.20.mak

${EXTTEMP}/uClibc-dev-${VERSION}-xdc/.built: ${EXTTEMP}/uClibc-${VERSION}/.configured
	(	[ ! -d ${EXTTEMP}/uClibc-dev-${VERSION}-xdc ] || rm -rf ${EXTTEMP}/uClibc-dev-${VERSION}-xdc || exit 1 ;\
		mv ${EXTTEMP}/uClibc-${VERSION} ${EXTTEMP}/uClibc-dev-${VERSION}-xdc || exit 1 ;\
		cd ${EXTTEMP}/uClibc-dev-${VERSION}-xdc || exit 1 ;\
		cp ${XTC_ROOT}/etc/uClibc-${VERSION}-config .config || exit 1 ;\
		yes '' | ${MAKE} HOSTCC=${HTC_GCC} oldconfig \
			  || exit 1 ;\
		${MAKE} || exit 1 ;\
		${MAKE} CROSS=${XTC_ROOT}/usr/bin/${TARGET_SPEC}- \
			HOSTCC=${XTC_ROOT}/usr/bin/${TARGET_SPEC}-gcc \
			-C ldso/util ldd || exit 1 \
	) || exit 1
	touch ${EXTTEMP}/uClibc-dev-${VERSION}-xdc/.built

.PHONY: install-xdc
install-xdc: ${EXTTEMP}/uClibc-dev-${VERSION}-xdc/.built
	(	cd ${EXTTEMP}/uClibc-dev-${VERSION}-xdc || exit 1 ;\
 		${MAKE} PREFIX=${XDC_ROOT}/ DEVEL_PREFIX=/usr/ RUNTIME_PREFIX=/ install_dev || exit 1 ;\
		mkdir -p ${XDC_ROOT}/usr/bin || exit 1 ;\
		cp ldso/util/ldd ${XDC_ROOT}/usr/bin || exit 1 \
	) || exit 1