Remove building with NOCRYPTO option
[minix.git] / tools / llvm / Makefile
blob49f44f35daec83355d1a5867c244429270156030
1 # $NetBSD: Makefile,v 1.20 2015/03/05 10:22:25 joerg Exp $
3 .include <bsd.init.mk>
6 # Do *not* set HOSTPROG or HOSTLIB at this point otherwise
7 # it will create a loop trying to extract the object directory.
9 .include "Makefile.inc"
10 .include "${LLVM_TOPLEVEL}/lib/Makefile.inc"
12 realdepends realall: config/config.status need-dl need-terminfo
14 config/config.status: ${LLVM_SRCDIR}/configure
15 mkdir -p config
16 printf '#!/bin/sh\necho 2.7.3' > config/python
17 chmod 755 config/python
18 cd config && ${HOST_SH} ${LLVM_SRCDIR}/configure ${LLVM_CONFIGURE_ARGS} \
19 --enable-optimized CC=${HOST_CC:Q} CXX=${HOST_CXX:Q} \
20 --with-python=${.OBJDIR}/config/python
21 # --disable-assertions
23 need-dl:
24 printf '#include <dlfcn.h>\nint main(void){void *p; return dladdr(p, p);}' > need-dl.c
25 if ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c > /dev/null 2>&1; then \
26 echo > ${.TARGET}; \
27 elif ${HOST_CC} -o need-dl.out -D_GNU_SOURCE need-dl.c -ldl > /dev/null 2>&1; then \
28 echo -ldl > ${.TARGET}; \
29 else \
30 echo > ${.TARGET}; \
33 need-terminfo:
34 printf '#include <term.h>\nint main(void){return setupterm(0, 0, 0);}' > need-terminfo.c
35 for lib in tinfo terminfo ncurses curses; do \
36 if ${HOST_CC} -o need-terminfo.out need-terminfo.c -l$$lib > /dev/null 2>&1; then \
37 echo -l$$lib > ${.TARGET}; \
38 break; \
39 fi; \
40 done
42 CLEANFILES+= need-dl need-dl.c need-dl.out need-terminfo need-terminfo.c need-terminfo.out
44 cleandir: cleandir-llvm
46 cleandir-llvm: .PHONY
47 test ! -d config || rm -r config
48 rm -f need-dl need-dl.tmp
50 .include <bsd.hostprog.mk>