2004-01-05 13:28:15 +08:00
|
|
|
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
2008-11-26 05:38:12 +08:00
|
|
|
#
|
2003-10-21 06:29:16 +08:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
2007-12-30 04:07:17 +08:00
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2008-11-26 05:38:12 +08:00
|
|
|
#
|
2003-10-21 06:29:16 +08:00
|
|
|
##===----------------------------------------------------------------------===##
|
2004-01-05 13:28:15 +08:00
|
|
|
|
2002-12-06 11:53:40 +08:00
|
|
|
LEVEL := ..
|
2009-01-24 08:00:41 +08:00
|
|
|
|
|
|
|
# Build clang if present.
|
|
|
|
OPTIONAL_PARALLEL_DIRS := clang
|
|
|
|
|
2008-11-26 05:38:12 +08:00
|
|
|
# NOTE: The tools are organized into five groups of four consisting of one
|
|
|
|
# large and three small executables. This is done to minimize memory load
|
2007-02-10 01:02:07 +08:00
|
|
|
# in parallel builds. Please retain this ordering.
|
2010-07-21 02:25:19 +08:00
|
|
|
DIRS := llvm-config
|
2010-07-21 04:55:57 +08:00
|
|
|
PARALLEL_DIRS := opt llvm-as llvm-dis \
|
2007-02-10 01:02:07 +08:00
|
|
|
llc llvm-ranlib llvm-ar llvm-nm \
|
2008-03-31 02:58:05 +08:00
|
|
|
llvm-ld llvm-prof llvm-link \
|
2010-07-21 02:25:19 +08:00
|
|
|
lli llvm-extract llvm-mc \
|
2010-08-09 22:05:42 +08:00
|
|
|
bugpoint llvm-bcanalyzer llvm-stub \
|
2010-08-24 17:16:51 +08:00
|
|
|
llvmc llvm-diff
|
2007-12-09 07:58:46 +08:00
|
|
|
|
2009-04-26 06:08:52 +08:00
|
|
|
# Let users override the set of tools to build from the command line.
|
|
|
|
ifdef ONLY_TOOLS
|
|
|
|
OPTIONAL_PARALLEL_DIRS :=
|
|
|
|
PARALLEL_DIRS := $(ONLY_TOOLS)
|
|
|
|
endif
|
|
|
|
|
2006-09-09 02:33:49 +08:00
|
|
|
include $(LEVEL)/Makefile.config
|
2006-09-09 02:08:50 +08:00
|
|
|
|
2010-07-21 02:25:19 +08:00
|
|
|
|
2010-03-05 08:59:18 +08:00
|
|
|
# These libraries build as dynamic libraries (.dylib /.so), they can only be
|
|
|
|
# built if ENABLE_PIC is set.
|
2009-03-03 15:45:09 +08:00
|
|
|
ifeq ($(ENABLE_PIC),1)
|
2010-03-05 08:59:18 +08:00
|
|
|
# No support for dynamic libraries on windows targets.
|
|
|
|
ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
|
2010-03-05 10:34:34 +08:00
|
|
|
# gold only builds if binutils is around. It requires "lto" to build before
|
|
|
|
# it so it is added to DIRS.
|
2010-03-05 08:59:18 +08:00
|
|
|
ifdef BINUTILS_INCDIR
|
2010-03-09 17:03:21 +08:00
|
|
|
DIRS += lto gold
|
2010-03-05 10:34:34 +08:00
|
|
|
else
|
|
|
|
PARALLEL_DIRS += lto
|
2010-03-05 08:59:18 +08:00
|
|
|
endif
|
2010-07-21 02:25:19 +08:00
|
|
|
|
2010-08-09 22:05:42 +08:00
|
|
|
PARALLEL_DIRS += bugpoint-passes
|
|
|
|
|
2010-07-21 02:25:19 +08:00
|
|
|
# The edis library is only supported if ARM and/or X86 are enabled, and if
|
|
|
|
# LLVM is being built PIC on platforms that support dylibs.
|
|
|
|
ifneq ($(DISABLE_EDIS),1)
|
|
|
|
ifneq ($(filter $(TARGETS_TO_BUILD), X86 ARM),)
|
2010-07-21 04:55:57 +08:00
|
|
|
PARALLEL_DIRS += edis
|
2010-07-21 02:25:19 +08:00
|
|
|
endif
|
|
|
|
endif
|
2009-02-26 15:56:49 +08:00
|
|
|
endif
|
2006-09-09 02:00:43 +08:00
|
|
|
endif
|
2006-05-31 05:20:55 +08:00
|
|
|
|
2010-10-30 08:54:26 +08:00
|
|
|
ifdef LLVM_HAS_POLLY
|
|
|
|
PARALLEL_DIRS += polly
|
|
|
|
endif
|
|
|
|
|
2006-09-09 02:33:49 +08:00
|
|
|
include $(LEVEL)/Makefile.common
|