Makefile revision 1.15
11.15Sjoerg# $NetBSD: Makefile,v 1.15 2012/06/17 07:40:25 joerg Exp $ 21.1Sjoerg 31.1Sjoerg.include <bsd.init.mk> 41.1Sjoerg 51.1Sjoerg# 61.1Sjoerg# Do *not* set HOSTPROG or HOSTLIB at this point otherwise 71.1Sjoerg# it will create a loop trying to extract the object directory. 81.1Sjoerg# 91.1Sjoerg.include "Makefile.inc" 101.1Sjoerg.include "${LLVM_TOPLEVEL}/lib/Makefile.inc" 111.1Sjoerg 121.15Sjoergrealdepends realall: config/config.status need-dl 131.1Sjoerg 141.1Sjoergconfig/config.status: ${LLVM_SRCDIR}/configure 151.1Sjoerg mkdir -p config 161.15Sjoerg cd config && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \ 171.15Sjoerg --enable-optimized CC=${HOST_CC:Q} 181.11Sjoerg# --disable-assertions 191.4Sjoerg 201.1Sjoergneed-dl: 211.1Sjoerg printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c 221.1Sjoerg if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \ 231.1Sjoerg echo > ${.TARGET}; \ 241.1Sjoerg elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \ 251.1Sjoerg echo -ldl > ${.TARGET}; \ 261.1Sjoerg else \ 271.1Sjoerg echo > ${.TARGET}; \ 281.1Sjoerg fi 291.1Sjoerg 301.1SjoergCLEANFILES+= need-dl need-dl.c need-dl.out 311.1Sjoerg 321.1Sjoergcleandir: cleandir-llvm 331.1Sjoerg 341.1Sjoergcleandir-llvm: 351.9Smatt test ! -d config || rm -r config 361.1Sjoerg rm -f need-dl need-dl.tmp 371.1Sjoerg 381.1Sjoerg.include <bsd.hostprog.mk> 39