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 | |
| 12 | # Build clang if present. |
| 13 | OPTIONAL_PARALLEL_DIRS := clang |
| 14 | |
Mikhail Glushenkov | 98d5ed5 | 2008-11-25 21:38:12 +0000 | [diff] [blame] | 15 | # 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 |
Reid Spencer | 49785b9 | 2007-02-09 17:02:07 +0000 | [diff] [blame] | 17 | # in parallel builds. Please retain this ordering. |
Nick Lewycky | 5eb3773 | 2009-02-26 07:56:49 +0000 | [diff] [blame] | 18 | DIRS := llvm-config |
| 19 | PARALLEL_DIRS := opt llvm-as llvm-dis \ |
Reid Spencer | 49785b9 | 2007-02-09 17:02:07 +0000 | [diff] [blame] | 20 | llc llvm-ranlib llvm-ar llvm-nm \ |
Chris Lattner | e950eee | 2008-03-30 18:58:05 +0000 | [diff] [blame] | 21 | llvm-ld llvm-prof llvm-link \ |
Chris Lattner | cb08fb7 | 2009-10-05 02:29:51 +0000 | [diff] [blame] | 22 | lli llvm-extract \ |
Daniel Dunbar | fdbbc52 | 2009-06-29 21:12:26 +0000 | [diff] [blame] | 23 | bugpoint llvm-bcanalyzer llvm-stub \ |
Chris Lattner | 2e89d20 | 2010-03-05 00:59:18 +0000 | [diff] [blame^] | 24 | llvm-mc llvmc |
| 25 | |
Bill Wendling | 3f19dfe7 | 2007-12-08 23:58:46 +0000 | [diff] [blame] | 26 | |
Chris Lattner | 0cb8977 | 2009-04-25 22:08:52 +0000 | [diff] [blame] | 27 | # Let users override the set of tools to build from the command line. |
| 28 | ifdef ONLY_TOOLS |
| 29 | OPTIONAL_PARALLEL_DIRS := |
| 30 | PARALLEL_DIRS := $(ONLY_TOOLS) |
| 31 | endif |
| 32 | |
Chris Lattner | fe01c28 | 2006-09-08 18:33:49 +0000 | [diff] [blame] | 33 | include $(LEVEL)/Makefile.config |
Chris Lattner | eda4a9e | 2006-09-08 18:08:50 +0000 | [diff] [blame] | 34 | |
Chris Lattner | 2e89d20 | 2010-03-05 00:59:18 +0000 | [diff] [blame^] | 35 | # These libraries build as dynamic libraries (.dylib /.so), they can only be |
| 36 | # built if ENABLE_PIC is set. |
Nick Lewycky | 9e26e6d | 2009-03-03 07:45:09 +0000 | [diff] [blame] | 37 | ifeq ($(ENABLE_PIC),1) |
Chris Lattner | 2e89d20 | 2010-03-05 00:59:18 +0000 | [diff] [blame^] | 38 | # No support for dynamic libraries on windows targets. |
| 39 | ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW)) |
| 40 | PARALLEL_DIRS += lto edis |
| 41 | # gold only builds if binutils is around. |
| 42 | ifdef BINUTILS_INCDIR |
| 43 | PARALLEL_DIRS += gold |
| 44 | endif |
Nick Lewycky | 5eb3773 | 2009-02-26 07:56:49 +0000 | [diff] [blame] | 45 | endif |
Anton Korobeynikov | dc7b519 | 2006-09-08 18:00:43 +0000 | [diff] [blame] | 46 | endif |
Reid Spencer | c3b9370 | 2006-05-30 21:20:55 +0000 | [diff] [blame] | 47 | |
Chris Lattner | 134a9dc | 2010-02-26 21:26:33 +0000 | [diff] [blame] | 48 | # Only build edis if X86 target support is enabled. |
| 49 | ifeq ($(filter $(TARGETS_TO_BUILD), X86),) |
| 50 | PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS)) |
| 51 | endif |
| 52 | |
Chris Lattner | fe01c28 | 2006-09-08 18:33:49 +0000 | [diff] [blame] | 53 | include $(LEVEL)/Makefile.common |