blob: d1efb2b437ddf192426937e2d3d893ef5cdc97c2 [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 Spencer18224032004-11-07 19:12:53 +0000100# Target triple (cpu-vendor-os) for which we should generate code
101TARGET_TRIPLE=@target@
102
Reid Spencer5a870442005-04-22 17:14:14 +0000103# Targets that we should build
104TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
105
Evan Chengcf9be262006-06-20 22:16:32 +0000106# Extra options to compile LLVM with
107EXTRA_OPTIONS=@EXTRA_OPTIONS@
108
John Criswell0021c312004-02-13 21:57:29 +0000109# Endian-ness of the target
110ENDIAN=@ENDIAN@
111
John Criswell7a73b802003-06-30 21:59:07 +0000112# Path to the C++ compiler to use. This is an optional setting, which defaults
113# to whatever your gmake defaults to.
John Criswell7a73b802003-06-30 21:59:07 +0000114CXX = @CXX@
115
Misha Brukmanb5a2e402004-06-17 15:39:58 +0000116# Path to the CC binary, which use used by testcases for native builds.
John Criswell7a73b802003-06-30 21:59:07 +0000117CC := @CC@
118
Brian Gaekef1dd2002004-01-16 21:31:34 +0000119# Linker flags.
John Criswellb812e762003-07-01 15:02:59 +0000120LDFLAGS+=@LDFLAGS@
John Criswell49bf8622003-06-30 22:33:53 +0000121
Brian Gaekef1dd2002004-01-16 21:31:34 +0000122# Path to the library archiver program.
John Criswell7a73b802003-06-30 21:59:07 +0000123AR_PATH = @AR@
124
Reid Spencer151f8ba2004-10-25 08:27:37 +0000125# The pathnames of the programs we require to build
Reid Spencere1200212004-11-29 04:53:50 +0000126BISON := @BISON@
Reid Spencer8a2d4712004-12-16 17:48:14 +0000127CMP := @CMP@
128CP := @CP@
Reid Spencere1200212004-11-29 04:53:50 +0000129DATE := @DATE@
130FIND := @FIND@
131FLEX := @LEX@
132GREP := @GREP@
133INSTALL := @INSTALL@
Reid Spencerb2cb4862005-01-16 02:20:42 +0000134MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
Reid Spencere1200212004-11-29 04:53:50 +0000135MV := @MV@
Reid Spencere1200212004-11-29 04:53:50 +0000136RANLIB := @RANLIB@
137RM := @RM@
138SED := @SED@
139TAR := @TAR@
140YACC := @YACC@
141
142# Paths to miscellaneous programs we hope are present but might not be
Reid Spencerb195d9d2006-03-23 23:21:29 +0000143PERL := @PERL@
Reid Spencere1200212004-11-29 04:53:50 +0000144BZIP2 := @BZIP2@
145DOT := @DOT@
146DOXYGEN := @DOXYGEN@
147ETAGS := @ETAGS@
148ETAGSFLAGS := @ETAGSFLAGS@
149GROFF := @GROFF@
150GZIP := @GZIP@
151POD2HTML := @POD2HTML@
152POD2MAN := @POD2MAN@
Reid Spencere1200212004-11-29 04:53:50 +0000153RUNTEST := @RUNTEST@
Reid Spencer0fcb9412004-11-30 08:11:54 +0000154TCLSH := @TCLSH@
Reid Spencere1200212004-11-29 04:53:50 +0000155ZIP := @ZIP@
John Criswell7a73b802003-06-30 21:59:07 +0000156
Reid Spencerb195d9d2006-03-23 23:21:29 +0000157HAVE_PERL := @HAVE_PERL@
158
Reid Spencer5a870442005-04-22 17:14:14 +0000159LIBS := @LIBS@
160
Reid Spencer79080352004-12-22 05:57:09 +0000161# Path to location for LLVM C/C++ front-end. You can modify this if you
162# want to override the value set by configure.
163LLVMGCCDIR := @LLVMGCCDIR@
164
John Criswell7a73b802003-06-30 21:59:07 +0000165# Determine the target for which LLVM should generate code.
John Criswell7a73b802003-06-30 21:59:07 +0000166LLVMGCCARCH := @target@/3.4-llvm
167
Brian Gaekef1dd2002004-01-16 21:31:34 +0000168# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
Reid Spencer79080352004-12-22 05:57:09 +0000169LLVMGCC := @LLVMGCC@
170LLVMGXX := @LLVMGXX@
171LLVMCC1 := @LLVMCC1@
172LLVMCC1PLUS := @LLVMCC1PLUS@
Reid Spencer7917d3a2006-04-06 22:00:36 +0000173LLVMGCC_VERSION := @LLVMGCC_VERSION@
174LLVMGCC_MAJVERS := @LLVMGCC_MAJVERS@
Brian Gaekef1dd2002004-01-16 21:31:34 +0000175
John Criswell7a73b802003-06-30 21:59:07 +0000176# Path to directory where object files should be stored during a build.
177# Set OBJ_ROOT to "." if you do not want to use a separate place for
178# object files.
John Criswell7f336952003-09-06 14:44:17 +0000179OBJ_ROOT := .
John Criswell7a73b802003-06-30 21:59:07 +0000180
John Criswell7a73b802003-06-30 21:59:07 +0000181# These are options that can either be enabled here, or can be enabled on the
Brian Gaekef1dd2002004-01-16 21:31:34 +0000182# make command line (ie, make ENABLE_PROFILING=1):
John Criswell7a73b802003-06-30 21:59:07 +0000183
Reid Spencerc4329cf2006-04-07 15:59:41 +0000184# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
185# into the "Release" directories. Otherwise, LLVM code is not optimized and
186# output is put in the "Debug" directories.
John Criswell7a73b802003-06-30 21:59:07 +0000187#ENABLE_OPTIMIZED = 1
188@ENABLE_OPTIMIZED@
189
Reid Spencer1a5a5512006-04-09 23:39:43 +0000190# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will
191# exclude assertion checks, otherwise they are included.
Reid Spencerc28ccd82006-04-09 20:42:14 +0000192#DISABLE_ASSERTIONS = 1
193@DISABLE_ASSERTIONS@
Reid Spencerc4329cf2006-04-07 15:59:41 +0000194
Reid Spencer6e96d812005-12-21 03:31:53 +0000195# When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
196# symbols.
197#DEBUG_RUNTIME = 1
198@DEBUG_RUNTIME@
199
John Criswell7a73b802003-06-30 21:59:07 +0000200# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
201# information to allow gprof to be used to get execution frequencies.
John Criswell7a73b802003-06-30 21:59:07 +0000202#ENABLE_PROFILING = 1
John Criswell7a73b802003-06-30 21:59:07 +0000203
Reid Spencere1200212004-11-29 04:53:50 +0000204# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
205ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
206
Reid Spencerb756c792006-06-01 01:09:43 +0000207# Do we want to enable threads?
208ENABLE_THREADS := @ENABLE_THREADS@
209
Misha Brukmane9676502003-07-02 21:20:04 +0000210# This option tells the Makefiles to produce verbose output.
John Criswell7a73b802003-06-30 21:59:07 +0000211# It essentially prints the commands that make is executing
John Criswell7a73b802003-06-30 21:59:07 +0000212#VERBOSE = 1
John Criswell7a73b802003-06-30 21:59:07 +0000213
John Criswell7a73b802003-06-30 21:59:07 +0000214# Enable JIT for this platform
Reid Spencerb195d9d2006-03-23 23:21:29 +0000215TARGET_HAS_JIT = @TARGET_HAS_JIT@
John Criswell7a73b802003-06-30 21:59:07 +0000216
Brian Gaeke88aeace2004-01-21 19:39:07 +0000217# Shared library extension for this platform.
218SHLIBEXT = @SHLIBEXT@
219
John Criswelle6d468f2004-06-01 19:04:38 +0000220# Executable file extension for this platform.
221EXEEXT = @EXEEXT@
222
Reid Spencerb2cb4862005-01-16 02:20:42 +0000223# Things we just assume are "there"
224ECHO := echo