Home | History | Annotate | Line # | Download | only in llvm
Makefile revision 1.11.2.1
      1  1.11.2.1   yamt #	$NetBSD: Makefile,v 1.11.2.1 2012/04/17 00:09:28 yamt 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.1  joerg realdepends realall: config/config.status need-dl \
     13       1.1  joerg 	config/include/clang/Basic/Version.inc
     14       1.1  joerg 
     15       1.1  joerg config/include/clang/Basic/Version.inc: \
     16       1.1  joerg 	${LLVM_TOPLEVEL}/config/clang/Basic/Version.inc
     17       1.1  joerg 	mkdir -p ${.TARGET:H}
     18       1.1  joerg 	cat < ${.ALLSRC} > ${.TARGET}
     19       1.1  joerg 
     20       1.1  joerg config/config.status: ${LLVM_SRCDIR}/configure
     21       1.1  joerg 	mkdir -p config
     22      1.10   adam 	cd config && ${LLVM_SRCDIR}/configure CC=${HOST_CC:Q} --prefix=/usr \
     23      1.10   adam 	    --enable-targets=x86,powerpc,sparc,arm,mips \
     24      1.10   adam 	    --host=${MACHINE_GNU_PLATFORM} \
     25       1.4  joerg 	    --with-c-include-dirs=/usr/include/clang-3.0:/usr/include \
     26  1.11.2.1   yamt 	    --with-clang-srcdir=${CLANG_SRCDIR} \
     27      1.11  joerg 	    --enable-optimized
     28      1.11  joerg # --disable-assertions
     29       1.4  joerg 
     30       1.1  joerg need-dl:
     31       1.1  joerg 	printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
     32       1.1  joerg 	if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
     33       1.1  joerg 		echo > ${.TARGET}; \
     34       1.1  joerg 	elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \
     35       1.1  joerg 		echo -ldl > ${.TARGET}; \
     36       1.1  joerg 	else \
     37       1.1  joerg 		echo > ${.TARGET}; \
     38       1.1  joerg 	fi
     39       1.1  joerg 
     40       1.1  joerg CLEANFILES+=	need-dl need-dl.c need-dl.out
     41       1.1  joerg 
     42       1.1  joerg cleandir: cleandir-llvm
     43       1.1  joerg 
     44       1.1  joerg cleandir-llvm:
     45       1.9   matt 	test ! -d config || rm -r config
     46       1.1  joerg 	rm -f need-dl need-dl.tmp
     47       1.1  joerg 
     48       1.1  joerg .include <bsd.hostprog.mk>
     49