Chris Lattner | 144992e | 2004-01-05 05:28:15 +0000 | [diff] [blame] | 1 | ##===- tools/Makefile --------------------------------------*- Makefile -*-===## |
Mikhail Glushenkov | 98d5ed5 | 2008-11-25 21:38:12 +0000 | [diff] [blame] | 2 | # |
John Criswell | abe5cdc | 2003-10-20 22:29:16 +0000 | [diff] [blame] | 3 | # The LLVM Compiler Infrastructure |
| 4 | # |
Chris Lattner | 8fa21ac | 2007-12-29 20:07:17 +0000 | [diff] [blame] | 5 | # This file is distributed under the University of Illinois Open Source |
| 6 | # License. See LICENSE.TXT for details. |
Mikhail Glushenkov | 98d5ed5 | 2008-11-25 21:38:12 +0000 | [diff] [blame] | 7 | # |
John Criswell | abe5cdc | 2003-10-20 22:29:16 +0000 | [diff] [blame] | 8 | ##===----------------------------------------------------------------------===## |
Chris Lattner | 144992e | 2004-01-05 05:28:15 +0000 | [diff] [blame] | 9 | |
Chris Lattner | 71b82e3 | 2002-12-06 03:53:40 +0000 | [diff] [blame] | 10 | LEVEL := .. |
Mike Stump | 82221d6 | 2009-01-24 00:00:41 +0000 | [diff] [blame] | 11 | |
NAKAMURA Takumi | 914f192 | 2011-10-16 02:54:26 +0000 | [diff] [blame] | 12 | include $(LEVEL)/Makefile.config |
| 13 | |
Mike Stump | 82221d6 | 2009-01-24 00:00:41 +0000 | [diff] [blame] | 14 | # Build clang if present. |
NAKAMURA Takumi | 914f192 | 2011-10-16 02:54:26 +0000 | [diff] [blame] | 15 | |
| 16 | ifneq ($(CLANG_SRC_ROOT),) |
| 17 | OPTIONAL_PARALLEL_DIRS := $(CLANG_SRC_ROOT) |
| 18 | else |
| 19 | OPTIONAL_PARALLEL_DIRS := clang |
| 20 | endif |
Mike Stump | 82221d6 | 2009-01-24 00:00:41 +0000 | [diff] [blame] | 21 | |
Stephen Wilson | a32b8d7 | 2011-02-20 04:17:15 +0000 | [diff] [blame] | 22 | # Build LLDB if present. Note LLDB must be built last as it depends on the |
Jim Grosbach | 0072cdb | 2011-03-18 17:11:39 +0000 | [diff] [blame] | 23 | # wider LLVM infrastructure (including Clang). |
Stephen Wilson | a32b8d7 | 2011-02-20 04:17:15 +0000 | [diff] [blame] | 24 | OPTIONAL_DIRS := lldb |
| 25 | |
Mikhail Glushenkov | 98d5ed5 | 2008-11-25 21:38:12 +0000 | [diff] [blame] | 26 | # NOTE: The tools are organized into five groups of four consisting of one |
| 27 | # large and three small executables. This is done to minimize memory load |
Reid Spencer | 49785b9 | 2007-02-09 17:02:07 +0000 | [diff] [blame] | 28 | # in parallel builds. Please retain this ordering. |
Jim Grosbach | 0072cdb | 2011-03-18 17:11:39 +0000 | [diff] [blame] | 29 | DIRS := llvm-config |
Chris Lattner | 9289f93 | 2010-07-20 20:55:57 +0000 | [diff] [blame] | 30 | PARALLEL_DIRS := opt llvm-as llvm-dis \ |
Reid Spencer | 49785b9 | 2007-02-09 17:02:07 +0000 | [diff] [blame] | 31 | llc llvm-ranlib llvm-ar llvm-nm \ |
Michael J. Spencer | 9125493 | 2012-04-19 19:27:54 +0000 | [diff] [blame] | 32 | llvm-prof llvm-link \ |
Chris Lattner | 979634b | 2010-07-20 18:25:19 +0000 | [diff] [blame] | 33 | lli llvm-extract llvm-mc \ |
Michael J. Spencer | 9125493 | 2012-04-19 19:27:54 +0000 | [diff] [blame] | 34 | bugpoint llvm-bcanalyzer \ |
David Meyer | 2fc34c5 | 2012-03-01 01:36:50 +0000 | [diff] [blame] | 35 | llvm-diff macho-dump llvm-objdump llvm-readobj \ |
Andrew Kaylor | c5feb51 | 2012-11-27 01:24:25 +0000 | [diff] [blame] | 36 | llvm-rtdyld llvm-dwarfdump llvm-cov \ |
Alexander Potapenko | 8c07f55 | 2012-11-12 11:33:29 +0000 | [diff] [blame] | 37 | llvm-size llvm-stress llvm-mcmarkup \ |
Rafael Espindola | 3add3e9 | 2013-04-05 20:00:35 +0000 | [diff] [blame] | 38 | llvm-symbolizer obj2yaml yaml2obj |
Bill Wendling | 3f19dfe7 | 2007-12-08 23:58:46 +0000 | [diff] [blame] | 39 | |
Andrew Kaylor | c5feb51 | 2012-11-27 01:24:25 +0000 | [diff] [blame] | 40 | # If Intel JIT Events support is configured, build an extra tool to test it. |
| 41 | ifeq ($(USE_INTEL_JITEVENTS), 1) |
| 42 | PARALLEL_DIRS += llvm-jitlistener |
| 43 | endif |
| 44 | |
Chris Lattner | 0cb8977 | 2009-04-25 22:08:52 +0000 | [diff] [blame] | 45 | # Let users override the set of tools to build from the command line. |
| 46 | ifdef ONLY_TOOLS |
| 47 | OPTIONAL_PARALLEL_DIRS := |
Stephen Wilson | a32b8d7 | 2011-02-20 04:17:15 +0000 | [diff] [blame] | 48 | OPTIONAL_DIRS := $(findstring lldb,$(ONLY_TOOLS)) |
| 49 | PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS)) |
Chris Lattner | 0cb8977 | 2009-04-25 22:08:52 +0000 | [diff] [blame] | 50 | endif |
| 51 | |
Chris Lattner | 2e89d20 | 2010-03-05 00:59:18 +0000 | [diff] [blame] | 52 | # These libraries build as dynamic libraries (.dylib /.so), they can only be |
| 53 | # built if ENABLE_PIC is set. |
Daniel Dunbar | 73a860b | 2010-12-16 15:42:26 +0000 | [diff] [blame] | 54 | ifndef ONLY_TOOLS |
Nick Lewycky | 9e26e6d | 2009-03-03 07:45:09 +0000 | [diff] [blame] | 55 | ifeq ($(ENABLE_PIC),1) |
NAKAMURA Takumi | 71c8c12 | 2010-11-29 00:20:34 +0000 | [diff] [blame] | 56 | # gold only builds if binutils is around. It requires "lto" to build before |
| 57 | # it so it is added to DIRS. |
| 58 | ifdef BINUTILS_INCDIR |
| 59 | DIRS += lto gold |
| 60 | else |
| 61 | PARALLEL_DIRS += lto |
| 62 | endif |
Chris Lattner | 979634b | 2010-07-20 18:25:19 +0000 | [diff] [blame] | 63 | |
NAKAMURA Takumi | 71c8c12 | 2010-11-29 00:20:34 +0000 | [diff] [blame] | 64 | PARALLEL_DIRS += bugpoint-passes |
Anton Korobeynikov | dc7b519 | 2006-09-08 18:00:43 +0000 | [diff] [blame] | 65 | endif |
Reid Spencer | c3b9370 | 2006-05-30 21:20:55 +0000 | [diff] [blame] | 66 | |
Tobias Grosser | ea9dca4 | 2010-10-30 00:54:26 +0000 | [diff] [blame] | 67 | ifdef LLVM_HAS_POLLY |
| 68 | PARALLEL_DIRS += polly |
| 69 | endif |
Daniel Dunbar | 73a860b | 2010-12-16 15:42:26 +0000 | [diff] [blame] | 70 | endif |
Tobias Grosser | ea9dca4 | 2010-10-30 00:54:26 +0000 | [diff] [blame] | 71 | |
NAKAMURA Takumi | 142b325 | 2010-11-29 00:20:28 +0000 | [diff] [blame] | 72 | # On Win32, loadable modules can be built with ENABLE_SHARED. |
| 73 | ifneq ($(ENABLE_SHARED),1) |
NAKAMURA Takumi | 638110f | 2010-11-29 08:58:11 +0000 | [diff] [blame] | 74 | ifneq (,$(filter $(HOST_OS), Cygwin MingW)) |
NAKAMURA Takumi | 142b325 | 2010-11-29 00:20:28 +0000 | [diff] [blame] | 75 | PARALLEL_DIRS := $(filter-out bugpoint-passes, \ |
| 76 | $(PARALLEL_DIRS)) |
| 77 | endif |
| 78 | endif |
| 79 | |
Chris Lattner | fe01c28 | 2006-09-08 18:33:49 +0000 | [diff] [blame] | 80 | include $(LEVEL)/Makefile.common |