Home | History | Annotate | Line # | Download | only in llvm
Makefile revision 1.15
      1  1.15  joerg #	$NetBSD: Makefile,v 1.15 2012/06/17 07:40:25 joerg Exp $
      2   1.1  joerg 
      3   1.1  joerg .include <bsd.init.mk>
      4   1.1  joerg 
      5   1.1  joerg #
      6   1.1  joerg # Do *not* set HOSTPROG or HOSTLIB at this point otherwise
      7   1.1  joerg # it will create a loop trying to extract the object directory.
      8   1.1  joerg #
      9   1.1  joerg .include "Makefile.inc"
     10   1.1  joerg .include "${LLVM_TOPLEVEL}/lib/Makefile.inc"
     11   1.1  joerg 
     12  1.15  joerg realdepends realall: config/config.status need-dl
     13   1.1  joerg 
     14   1.1  joerg config/config.status: ${LLVM_SRCDIR}/configure
     15   1.1  joerg 	mkdir -p config
     16  1.15  joerg 	cd config && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
     17  1.15  joerg 	    --enable-optimized CC=${HOST_CC:Q}
     18  1.11  joerg # --disable-assertions
     19   1.4  joerg 
     20   1.1  joerg need-dl:
     21   1.1  joerg 	printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
     22   1.1  joerg 	if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
     23   1.1  joerg 		echo > ${.TARGET}; \
     24   1.1  joerg 	elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \
     25   1.1  joerg 		echo -ldl > ${.TARGET}; \
     26   1.1  joerg 	else \
     27   1.1  joerg 		echo > ${.TARGET}; \
     28   1.1  joerg 	fi
     29   1.1  joerg 
     30   1.1  joerg CLEANFILES+=	need-dl need-dl.c need-dl.out
     31   1.1  joerg 
     32   1.1  joerg cleandir: cleandir-llvm
     33   1.1  joerg 
     34   1.1  joerg cleandir-llvm:
     35   1.9   matt 	test ! -d config || rm -r config
     36   1.1  joerg 	rm -f need-dl need-dl.tmp
     37   1.1  joerg 
     38   1.1  joerg .include <bsd.hostprog.mk>
     39