2004-01-05 06:28:15 +01:00
|
|
|
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
2008-11-25 22:38:12 +01:00
|
|
|
#
|
2003-10-21 00:29:16 +02:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
2007-12-29 21:07:17 +01:00
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2008-11-25 22:38:12 +01:00
|
|
|
#
|
2003-10-21 00:29:16 +02:00
|
|
|
##===----------------------------------------------------------------------===##
|
2004-01-05 06:28:15 +01:00
|
|
|
|
2002-12-06 04:53:40 +01:00
|
|
|
LEVEL := ..
|
2009-01-24 01:00:41 +01:00
|
|
|
|
2011-10-16 04:54:26 +02:00
|
|
|
include $(LEVEL)/Makefile.config
|
|
|
|
|
2009-01-24 01:00:41 +01:00
|
|
|
# Build clang if present.
|
2011-10-16 04:54:26 +02:00
|
|
|
|
|
|
|
ifneq ($(CLANG_SRC_ROOT),)
|
|
|
|
OPTIONAL_PARALLEL_DIRS := $(CLANG_SRC_ROOT)
|
|
|
|
else
|
|
|
|
OPTIONAL_PARALLEL_DIRS := clang
|
|
|
|
endif
|
2009-01-24 01:00:41 +01:00
|
|
|
|
2011-02-20 05:17:15 +01:00
|
|
|
# Build LLDB if present. Note LLDB must be built last as it depends on the
|
2011-03-18 18:11:39 +01:00
|
|
|
# wider LLVM infrastructure (including Clang).
|
2011-02-20 05:17:15 +01:00
|
|
|
OPTIONAL_DIRS := lldb
|
|
|
|
|
2008-11-25 22:38:12 +01: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-09 18:02:07 +01:00
|
|
|
# in parallel builds. Please retain this ordering.
|
2011-03-18 18:11:39 +01:00
|
|
|
DIRS := llvm-config
|
2010-07-20 22:55:57 +02:00
|
|
|
PARALLEL_DIRS := opt llvm-as llvm-dis \
|
2007-02-09 18:02:07 +01:00
|
|
|
llc llvm-ranlib llvm-ar llvm-nm \
|
2012-04-19 21:27:54 +02:00
|
|
|
llvm-prof llvm-link \
|
2010-07-20 20:25:19 +02:00
|
|
|
lli llvm-extract llvm-mc \
|
2012-04-19 21:27:54 +02:00
|
|
|
bugpoint llvm-bcanalyzer \
|
2012-03-01 02:36:50 +01:00
|
|
|
llvm-diff macho-dump llvm-objdump llvm-readobj \
|
2011-09-28 22:57:46 +02:00
|
|
|
llvm-rtdyld llvm-dwarfdump llvm-cov \
|
2012-02-26 09:35:53 +01:00
|
|
|
llvm-size llvm-stress
|
2007-12-09 00:58:46 +01:00
|
|
|
|
2009-04-26 00:08:52 +02:00
|
|
|
# Let users override the set of tools to build from the command line.
|
|
|
|
ifdef ONLY_TOOLS
|
|
|
|
OPTIONAL_PARALLEL_DIRS :=
|
2011-02-20 05:17:15 +01:00
|
|
|
OPTIONAL_DIRS := $(findstring lldb,$(ONLY_TOOLS))
|
|
|
|
PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS))
|
2009-04-26 00:08:52 +02:00
|
|
|
endif
|
|
|
|
|
2010-03-05 01:59:18 +01:00
|
|
|
# These libraries build as dynamic libraries (.dylib /.so), they can only be
|
|
|
|
# built if ENABLE_PIC is set.
|
2010-12-16 16:42:26 +01:00
|
|
|
ifndef ONLY_TOOLS
|
2009-03-03 08:45:09 +01:00
|
|
|
ifeq ($(ENABLE_PIC),1)
|
2010-11-29 01:20:34 +01:00
|
|
|
# gold only builds if binutils is around. It requires "lto" to build before
|
|
|
|
# it so it is added to DIRS.
|
|
|
|
ifdef BINUTILS_INCDIR
|
|
|
|
DIRS += lto gold
|
|
|
|
else
|
|
|
|
PARALLEL_DIRS += lto
|
|
|
|
endif
|
2010-07-20 20:25:19 +02:00
|
|
|
|
2010-11-29 01:20:34 +01:00
|
|
|
PARALLEL_DIRS += bugpoint-passes
|
2006-09-08 20:00:43 +02:00
|
|
|
endif
|
2006-05-30 23:20:55 +02:00
|
|
|
|
2010-10-30 02:54:26 +02:00
|
|
|
ifdef LLVM_HAS_POLLY
|
|
|
|
PARALLEL_DIRS += polly
|
|
|
|
endif
|
2010-12-16 16:42:26 +01:00
|
|
|
endif
|
2010-10-30 02:54:26 +02:00
|
|
|
|
2010-11-29 01:20:28 +01:00
|
|
|
# On Win32, loadable modules can be built with ENABLE_SHARED.
|
|
|
|
ifneq ($(ENABLE_SHARED),1)
|
2010-11-29 09:58:11 +01:00
|
|
|
ifneq (,$(filter $(HOST_OS), Cygwin MingW))
|
2010-11-29 01:20:28 +01:00
|
|
|
PARALLEL_DIRS := $(filter-out bugpoint-passes, \
|
|
|
|
$(PARALLEL_DIRS))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-09-08 20:33:49 +02:00
|
|
|
include $(LEVEL)/Makefile.common
|