blob: c9b9ff231a6d8bec9a95a0221ecd2c6684e9b4f0 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001##===- tools/Makefile --------------------------------------*- Makefile -*-===##
Mikhail Glushenkovc7e56fe2008-11-25 21:38:12 +00002#
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003# The LLVM Compiler Infrastructure
4#
Chris Lattnere692fc82007-12-29 20:07:17 +00005# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
Mikhail Glushenkovc7e56fe2008-11-25 21:38:12 +00007#
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008##===----------------------------------------------------------------------===##
9
10LEVEL := ..
Mike Stump0fec3192009-01-24 00:00:41 +000011
12# Build clang if present.
13OPTIONAL_PARALLEL_DIRS := clang
14
Mikhail Glushenkovc7e56fe2008-11-25 21:38:12 +000015# NOTE: The tools are organized into five groups of four consisting of one
16# large and three small executables. This is done to minimize memory load
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017# in parallel builds. Please retain this ordering.
Nick Lewyckyabf67362009-02-26 07:56:49 +000018DIRS := llvm-config
19PARALLEL_DIRS := opt llvm-as llvm-dis \
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020 llc llvm-ranlib llvm-ar llvm-nm \
Chris Lattner56317b22008-03-30 18:58:05 +000021 llvm-ld llvm-prof llvm-link \
Chris Lattnerafb1c452009-10-05 02:29:51 +000022 lli llvm-extract \
Daniel Dunbar4771b9e2009-06-29 21:12:26 +000023 bugpoint llvm-bcanalyzer llvm-stub \
Sean Callanan97391ee2010-01-29 01:30:01 +000024 llvm-mc llvmc \
Sean Callanan3c45af42010-02-02 20:20:30 +000025 edis
Bill Wendling0fe34c22007-12-08 23:58:46 +000026
Chris Lattner15aeb9a2009-04-25 22:08:52 +000027# Let users override the set of tools to build from the command line.
28ifdef ONLY_TOOLS
29 OPTIONAL_PARALLEL_DIRS :=
30 PARALLEL_DIRS := $(ONLY_TOOLS)
31endif
32
Dan Gohmanf17a25c2007-07-18 16:29:46 +000033include $(LEVEL)/Makefile.config
34
Nick Lewyckyde724782009-03-03 07:45:09 +000035ifeq ($(ENABLE_PIC),1)
Mikhail Glushenkov714440d2009-07-04 03:54:54 +000036 DIRS += lto
Nick Lewyckyabf67362009-02-26 07:56:49 +000037 ifdef BINUTILS_INCDIR
38 DIRS += gold
39 endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +000040endif
41
Anton Korobeynikov20acb4a2009-03-11 19:49:42 +000042# No support for lto / gold on windows targets
Anton Korobeynikov92c51812009-08-18 00:40:33 +000043ifeq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
Anton Korobeynikov7f37f792009-03-11 21:05:21 +000044 DIRS := $(filter-out lto gold, $(DIRS))
Anton Korobeynikov20acb4a2009-03-11 19:49:42 +000045endif
46
Dan Gohmanf17a25c2007-07-18 16:29:46 +000047include $(LEVEL)/Makefile.common