4359ff87e0
In case of installation of both clang and GCC, we want to be able to switch which one is the default by adapting the cc, c++ & cpp symlinks. The default behaviour implemented here is to prefer clang over gcc if they are both installed. Change-Id: Ic14720cd876d2bf934d345a955cb5789378209e6
104 lines
1.7 KiB
Makefile
104 lines
1.7 KiB
Makefile
# $NetBSD: Makefile,v 1.27 2013/07/07 21:36:42 joerg Exp $
|
|
|
|
PROG_CXX= clang
|
|
NOMAN= yes
|
|
|
|
.if !defined(HOSTPROG)
|
|
SYMLINKS+= clang ${BINDIR}/clang++
|
|
SYMLINKS+= clang ${BINDIR}/clang-cpp
|
|
|
|
# if defined(__MINIX)
|
|
SYMLINKS+= clang ${BINDIR}/cc
|
|
SYMLINKS+= clang ${BINDIR}/c++
|
|
SYMLINKS+= clang ${BINDIR}/cpp
|
|
# endif # defined(__MINIX)
|
|
.endif
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
.PATH: ${CLANG_SRCDIR}/tools/driver
|
|
|
|
SRCS= driver.cpp \
|
|
cc1_main.cpp \
|
|
cc1as_main.cpp
|
|
|
|
CLANG_LIBS+= \
|
|
clangFrontendTool \
|
|
clangFrontend \
|
|
clangARCMigrate \
|
|
clangStaticAnalyzerFrontend \
|
|
clangStaticAnalyzerCheckers \
|
|
clangStaticAnalyzerCore \
|
|
clangDriver \
|
|
clangSerialization \
|
|
clangCodeGen \
|
|
clangParse \
|
|
clangSema \
|
|
clangEdit \
|
|
clangAnalysis \
|
|
clangRewriteFrontend \
|
|
clangRewriteCore \
|
|
clangAST \
|
|
clangLex \
|
|
clangBasic
|
|
|
|
LLVM_LIBS+= \
|
|
ObjCARC \
|
|
ipo \
|
|
IRReader \
|
|
AsmParser \
|
|
BitReader \
|
|
BitWriter \
|
|
AArch64CodeGen \
|
|
AArch64TargetInfo \
|
|
AArch64MCTargetDesc \
|
|
AArch64AsmParser \
|
|
AArch64AsmPrinter \
|
|
AArch64Utils \
|
|
ARMCodeGen \
|
|
ARMTargetInfo \
|
|
ARMMCTargetDesc \
|
|
ARMAsmParser \
|
|
ARMAsmPrinter \
|
|
MipsCodeGen \
|
|
MipsTargetInfo \
|
|
MipsMCTargetDesc \
|
|
MipsAsmPrinter \
|
|
MipsAsmParser \
|
|
PowerPCCodeGen \
|
|
PowerPCTargetInfo \
|
|
PowerPCMCTargetDesc \
|
|
PowerPCAsmParser \
|
|
PowerPCAsmPrinter \
|
|
SparcCodeGen \
|
|
SparcTargetInfo \
|
|
SparcMCTargetDesc \
|
|
X86CodeGen \
|
|
X86MCTargetDesc \
|
|
X86TargetInfo \
|
|
X86Utils \
|
|
X86AsmParser \
|
|
X86AsmPrinter \
|
|
Object \
|
|
SelectionDAG \
|
|
AsmPrinter \
|
|
CodeGen \
|
|
Vectorize \
|
|
Target \
|
|
InstCombine \
|
|
Instrumentation \
|
|
ScalarOpts \
|
|
Analysis \
|
|
MCDisassembler \
|
|
MCParser \
|
|
MC \
|
|
Linker \
|
|
TransformsUtils \
|
|
ipa \
|
|
IR \
|
|
Option \
|
|
Support
|
|
|
|
.include "${.PARSEDIR}/../../link.mk"
|
|
|
|
.include <bsd.prog.mk>
|