Home | History | Annotate | Line # | Download | only in llvm
Makefile revision 1.11.2.3
      1  1.11.2.3   yamt #	$NetBSD: Makefile,v 1.11.2.3 2014/05/22 11:42:31 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.11.2.3   yamt realdepends realall: config/config.status need-dl need-terminfo
     13       1.1  joerg 
     14       1.1  joerg config/config.status: ${LLVM_SRCDIR}/configure
     15       1.1  joerg 	mkdir -p config
     16  1.11.2.3   yamt 	printf '#!/bin/sh\necho 2.7.3' > config/python
     17  1.11.2.3   yamt 	chmod 755 config/python
     18  1.11.2.2   yamt 	cd config && ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
     19  1.11.2.3   yamt 	    --enable-optimized CC=${HOST_CC:Q} CXX=${HOST_CXX:Q} \
     20  1.11.2.3   yamt 	    --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.11.2.3   yamt need-terminfo:
     34  1.11.2.3   yamt 	printf '#include <term.h>\nint main(void){return setupterm(0, 0, 0);}' > need-terminfo.c
     35  1.11.2.3   yamt 	for lib in tinfo terminfo ncurses curses; do \
     36  1.11.2.3   yamt 		if ${HOST_CC} -o need-terminfo.out need-terminfo.c -l$$lib > /dev/null 2>&1; then \
     37  1.11.2.3   yamt 			echo -l$$lib > ${.TARGET}; \
     38  1.11.2.3   yamt 			break; \
     39  1.11.2.3   yamt 		fi; \
     40  1.11.2.3   yamt 	done
     41  1.11.2.3   yamt 
     42  1.11.2.3   yamt CLEANFILES+=	need-dl need-dl.c need-dl.out need-terminfo need-terminfo.c need-terminfo.out
     43       1.1  joerg 
     44       1.1  joerg cleandir: cleandir-llvm
     45       1.1  joerg 
     46       1.1  joerg cleandir-llvm:
     47       1.9   matt 	test ! -d config || rm -r config
     48       1.1  joerg 	rm -f need-dl need-dl.tmp
     49       1.1  joerg 
     50       1.1  joerg .include <bsd.hostprog.mk>
     51