blob: 26160223af426b5ffccc3c14b0871a262e09b864 [file] [log] [blame]
#===-- Makefile.common - Shared configuration for LLVM -----*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file was developed by Reid Spencer and is distributed under the
# University of Illinois Open Source License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#
# This file is included by the Makefile.config file of every LLVM module. It
# provides the definitions that are common to all LLVM modules and are required
# so that Makefile.rules can work.
#
#===------------------------------------------------------------------------===#
# Get the path to the 'pwd' command.
PWD := @BINPWD@
# Get the current directory we're going to build, obj and src. The includer
# must have previously set OBJ_ROOT and SRC_ROOT.
OBJ_DIR := $(shell $(PWD))
SRC_DIR := $(shell cd $(SRC_ROOT)/$(patsubst $(OBJ_ROOT)%,%,$(OBJ_DIR));$(PWD))
# Determine if we're on a unix or windows type operating system
LLVM_ON_UNIX:=@LLVM_ON_UNIX@
LLVM_ON_WIN32:=@LLVM_ON_WIN32@
# Target operating system for which LLVM will be compiled.
OS=@OS@
# Target hardware architecture
ARCH=@ARCH@
# Indicates, whether we're cross-compiling LLVM or not
LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
# Executable file extension for build platform (mainly for
# tablegen call if we're cross-compiling).
BUILD_EXEEXT=@BUILD_EXEEXT@
# Shared library extension for host platform.
SHLIBEXT = @SHLIBEXT@
# Executable file extension for host platform.
EXEEXT = @EXEEXT@
# Target triple (cpu-vendor-os) for which we should generate code
TARGET_TRIPLE=@target@
# Targets that we should build
TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
# Enable JIT for this platform
TARGET_HAS_JIT = @TARGET_HAS_JIT@
# Extra options to compile LLVM with
EXTRA_OPTIONS=@EXTRA_OPTIONS@
# Endian-ness of the target
ENDIAN=@ENDIAN@
# Path to the C++ compiler to use. This is an optional setting, which defaults
# to whatever your gmake defaults to.
CXX = @CXX@
# Path to the CC binary, which use used by testcases for native builds.
CC := @CC@
# Linker flags.
LDFLAGS+=@LDFLAGS@
# Path to the library archiver program.
AR_PATH = @AR@
# Path to the nm program
NM_PATH = @NM@
# The pathnames of the programs we require to build
BISON := @BISON@
CMP := @CMP@
CP := @CP@
DATE := @DATE@
FIND := @FIND@
FLEX := @LEX@
GREP := @GREP@
INSTALL := @INSTALL@
MKDIR := $(LLVM_TOP)/support/autoconf/mkinstalldirs
MV := @MV@
RANLIB := @RANLIB@
RM := @RM@
SED := @SED@
TAR := @TAR@
YACC := @YACC@
# Paths to miscellaneous programs we hope are present but might not be
PERL := @PERL@
BZIP2 := @BZIP2@
DOT := @DOT@
DOXYGEN := @DOXYGEN@
ETAGS := @ETAGS@
ETAGSFLAGS := @ETAGSFLAGS@
GROFF := @GROFF@
GZIP := @GZIP@
POD2HTML := @POD2HTML@
POD2MAN := @POD2MAN@
RUNTEST := @RUNTEST@
TCLSH := @TCLSH@
ZIP := @ZIP@
HAVE_PERL := @HAVE_PERL@
HAVE_PTHREAD := @HAVE_PTHREAD@
LIBS := @LIBS@
##############################################################################
# INSTALATION PATHS
#
# The following variables capture the installation paths set by the user or
# defaulted by autoconf. This allows fine-grained control over what gets
# installed where
DESTDIR := @DESTDIR@
PREFIX := @prefix@
BIN_DIR := @bindir@
SBIN_DIR := @bindir@
LIBEXEC_DIR := @libexecdir@
SYSCONF_DIR := @sysconfdir@
SHAREDSTATE_DIR := @sharedstatedir@
LOCALSTATE_DIR := @localstatedir@
LIB_DIR := @libdir@
INCLUDE_DIR := @includedir@
DATAROOT_DIR := @datarootdir@
DATA_DIR := @datadir@
INFO_DIR := @infodir@
LOCALE_DIR := @localedir@
MAN_DIR := @mandir@
DOC_DIR := @docdir@
HTML_DIR := @htmldir@
DVI_DIR := @dvidir@
PDF_DIR := @pdfdir@
PS_DIR := @psdir@
##############################################################################
# FEATURES
#
# The following macro definitions adjusts various options on build parameters
# that affect the build output. You can specify them as part of the configure
# options (--enable-FEATURE or --disable-FEATURE) or on the command line. Each
# of them requires either a 0 or 1 value.
# When WANT_ASSERTIONS is enabled, builds of all of the LLVM code will
# exclude assertion checks, otherwise they are included.
WANT_ASSERTIONS := @WANT_ASSERTIONS@
# When WANT_CHECkING is enabled, this turns on expensive runtime checking such as
# GXXLIB_DEBUG, malloc debug, etc.
WANT_CHECKING := @WANT_CHECKING@
# When WANT_DEBUG is enabled, the compiler generates debug symbols in object code
# and optional code is enabled.
WANT_DEBUG := @WANT_DEBUG@
# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
WANT_DOXYGEN = @WANT_DOXYGEN@
# When WANT_OPTIMIZED is enabled, LLVM code is optimized and output is put
# into the "Release" directories. Otherwise, LLVM code is not optimized and
# output is put in the "Debug" directories.
WANT_OPTIMIZED := @WANT_OPTIMIZED@
# When WANT_OPT_FOR_SIZE is enabled, the optimizations performed will favor
# optimizing for code and data size rather than for speed.
WANT_OPT_FOR_SIZE := @WANT_OPT_FOR_SIZE@
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
WANT_PROFILING := @WANT_PROFILING@
# When WANT_STRIPPED is enabled, executables and libraries will be
# stripped of debug symbols
WANT_STRIPPED := @WANT_STRIPPED@
# When WANT_THREADS is enabled, thread libraries will be found and included
WANT_THREADS := @WANT_THREADS@
# This option tells the Makefiles to produce verbose output.
# It essentially prints the commands that make is executing
WANT_VERBOSE := @WANT_VERBOSE@
################################################################################
# Things we just assume are "there"
ECHO := echo
# Get the options for causing archives to link all their content instead of
# just missing symbols, and the inverse of that. This is used for certain LLVM
# tools that permit loadable modules. It ensures that the LLVM symbols will be
# available to those loadable modules.
LINKALL := @LINKALL@
NOLINKALL := @NOLINKALL@
# Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
# on the check.
HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
# Include all of the build rules that pertain to the GOAL of the original
# makefile.
MAKEFILE_GOAL=$(LLVM_TOP)/support/make/Makefile.$(GOAL)
GOAL_EXISTS=$(shell if test -f $(MAKEFILE_GOAL); then echo 1 ; else echo 0 ; fi)
ifeq ($(GOAL_EXISTS),1)
include $(MAKEFILE_GOAL)
else
$(error GOAL "$(GOAL)" does not exist in $(LLVM_TOP)/support/make)
endif