Makefile revision 1.9
1# $NetBSD: Makefile,v 1.9 2011/07/07 05:41:59 matt Exp $ 2 3.include <bsd.init.mk> 4 5# 6# Do *not* set HOSTPROG or HOSTLIB at this point otherwise 7# it will create a loop trying to extract the object directory. 8# 9.include "Makefile.inc" 10.include "${LLVM_TOPLEVEL}/lib/Makefile.inc" 11 12realdepends realall: config/config.status need-dl \ 13 config/include/clang/Basic/Version.inc 14 15config/include/clang/Basic/Version.inc: \ 16 ${LLVM_TOPLEVEL}/config/clang/Basic/Version.inc 17 mkdir -p ${.TARGET:H} 18 cat < ${.ALLSRC} > ${.TARGET} 19 20config/config.status: ${LLVM_SRCDIR}/configure 21 mkdir -p config 22 cd config && ${LLVM_SRCDIR}/configure --prefix=/usr \ 23 --enable-targets=x86,powerpc,sparc,arm,mips --host=${MACHINE_GNU_PLATFORM} \ 24 --with-c-include-dirs=/usr/include/clang-3.0:/usr/include \ 25 --enable-optimized --disable--assertions 26 27need-dl: 28 printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c 29 if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \ 30 echo > ${.TARGET}; \ 31 elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \ 32 echo -ldl > ${.TARGET}; \ 33 else \ 34 echo > ${.TARGET}; \ 35 fi 36 37CLEANFILES+= need-dl need-dl.c need-dl.out 38 39cleandir: cleandir-llvm 40 41cleandir-llvm: 42 test ! -d config || rm -r config 43 rm -f need-dl need-dl.tmp 44 45.include <bsd.hostprog.mk> 46