2004-01-05 05:28:15 +00:00
|
|
|
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
2008-11-25 21:38:12 +00:00
|
|
|
#
|
2003-10-20 22:29:16 +00:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
2007-12-29 20:07:17 +00:00
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2008-11-25 21:38:12 +00:00
|
|
|
#
|
2003-10-20 22:29:16 +00:00
|
|
|
##===----------------------------------------------------------------------===##
|
2004-01-05 05:28:15 +00:00
|
|
|
|
2002-12-06 03:53:40 +00:00
|
|
|
LEVEL := ..
|
2009-01-24 00:00:41 +00:00
|
|
|
|
|
|
|
# Build clang if present.
|
|
|
|
OPTIONAL_PARALLEL_DIRS := clang
|
|
|
|
|
2008-11-25 21:38:12 +00: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 17:02:07 +00:00
|
|
|
# in parallel builds. Please retain this ordering.
|
2009-02-26 07:56:49 +00:00
|
|
|
DIRS := llvm-config
|
|
|
|
PARALLEL_DIRS := opt llvm-as llvm-dis \
|
2007-02-09 17:02:07 +00:00
|
|
|
llc llvm-ranlib llvm-ar llvm-nm \
|
2008-03-30 18:58:05 +00:00
|
|
|
llvm-ld llvm-prof llvm-link \
|
2009-10-05 02:29:51 +00:00
|
|
|
lli llvm-extract \
|
2009-06-29 21:12:26 +00:00
|
|
|
bugpoint llvm-bcanalyzer llvm-stub \
|
2010-03-05 00:59:18 +00:00
|
|
|
llvm-mc llvmc
|
2007-12-08 23:58:46 +00:00
|
|
|
|
2009-04-25 22:08:52 +00: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-08 18:33:49 +00:00
|
|
|
include $(LEVEL)/Makefile.config
|
2006-09-08 18:08:50 +00:00
|
|
|
|
2010-03-05 00:59:18 +00:00
|
|
|
# These libraries build as dynamic libraries (.dylib /.so), they can only be
|
|
|
|
# built if ENABLE_PIC is set.
|
2009-03-03 07:45:09 +00:00
|
|
|
ifeq ($(ENABLE_PIC),1)
|
2010-03-05 00:59:18 +00:00
|
|
|
# No support for dynamic libraries on windows targets.
|
|
|
|
ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
|
2010-04-09 01:43:16 +00:00
|
|
|
DIRS += edis
|
2010-03-23 22:15:33 +00:00
|
|
|
|
2010-03-05 02:34:34 +00:00
|
|
|
# gold only builds if binutils is around. It requires "lto" to build before
|
|
|
|
# it so it is added to DIRS.
|
2010-03-05 00:59:18 +00:00
|
|
|
ifdef BINUTILS_INCDIR
|
2010-03-09 09:03:21 +00:00
|
|
|
DIRS += lto gold
|
2010-03-05 02:34:34 +00:00
|
|
|
else
|
|
|
|
PARALLEL_DIRS += lto
|
2010-03-05 00:59:18 +00:00
|
|
|
endif
|
2009-02-26 07:56:49 +00:00
|
|
|
endif
|
2006-09-08 18:00:43 +00:00
|
|
|
endif
|
2006-05-30 21:20:55 +00:00
|
|
|
|
2010-02-26 21:26:33 +00:00
|
|
|
# Only build edis if X86 target support is enabled.
|
|
|
|
ifeq ($(filter $(TARGETS_TO_BUILD), X86),)
|
|
|
|
PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS))
|
|
|
|
endif
|
|
|
|
|
2010-03-23 22:15:33 +00:00
|
|
|
# Don't build edis if we explicitly disabled it.
|
2010-03-23 23:09:03 +00:00
|
|
|
ifeq ($(DISABLE_EDIS),1)
|
2010-03-23 22:15:33 +00:00
|
|
|
PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS))
|
|
|
|
endif
|
|
|
|
|
2006-09-08 18:33:49 +00:00
|
|
|
include $(LEVEL)/Makefile.common
|