Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 1 | #===-- 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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 9 | # |
| 10 | # This file is included by Makefile.common. It defines paths and other |
| 11 | # values specific to a particular installation of LLVM. |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 12 | # |
Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 13 | #===------------------------------------------------------------------------===# |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 14 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 15 | # Target operating system for which LLVM will be compiled. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 16 | OS=@OS@ |
| 17 | |
John Criswell | 7659545 | 2003-07-01 22:07:39 +0000 | [diff] [blame] | 18 | # Target hardware architecture |
John Criswell | 7659545 | 2003-07-01 22:07:39 +0000 | [diff] [blame] | 19 | ARCH=@ARCH@ |
| 20 | |
John Criswell | 0021c31 | 2004-02-13 21:57:29 +0000 | [diff] [blame] | 21 | # Endian-ness of the target |
| 22 | ENDIAN=@ENDIAN@ |
| 23 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 24 | # 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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 30 | CXX = @CXX@ |
| 31 | |
| 32 | # We have the same problem with the CC binary, which use used by testcases for |
| 33 | # native builds. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 34 | CC := @CC@ |
| 35 | |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 36 | # Linker flags. |
John Criswell | b812e76 | 2003-07-01 15:02:59 +0000 | [diff] [blame] | 37 | LDFLAGS+=@LDFLAGS@ |
John Criswell | 49bf862 | 2003-06-30 22:33:53 +0000 | [diff] [blame] | 38 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 39 | # Libraries needed by tools |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 40 | TOOLLINKOPTS=@LIBS@ |
| 41 | |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 42 | # Path to the library archiver program. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 43 | AR_PATH = @AR@ |
| 44 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 45 | # The pathnames of the Flex and Bison programs, respectively. |
John Criswell | b8b80c4 | 2004-01-12 16:14:54 +0000 | [diff] [blame] | 46 | YACC = @YACC@ |
| 47 | BISON = @BISON@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 48 | FLEX = @LEX@ |
| 49 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 50 | # Paths to miscellaneous programs. |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 51 | RPWD = pwd |
| 52 | SED = sed |
| 53 | RM = rm |
| 54 | ECHO = echo |
John Criswell | 0057e32 | 2003-07-22 19:17:35 +0000 | [diff] [blame] | 55 | MKDIR = @abs_top_srcdir@/autoconf/mkinstalldirs |
Brian Gaeke | 26be9c5 | 2004-01-13 06:43:16 +0000 | [diff] [blame] | 56 | DATE = date |
| 57 | MV = mv |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 58 | INSTALL = @INSTALL@ |
| 59 | DOT = @DOT@ |
| 60 | ETAGS = @ETAGS@ |
Brian Gaeke | e0cec5d | 2004-01-22 21:55:01 +0000 | [diff] [blame] | 61 | ETAGSFLAGS = @ETAGSFLAGS@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 62 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 63 | # Determine the target for which LLVM should generate code. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 64 | LLVMGCCARCH := @target@/3.4-llvm |
| 65 | |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 66 | # Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries: |
| 67 | LCC1 = @LLVMCC1@ |
| 68 | LCC1XX = @LLVMCC1PLUS@ |
| 69 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 70 | # 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 Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 73 | OBJ_ROOT := . |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 74 | |
Brian Gaeke | b798b1e | 2004-03-10 17:37:50 +0000 | [diff] [blame] | 75 | # 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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 77 | LLVMGCCDIR := @LLVMGCCDIR@ |
| 78 | |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 79 | # When this variable is set to 1, programs in the llvm/test/Programs hierarchy |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 80 | # 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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 84 | #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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 91 | BYTECODE_REPOSITORY := @BCR@ |
| 92 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 93 | # SPEC benchmarks: |
Alkis Evlogimenos | 1e3aba1 | 2004-02-25 23:41:32 +0000 | [diff] [blame] | 94 | # If these are set then run the SPEC benchmarks. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 95 | # You must provide the SPEC benchmarks on your own. |
Alkis Evlogimenos | 1e3aba1 | 2004-02-25 23:41:32 +0000 | [diff] [blame] | 96 | @USE_SPEC2000@ |
John Criswell | b607cc8 | 2004-02-10 22:29:06 +0000 | [diff] [blame] | 97 | @USE_SPEC95@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 98 | |
Alkis Evlogimenos | 1e3aba1 | 2004-02-25 23:41:32 +0000 | [diff] [blame] | 99 | # Path to the SPEC benchmarks. |
Alkis Evlogimenos | f3dd0db | 2004-02-25 23:47:17 +0000 | [diff] [blame] | 100 | SPEC2000_ROOT := @SPEC2000_ROOT@ |
John Criswell | b607cc8 | 2004-02-10 22:29:06 +0000 | [diff] [blame] | 101 | SPEC95_ROOT := @SPEC95_ROOT@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 102 | |
John Criswell | b9a131e | 2004-02-20 22:30:46 +0000 | [diff] [blame] | 103 | # Path to the Povray source code. |
| 104 | @USE_POVRAY@ |
| 105 | POVRAY_ROOT := @POVRAY_ROOT@ |
| 106 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 107 | # Path to the PAPI code. This is used by the reoptimizer only. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 108 | #PAPIDIR := /home/vadve/shared/papi-2.3.4.1 |
| 109 | PAPIDIR := @PAPIDIR@ |
| 110 | |
| 111 | # These are options that can either be enabled here, or can be enabled on the |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 112 | # make command line (ie, make ENABLE_PROFILING=1): |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 113 | |
| 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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 116 | #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 Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 121 | #ENABLE_PROFILING = 1 |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 122 | |
Misha Brukman | e967650 | 2003-07-02 21:20:04 +0000 | [diff] [blame] | 123 | # This option tells the Makefiles to produce verbose output. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 124 | # It essentially prints the commands that make is executing |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 125 | #VERBOSE = 1 |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 126 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 127 | # Enable JIT for this platform |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 128 | @JIT@ |
| 129 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 130 | # Disable LLC diffs for testing. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 131 | @DISABLE_LLC_DIFFS@ |
| 132 | |
Brian Gaeke | 88aeace | 2004-01-21 19:39:07 +0000 | [diff] [blame] | 133 | # Shared library extension for this platform. |
| 134 | SHLIBEXT = @SHLIBEXT@ |
| 135 | |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 136 | ########################################################################### |
| 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 Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 152 | # Set the object build directory. By default, it is the current directory. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 153 | ifndef BUILD_OBJ_DIR |
| 154 | BUILD_OBJ_DIR := $(subst //,/,$(shell $(RPWD))) |
| 155 | endif |
| 156 | |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 157 | # Set the root of the object directory. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 158 | ifndef BUILD_OBJ_ROOT |
| 159 | BUILD_OBJ_ROOT := $(subst //,/,$(shell cd $(BUILD_OBJ_DIR)/$(LEVEL); $(RPWD))) |
| 160 | endif |
| 161 | |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 162 | # Set the source build directory. That is almost always the current directory. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 163 | ifndef BUILD_SRC_DIR |
| 164 | BUILD_SRC_DIR := $(subst //,/,@abs_top_srcdir@/$(patsubst $(BUILD_OBJ_ROOT)%,%,$(BUILD_OBJ_DIR))) |
| 165 | endif |
| 166 | |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 167 | # Set the source root directory. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 168 | ifndef BUILD_SRC_ROOT |
| 169 | BUILD_SRC_ROOT := $(subst //,/,@abs_top_srcdir@) |
| 170 | endif |
| 171 | |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 172 | # Set the LLVM object directory. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 173 | ifndef LLVM_OBJ_ROOT |
| 174 | ifdef LLVM_SRC_ROOT |
| 175 | LLVM_OBJ_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(RPWD)) |
| 176 | else |
| 177 | LLVM_OBJ_ROOT := $(BUILD_OBJ_ROOT) |
| 178 | endif |
| 179 | endif |
| 180 | |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 181 | # Set the LLVM source directory. |
| 182 | # It is typically the root directory of what we're compiling now. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 183 | ifndef LLVM_SRC_ROOT |
| 184 | LLVM_SRC_ROOT := $(BUILD_SRC_ROOT) |
| 185 | endif |
| 186 | |
John Criswell | 613758d | 2003-09-11 18:03:50 +0000 | [diff] [blame] | 187 | # Set SourceDir for backwards compatbility. |
John Criswell | 613758d | 2003-09-11 18:03:50 +0000 | [diff] [blame] | 188 | ifndef SourceDir |
| 189 | SourceDir=$(BUILD_SRC_DIR) |
| 190 | endif |
| 191 | |
Brian Gaeke | 5339ada | 2003-12-10 00:25:32 +0000 | [diff] [blame] | 192 | # Installation directories, as provided by the configure script. |
Brian Gaeke | 5339ada | 2003-12-10 00:25:32 +0000 | [diff] [blame] | 193 | exec_prefix = @exec_prefix@ |
| 194 | prefix = @prefix@ |
| 195 | program_transform_name = @program_transform_name@ |
| 196 | bindir = @bindir@ |
| 197 | sbindir = @sbindir@ |
| 198 | libexecdir = @libexecdir@ |
| 199 | datadir = @datadir@ |
| 200 | sysconfdir = @sysconfdir@ |
| 201 | sharedstatedir = @sharedstatedir@ |
| 202 | localstatedir = @localstatedir@ |
| 203 | libdir = @libdir@ |
Brian Gaeke | 8abff79 | 2004-01-22 22:53:48 +0000 | [diff] [blame] | 204 | bytecode_libdir = $(LLVMGCCDIR)/bytecode-libs |
Brian Gaeke | 5339ada | 2003-12-10 00:25:32 +0000 | [diff] [blame] | 205 | includedir = @includedir@ |
| 206 | infodir = @infodir@ |
| 207 | mandir = @mandir@ |
| 208 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 209 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
| 210 | INSTALL_DATA = @INSTALL_DATA@ |
| 211 | |