blob: feaf81544df88f1f8f35b2263259f41cd0b42b31 [file] [log] [blame]
Misha Brukman6d5ab862004-04-24 00:10:56 +00001#===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===#
2#
3# The LLVM Compiler Infrastructure
4#
5# This file was developed by the LLVM research group and is distributed under
6# the University of Illinois Open Source License. See LICENSE.TXT for details.
7#
8#===------------------------------------------------------------------------===#
John Criswell7a73b802003-06-30 21:59:07 +00009#
10# This file is included by Makefile.common. It defines paths and other
11# values specific to a particular installation of LLVM.
Brian Gaekef1dd2002004-01-16 21:31:34 +000012#
Misha Brukman6d5ab862004-04-24 00:10:56 +000013#===------------------------------------------------------------------------===#
John Criswell7a73b802003-06-30 21:59:07 +000014
Reid Spencerb2cb4862005-01-16 02:20:42 +000015# Define LLVM specific info and directories based on the autoconf variables
16LLVMPackageName := @PACKAGE_NAME@
17LLVMVersion := @PACKAGE_VERSION@
Reid Spencere1200212004-11-29 04:53:50 +000018LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
Reid Spencerb2cb4862005-01-16 02:20:42 +000019
20###########################################################################
21# Directory Configuration
22# This section of the Makefile determines what is where. To be
23# specific, there are several locations that need to be defined:
24#
25# o LLVM_SRC_ROOT : The root directory of the LLVM source code.
26# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code.
27#
28# o PROJ_SRC_DIR : The directory containing the code to build.
29# o PROJ_SRC_ROOT : The root directory of the code to build.
30#
31# o PROJ_OBJ_DIR : The directory in which compiled code will be placed.
32# o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
33#
34###########################################################################
35
36# Set the project name to LLVM if its not defined
37ifndef PROJECT_NAME
38PROJECT_NAME := LLVM
39endif
40
41PROJ_OBJ_DIR := $(shell pwd)
42PROJ_OBJ_ROOT := $(subst //,/,$(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); pwd))
43
44ifeq ($(PROJECT_NAME),LLVM)
45LLVM_SRC_ROOT := @abs_top_srcdir@
46LLVM_OBJ_ROOT := @abs_top_builddir@
47PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
Reid Spencer153626a2005-01-16 06:53:48 +000048PROJ_SRC_DIR := $(subst //,/,$(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
Reid Spencerb2cb4862005-01-16 02:20:42 +000049PROJ_prefix := @prefix@
50PROJ_bindir := @prefix@/bin
51PROJ_libdir := @prefix@/lib
52PROJ_datadir := @prefix@/share
53PROJ_docsdir := @prefix@/docs/llvm
54PROJ_etcdir := @prefix@/etc/llvm
55PROJ_includedir := @prefix@/include
56PROJ_infodir := @prefix@/info
57PROJ_mandir := @prefix@/man
58PROJ_VERSION := $(LLVMVersion)
59else
60ifndef PROJ_SRC_ROOT
61$(error Projects must define PROJ_SRC_ROOT)
62endif
63ifndef PROJ_OBJ_ROOT
64$(error Projects must define PROJ_OBJ_ROOT)
65endif
66ifndef PROJ_INSTALL_ROOT
67$(error Projects must define PROJ_INSTALL_ROOT)
68endif
69ifndef LLVM_SRC_ROOT
70$(error Projects must define LLVM_SRC_ROOT)
71endif
72ifndef LLVM_OBJ_ROOT
73$(error Projects must define LLVM_OBJ_ROOT)
74endif
75PROJ_SRC_DIR := $(subst //,/,$(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
76PROJ_prefix := $(PROJ_INSTALL_ROOT)
77PROJ_bindir := $(PROJ_INSTALL_ROOT)/bin
78PROJ_libdir := $(PROJ_INSTALL_ROOT)/lib
79PROJ_datadir := $(PROJ_INSTALL_ROOT)/share
80PROJ_docsdir := $(PROJ_INSTALL_ROOT)/docs/llvm
81PROJ_etcdir := $(PROJ_INSTALL_ROOT)/etc/llvm
82PROJ_includedir := $(PROJ_INSTALL_ROOT)/include
83PROJ_infodir := $(PROJ_INSTALL_ROOT)/info
84PROJ_mandir := $(PROJ_INSTALL_ROOT)/man
85ifndef PROJ_VERSION
86PROJ_VERSION := 1.0
87endif
88endif
Reid Spencere1200212004-11-29 04:53:50 +000089
Reid Spencerbbf7a8a2004-12-31 22:54:28 +000090# Determine if we're on a unix type operating system
91LLVM_ON_UNIX:=@LLVM_ON_UNIX@
92LLVM_ON_WIN32:=@LLVM_ON_WIN32@
93
John Criswell7a73b802003-06-30 21:59:07 +000094# Target operating system for which LLVM will be compiled.
John Criswell7a73b802003-06-30 21:59:07 +000095OS=@OS@
96
John Criswell76595452003-07-01 22:07:39 +000097# Target hardware architecture
John Criswell76595452003-07-01 22:07:39 +000098ARCH=@ARCH@
99
Reid Spencere2cfe5d2006-07-26 21:14:56 +0000100# Indicates, whether we're cross-compiling LLVM or not
101LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
102
103# Executable file extension for build platform (mainly for
104# tablegen call if we're cross-compiling).
105BUILD_EXEEXT=@BUILD_EXEEXT@
106
Reid Spencer18224032004-11-07 19:12:53 +0000107# Target triple (cpu-vendor-os) for which we should generate code
108TARGET_TRIPLE=@target@
109
Reid Spencer5a870442005-04-22 17:14:14 +0000110# Targets that we should build
111TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
112
Evan Chengcf9be262006-06-20 22:16:32 +0000113# Extra options to compile LLVM with
114EXTRA_OPTIONS=@EXTRA_OPTIONS@
115
John Criswell0021c312004-02-13 21:57:29 +0000116# Endian-ness of the target
117ENDIAN=@ENDIAN@
118
John Criswell7a73b802003-06-30 21:59:07 +0000119# Path to the C++ compiler to use. This is an optional setting, which defaults
120# to whatever your gmake defaults to.
John Criswell7a73b802003-06-30 21:59:07 +0000121CXX = @CXX@
122
Misha Brukmanb5a2e402004-06-17 15:39:58 +0000123# Path to the CC binary, which use used by testcases for native builds.
John Criswell7a73b802003-06-30 21:59:07 +0000124CC := @CC@
125
Brian Gaekef1dd2002004-01-16 21:31:34 +0000126# Linker flags.
John Criswellb812e762003-07-01 15:02:59 +0000127LDFLAGS+=@LDFLAGS@
John Criswell49bf8622003-06-30 22:33:53 +0000128
Brian Gaekef1dd2002004-01-16 21:31:34 +0000129# Path to the library archiver program.
John Criswell7a73b802003-06-30 21:59:07 +0000130AR_PATH = @AR@
131
Reid Spencer151f8ba2004-10-25 08:27:37 +0000132# The pathnames of the programs we require to build
Reid Spencere1200212004-11-29 04:53:50 +0000133BISON := @BISON@
Reid Spencer8a2d4712004-12-16 17:48:14 +0000134CMP := @CMP@
135CP := @CP@
Reid Spencere1200212004-11-29 04:53:50 +0000136DATE := @DATE@
137FIND := @FIND@
138FLEX := @LEX@
139GREP := @GREP@
140INSTALL := @INSTALL@
Reid Spencerb2cb4862005-01-16 02:20:42 +0000141MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
Reid Spencere1200212004-11-29 04:53:50 +0000142MV := @MV@
Reid Spencere1200212004-11-29 04:53:50 +0000143RANLIB := @RANLIB@
144RM := @RM@
145SED := @SED@
146TAR := @TAR@
147YACC := @YACC@
148
149# Paths to miscellaneous programs we hope are present but might not be
Reid Spencerb195d9d2006-03-23 23:21:29 +0000150PERL := @PERL@
Reid Spencere1200212004-11-29 04:53:50 +0000151BZIP2 := @BZIP2@
152DOT := @DOT@
153DOXYGEN := @DOXYGEN@
154ETAGS := @ETAGS@
155ETAGSFLAGS := @ETAGSFLAGS@
156GROFF := @GROFF@
157GZIP := @GZIP@
158POD2HTML := @POD2HTML@
159POD2MAN := @POD2MAN@
Reid Spencere1200212004-11-29 04:53:50 +0000160RUNTEST := @RUNTEST@
Reid Spencer0fcb9412004-11-30 08:11:54 +0000161TCLSH := @TCLSH@
Reid Spencere1200212004-11-29 04:53:50 +0000162ZIP := @ZIP@
John Criswell7a73b802003-06-30 21:59:07 +0000163
Reid Spencerb195d9d2006-03-23 23:21:29 +0000164HAVE_PERL := @HAVE_PERL@
165
Reid Spencer5a870442005-04-22 17:14:14 +0000166LIBS := @LIBS@
167
Reid Spencer79080352004-12-22 05:57:09 +0000168# Path to location for LLVM C/C++ front-end. You can modify this if you
169# want to override the value set by configure.
170LLVMGCCDIR := @LLVMGCCDIR@
171
John Criswell7a73b802003-06-30 21:59:07 +0000172# Determine the target for which LLVM should generate code.
John Criswell7a73b802003-06-30 21:59:07 +0000173LLVMGCCARCH := @target@/3.4-llvm
174
Brian Gaekef1dd2002004-01-16 21:31:34 +0000175# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
Reid Spencer79080352004-12-22 05:57:09 +0000176LLVMGCC := @LLVMGCC@
177LLVMGXX := @LLVMGXX@
178LLVMCC1 := @LLVMCC1@
179LLVMCC1PLUS := @LLVMCC1PLUS@
Reid Spencer7917d3a2006-04-06 22:00:36 +0000180LLVMGCC_VERSION := @LLVMGCC_VERSION@
181LLVMGCC_MAJVERS := @LLVMGCC_MAJVERS@
Brian Gaekef1dd2002004-01-16 21:31:34 +0000182
John Criswell7a73b802003-06-30 21:59:07 +0000183# Path to directory where object files should be stored during a build.
184# Set OBJ_ROOT to "." if you do not want to use a separate place for
185# object files.
John Criswell7f336952003-09-06 14:44:17 +0000186OBJ_ROOT := .
John Criswell7a73b802003-06-30 21:59:07 +0000187
John Criswell7a73b802003-06-30 21:59:07 +0000188# These are options that can either be enabled here, or can be enabled on the
Brian Gaekef1dd2002004-01-16 21:31:34 +0000189# make command line (ie, make ENABLE_PROFILING=1):
John Criswell7a73b802003-06-30 21:59:07 +0000190
Reid Spencerc4329cf2006-04-07 15:59:41 +0000191# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
192# into the "Release" directories. Otherwise, LLVM code is not optimized and
193# output is put in the "Debug" directories.
John Criswell7a73b802003-06-30 21:59:07 +0000194#ENABLE_OPTIMIZED = 1
195@ENABLE_OPTIMIZED@
196
Reid Spencer1a5a5512006-04-09 23:39:43 +0000197# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will
198# exclude assertion checks, otherwise they are included.
Reid Spencerc28ccd82006-04-09 20:42:14 +0000199#DISABLE_ASSERTIONS = 1
200@DISABLE_ASSERTIONS@
Reid Spencerc4329cf2006-04-07 15:59:41 +0000201
Reid Spencer6e96d812005-12-21 03:31:53 +0000202# When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
203# symbols.
204#DEBUG_RUNTIME = 1
205@DEBUG_RUNTIME@
206
John Criswell7a73b802003-06-30 21:59:07 +0000207# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
208# information to allow gprof to be used to get execution frequencies.
John Criswell7a73b802003-06-30 21:59:07 +0000209#ENABLE_PROFILING = 1
John Criswell7a73b802003-06-30 21:59:07 +0000210
Reid Spencere1200212004-11-29 04:53:50 +0000211# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
212ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
213
Reid Spencerb756c792006-06-01 01:09:43 +0000214# Do we want to enable threads?
215ENABLE_THREADS := @ENABLE_THREADS@
216
Misha Brukmane9676502003-07-02 21:20:04 +0000217# This option tells the Makefiles to produce verbose output.
John Criswell7a73b802003-06-30 21:59:07 +0000218# It essentially prints the commands that make is executing
John Criswell7a73b802003-06-30 21:59:07 +0000219#VERBOSE = 1
John Criswell7a73b802003-06-30 21:59:07 +0000220
John Criswell7a73b802003-06-30 21:59:07 +0000221# Enable JIT for this platform
Reid Spencerb195d9d2006-03-23 23:21:29 +0000222TARGET_HAS_JIT = @TARGET_HAS_JIT@
John Criswell7a73b802003-06-30 21:59:07 +0000223
Reid Spencere2cfe5d2006-07-26 21:14:56 +0000224# Shared library extension for host platform.
Brian Gaeke88aeace2004-01-21 19:39:07 +0000225SHLIBEXT = @SHLIBEXT@
226
Reid Spencere2cfe5d2006-07-26 21:14:56 +0000227# Executable file extension for host platform.
John Criswelle6d468f2004-06-01 19:04:38 +0000228EXEEXT = @EXEEXT@
229
Reid Spencerb2cb4862005-01-16 02:20:42 +0000230# Things we just assume are "there"
231ECHO := echo