Home | History | Annotate | Line # | Download | only in llvm
Makefile revision 1.16
      1  1.16  joerg #	$NetBSD: Makefile,v 1.16 2013/02/20 14:13:31 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.16  joerg 	printf '#!/bin/sh\necho 2.7.3' > config/python
     17  1.16  joerg 	chmod 755 config/python
     18  1.15  joerg 	cd config && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
     19  1.16  joerg 	    --enable-optimized CC=${HOST_CC:Q} \
     20  1.16  joerg 	    --with-python=${.OBJDIR}/config/python
     21  1.11  joerg # --disable-assertions
     22   1.4  joerg 
     23   1.1  joerg need-dl:
     24   1.1  joerg 	printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
     25   1.1  joerg 	if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
     26   1.1  joerg 		echo > ${.TARGET}; \
     27   1.1  joerg 	elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \
     28   1.1  joerg 		echo -ldl > ${.TARGET}; \
     29   1.1  joerg 	else \
     30   1.1  joerg 		echo > ${.TARGET}; \
     31   1.1  joerg 	fi
     32   1.1  joerg 
     33   1.1  joerg CLEANFILES+=	need-dl need-dl.c need-dl.out
     34   1.1  joerg 
     35   1.1  joerg cleandir: cleandir-llvm
     36   1.1  joerg 
     37   1.1  joerg cleandir-llvm:
     38   1.9   matt 	test ! -d config || rm -r config
     39   1.1  joerg 	rm -f need-dl need-dl.tmp
     40   1.1  joerg 
     41   1.1  joerg .include <bsd.hostprog.mk>
     42