blob: 889fb2a4e1e52fd37203359c1fbd3dfcfd05c6c6 [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
John Criswell7a73b802003-06-30 21:59:07 +000015# Target operating system for which LLVM will be compiled.
John Criswell7a73b802003-06-30 21:59:07 +000016OS=@OS@
17
John Criswell76595452003-07-01 22:07:39 +000018# Target hardware architecture
John Criswell76595452003-07-01 22:07:39 +000019ARCH=@ARCH@
20
John Criswell0021c312004-02-13 21:57:29 +000021# Endian-ness of the target
22ENDIAN=@ENDIAN@
23
John Criswell7a73b802003-06-30 21:59:07 +000024# Path to the C++ compiler to use. This is an optional setting, which defaults
25# to whatever your gmake defaults to.
26#
27# Under Linux, for some reason the compiler driver wants to search the PATH to
28# find the system assembler, which breaks if the LLVM assembler is in our path.
29# Hack it to use the assembler in /usr/bin directly.
John Criswell7a73b802003-06-30 21:59:07 +000030CXX = @CXX@
31
32# We have the same problem with the CC binary, which use used by testcases for
33# native builds.
John Criswell7a73b802003-06-30 21:59:07 +000034CC := @CC@
35
Brian Gaekef1dd2002004-01-16 21:31:34 +000036# Linker flags.
John Criswellb812e762003-07-01 15:02:59 +000037LDFLAGS+=@LDFLAGS@
John Criswell49bf8622003-06-30 22:33:53 +000038
John Criswell7a73b802003-06-30 21:59:07 +000039# Libraries needed by tools
John Criswell7a73b802003-06-30 21:59:07 +000040TOOLLINKOPTS=@LIBS@
41
Brian Gaekef1dd2002004-01-16 21:31:34 +000042# Path to the library archiver program.
John Criswell7a73b802003-06-30 21:59:07 +000043AR_PATH = @AR@
44
John Criswell7a73b802003-06-30 21:59:07 +000045# The pathnames of the Flex and Bison programs, respectively.
John Criswellb8b80c42004-01-12 16:14:54 +000046YACC = @YACC@
47BISON = @BISON@
John Criswell7a73b802003-06-30 21:59:07 +000048FLEX = @LEX@
49
John Criswell7a73b802003-06-30 21:59:07 +000050# Paths to miscellaneous programs.
Brian Gaeke26be9c52004-01-13 06:43:16 +000051RPWD = pwd
52SED = sed
53RM = rm
54ECHO = echo
John Criswell0057e322003-07-22 19:17:35 +000055MKDIR = @abs_top_srcdir@/autoconf/mkinstalldirs
Brian Gaeke26be9c52004-01-13 06:43:16 +000056DATE = date
57MV = mv
John Criswell7a73b802003-06-30 21:59:07 +000058INSTALL = @INSTALL@
59DOT = @DOT@
60ETAGS = @ETAGS@
Brian Gaekee0cec5d2004-01-22 21:55:01 +000061ETAGSFLAGS = @ETAGSFLAGS@
John Criswell7a73b802003-06-30 21:59:07 +000062
John Criswell7a73b802003-06-30 21:59:07 +000063# Determine the target for which LLVM should generate code.
John Criswell7a73b802003-06-30 21:59:07 +000064LLVMGCCARCH := @target@/3.4-llvm
65
Brian Gaekef1dd2002004-01-16 21:31:34 +000066# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
67LCC1 = @LLVMCC1@
68LCC1XX = @LLVMCC1PLUS@
69
John Criswell7a73b802003-06-30 21:59:07 +000070# Path to directory where object files should be stored during a build.
71# Set OBJ_ROOT to "." if you do not want to use a separate place for
72# object files.
John Criswell7f336952003-09-06 14:44:17 +000073OBJ_ROOT := .
John Criswell7a73b802003-06-30 21:59:07 +000074
Brian Gaekeb798b1e2004-03-10 17:37:50 +000075# Path to location for LLVM C/C++ front-end. You can modify this if you
76# want to override the value set by configure.
John Criswell7a73b802003-06-30 21:59:07 +000077LLVMGCCDIR := @LLVMGCCDIR@
78
Brian Gaekef1dd2002004-01-16 21:31:34 +000079# When this variable is set to 1, programs in the llvm/test/Programs hierarchy
John Criswell7a73b802003-06-30 21:59:07 +000080# are not recompiled from source code. Instead, the bytecode for the file is
81# pulled from the BYTECODE_REPOSITORY directory. This can be useful when disk
82# space is limited or when you just don't want to spend time running the C
83# frontend.
John Criswell7a73b802003-06-30 21:59:07 +000084#USE_PRECOMPILED_BYTECODE := 1
85@UPB@
86
87# This path specifies the cannonical location of bytecode files for compiled
88# versions of the test/Programs/* programs. This is used as the bytecode source
89# when USE_PRECOMPILED_BYTECODE is specified or when source code is not
90# available for the program (such as SPEC).
John Criswell7a73b802003-06-30 21:59:07 +000091BYTECODE_REPOSITORY := @BCR@
92
John Criswell7a73b802003-06-30 21:59:07 +000093# SPEC benchmarks:
Alkis Evlogimenos1e3aba12004-02-25 23:41:32 +000094# If these are set then run the SPEC benchmarks.
John Criswell7a73b802003-06-30 21:59:07 +000095# You must provide the SPEC benchmarks on your own.
Alkis Evlogimenos1e3aba12004-02-25 23:41:32 +000096@USE_SPEC2000@
John Criswellb607cc82004-02-10 22:29:06 +000097@USE_SPEC95@
John Criswell7a73b802003-06-30 21:59:07 +000098
Alkis Evlogimenos1e3aba12004-02-25 23:41:32 +000099# Path to the SPEC benchmarks.
Alkis Evlogimenosf3dd0db2004-02-25 23:47:17 +0000100SPEC2000_ROOT := @SPEC2000_ROOT@
John Criswellb607cc82004-02-10 22:29:06 +0000101SPEC95_ROOT := @SPEC95_ROOT@
John Criswell7a73b802003-06-30 21:59:07 +0000102
John Criswellb9a131e2004-02-20 22:30:46 +0000103# Path to the Povray source code.
104@USE_POVRAY@
105POVRAY_ROOT := @POVRAY_ROOT@
106
John Criswell7a73b802003-06-30 21:59:07 +0000107# Path to the PAPI code. This is used by the reoptimizer only.
John Criswell7a73b802003-06-30 21:59:07 +0000108#PAPIDIR := /home/vadve/shared/papi-2.3.4.1
109PAPIDIR := @PAPIDIR@
110
111# These are options that can either be enabled here, or can be enabled on the
Brian Gaekef1dd2002004-01-16 21:31:34 +0000112# make command line (ie, make ENABLE_PROFILING=1):
John Criswell7a73b802003-06-30 21:59:07 +0000113
114# When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are
115# turned on, and Debug builds are turned off.
John Criswell7a73b802003-06-30 21:59:07 +0000116#ENABLE_OPTIMIZED = 1
117@ENABLE_OPTIMIZED@
118
119# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
120# information to allow gprof to be used to get execution frequencies.
John Criswell7a73b802003-06-30 21:59:07 +0000121#ENABLE_PROFILING = 1
John Criswell7a73b802003-06-30 21:59:07 +0000122
Misha Brukmane9676502003-07-02 21:20:04 +0000123# This option tells the Makefiles to produce verbose output.
John Criswell7a73b802003-06-30 21:59:07 +0000124# It essentially prints the commands that make is executing
John Criswell7a73b802003-06-30 21:59:07 +0000125#VERBOSE = 1
John Criswell7a73b802003-06-30 21:59:07 +0000126
John Criswell7a73b802003-06-30 21:59:07 +0000127# Enable JIT for this platform
John Criswell7a73b802003-06-30 21:59:07 +0000128@JIT@
129
John Criswell7a73b802003-06-30 21:59:07 +0000130# Disable LLC diffs for testing.
John Criswell7a73b802003-06-30 21:59:07 +0000131@DISABLE_LLC_DIFFS@
132
Brian Gaeke88aeace2004-01-21 19:39:07 +0000133# Shared library extension for this platform.
134SHLIBEXT = @SHLIBEXT@
135
John Criswell7f336952003-09-06 14:44:17 +0000136###########################################################################
137# Directory Configuration
138# This section of the Makefile determines what is where. To be
139# specific, there are several locations that need to be defined:
140#
141# o LLVM_SRC_ROOT : The root directory of the LLVM source code.
142# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code.
143#
144# o BUILD_SRC_DIR : The directory containing the code to build.
145# o BUILD_SRC_ROOT : The root directory of the code to build.
146#
147# o BUILD_OBJ_DIR : The directory in which compiled code will be placed.
148# o BUILD_OBJ_ROOT : The root directory in which compiled code is placed.
149#
150###########################################################################
151
John Criswell7f336952003-09-06 14:44:17 +0000152# Set the object build directory. By default, it is the current directory.
John Criswell7f336952003-09-06 14:44:17 +0000153ifndef BUILD_OBJ_DIR
154BUILD_OBJ_DIR := $(subst //,/,$(shell $(RPWD)))
155endif
156
John Criswell7f336952003-09-06 14:44:17 +0000157# Set the root of the object directory.
John Criswell7f336952003-09-06 14:44:17 +0000158ifndef BUILD_OBJ_ROOT
159BUILD_OBJ_ROOT := $(subst //,/,$(shell cd $(BUILD_OBJ_DIR)/$(LEVEL); $(RPWD)))
160endif
161
John Criswell7f336952003-09-06 14:44:17 +0000162# Set the source build directory. That is almost always the current directory.
John Criswell7f336952003-09-06 14:44:17 +0000163ifndef BUILD_SRC_DIR
164BUILD_SRC_DIR := $(subst //,/,@abs_top_srcdir@/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR)))
165endif
166
John Criswell7f336952003-09-06 14:44:17 +0000167# Set the source root directory.
John Criswell7f336952003-09-06 14:44:17 +0000168ifndef BUILD_SRC_ROOT
169BUILD_SRC_ROOT := $(subst //,/,@abs_top_srcdir@)
170endif
171
John Criswell7f336952003-09-06 14:44:17 +0000172# Set the LLVM object directory.
John Criswell7f336952003-09-06 14:44:17 +0000173ifndef LLVM_OBJ_ROOT
174ifdef LLVM_SRC_ROOT
175LLVM_OBJ_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(RPWD))
176else
177LLVM_OBJ_ROOT := $(BUILD_OBJ_ROOT)
178endif
179endif
180
John Criswell7f336952003-09-06 14:44:17 +0000181# Set the LLVM source directory.
182# It is typically the root directory of what we're compiling now.
John Criswell7f336952003-09-06 14:44:17 +0000183ifndef LLVM_SRC_ROOT
184LLVM_SRC_ROOT := $(BUILD_SRC_ROOT)
185endif
186
John Criswell613758d2003-09-11 18:03:50 +0000187# Set SourceDir for backwards compatbility.
John Criswell613758d2003-09-11 18:03:50 +0000188ifndef SourceDir
189SourceDir=$(BUILD_SRC_DIR)
190endif
191
Brian Gaeke5339ada2003-12-10 00:25:32 +0000192# Installation directories, as provided by the configure script.
Brian Gaeke5339ada2003-12-10 00:25:32 +0000193exec_prefix = @exec_prefix@
194prefix = @prefix@
195program_transform_name = @program_transform_name@
196bindir = @bindir@
197sbindir = @sbindir@
198libexecdir = @libexecdir@
199datadir = @datadir@
200sysconfdir = @sysconfdir@
201sharedstatedir = @sharedstatedir@
202localstatedir = @localstatedir@
203libdir = @libdir@
Brian Gaeke8abff792004-01-22 22:53:48 +0000204bytecode_libdir = $(LLVMGCCDIR)/bytecode-libs
Brian Gaeke5339ada2003-12-10 00:25:32 +0000205includedir = @includedir@
206infodir = @infodir@
207mandir = @mandir@
208INSTALL_PROGRAM = @INSTALL_PROGRAM@
209INSTALL_SCRIPT = @INSTALL_SCRIPT@
210INSTALL_DATA = @INSTALL_DATA@
211