blob: 2c865605e13c4b56f6d0f6856848917f50fc8181 [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
John Criswell0021c312004-02-13 21:57:29 +0000106# Endian-ness of the target
107ENDIAN=@ENDIAN@
108
John Criswell7a73b802003-06-30 21:59:07 +0000109# Path to the C++ compiler to use. This is an optional setting, which defaults
110# to whatever your gmake defaults to.
John Criswell7a73b802003-06-30 21:59:07 +0000111CXX = @CXX@
112
Misha Brukmanb5a2e402004-06-17 15:39:58 +0000113# Path to the CC binary, which use used by testcases for native builds.
John Criswell7a73b802003-06-30 21:59:07 +0000114CC := @CC@
115
Brian Gaekef1dd2002004-01-16 21:31:34 +0000116# Linker flags.
John Criswellb812e762003-07-01 15:02:59 +0000117LDFLAGS+=@LDFLAGS@
John Criswell49bf8622003-06-30 22:33:53 +0000118
Brian Gaekef1dd2002004-01-16 21:31:34 +0000119# Path to the library archiver program.
John Criswell7a73b802003-06-30 21:59:07 +0000120AR_PATH = @AR@
121
Reid Spencer151f8ba2004-10-25 08:27:37 +0000122# The pathnames of the programs we require to build
Reid Spencere1200212004-11-29 04:53:50 +0000123BISON := @BISON@
Reid Spencer8a2d4712004-12-16 17:48:14 +0000124CMP := @CMP@
125CP := @CP@
Reid Spencere1200212004-11-29 04:53:50 +0000126DATE := @DATE@
127FIND := @FIND@
128FLEX := @LEX@
129GREP := @GREP@
130INSTALL := @INSTALL@
Reid Spencerb2cb4862005-01-16 02:20:42 +0000131MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
Reid Spencere1200212004-11-29 04:53:50 +0000132MV := @MV@
Reid Spencere1200212004-11-29 04:53:50 +0000133RANLIB := @RANLIB@
134RM := @RM@
135SED := @SED@
136TAR := @TAR@
137YACC := @YACC@
138
139# Paths to miscellaneous programs we hope are present but might not be
140BZIP2 := @BZIP2@
141DOT := @DOT@
142DOXYGEN := @DOXYGEN@
143ETAGS := @ETAGS@
144ETAGSFLAGS := @ETAGSFLAGS@
145GROFF := @GROFF@
146GZIP := @GZIP@
147POD2HTML := @POD2HTML@
148POD2MAN := @POD2MAN@
Reid Spencere1200212004-11-29 04:53:50 +0000149RUNTEST := @RUNTEST@
Reid Spencer0fcb9412004-11-30 08:11:54 +0000150TCLSH := @TCLSH@
Reid Spencere1200212004-11-29 04:53:50 +0000151ZIP := @ZIP@
John Criswell7a73b802003-06-30 21:59:07 +0000152
Reid Spencer5a870442005-04-22 17:14:14 +0000153LIBS := @LIBS@
154
Reid Spencer79080352004-12-22 05:57:09 +0000155# Path to location for LLVM C/C++ front-end. You can modify this if you
156# want to override the value set by configure.
157LLVMGCCDIR := @LLVMGCCDIR@
158
John Criswell7a73b802003-06-30 21:59:07 +0000159# Determine the target for which LLVM should generate code.
John Criswell7a73b802003-06-30 21:59:07 +0000160LLVMGCCARCH := @target@/3.4-llvm
161
Brian Gaekef1dd2002004-01-16 21:31:34 +0000162# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
Reid Spencer79080352004-12-22 05:57:09 +0000163LLVMGCC := @LLVMGCC@
164LLVMGXX := @LLVMGXX@
165LLVMCC1 := @LLVMCC1@
166LLVMCC1PLUS := @LLVMCC1PLUS@
Brian Gaekef1dd2002004-01-16 21:31:34 +0000167
John Criswell7a73b802003-06-30 21:59:07 +0000168# Path to directory where object files should be stored during a build.
169# Set OBJ_ROOT to "." if you do not want to use a separate place for
170# object files.
John Criswell7f336952003-09-06 14:44:17 +0000171OBJ_ROOT := .
John Criswell7a73b802003-06-30 21:59:07 +0000172
John Criswell7a73b802003-06-30 21:59:07 +0000173# These are options that can either be enabled here, or can be enabled on the
Brian Gaekef1dd2002004-01-16 21:31:34 +0000174# make command line (ie, make ENABLE_PROFILING=1):
John Criswell7a73b802003-06-30 21:59:07 +0000175
176# When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are
177# turned on, and Debug builds are turned off.
John Criswell7a73b802003-06-30 21:59:07 +0000178#ENABLE_OPTIMIZED = 1
179@ENABLE_OPTIMIZED@
180
Reid Spencer6e96d812005-12-21 03:31:53 +0000181# When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
182# symbols.
183#DEBUG_RUNTIME = 1
184@DEBUG_RUNTIME@
185
John Criswell7a73b802003-06-30 21:59:07 +0000186# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
187# information to allow gprof to be used to get execution frequencies.
John Criswell7a73b802003-06-30 21:59:07 +0000188#ENABLE_PROFILING = 1
John Criswell7a73b802003-06-30 21:59:07 +0000189
Reid Spencere1200212004-11-29 04:53:50 +0000190# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
191ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
192
Misha Brukmane9676502003-07-02 21:20:04 +0000193# This option tells the Makefiles to produce verbose output.
John Criswell7a73b802003-06-30 21:59:07 +0000194# It essentially prints the commands that make is executing
John Criswell7a73b802003-06-30 21:59:07 +0000195#VERBOSE = 1
John Criswell7a73b802003-06-30 21:59:07 +0000196
John Criswell7a73b802003-06-30 21:59:07 +0000197# Enable JIT for this platform
John Criswell7a73b802003-06-30 21:59:07 +0000198@JIT@
199
Brian Gaeke88aeace2004-01-21 19:39:07 +0000200# Shared library extension for this platform.
201SHLIBEXT = @SHLIBEXT@
202
John Criswelle6d468f2004-06-01 19:04:38 +0000203# Executable file extension for this platform.
204EXEEXT = @EXEEXT@
205
Reid Spencerb2cb4862005-01-16 02:20:42 +0000206# Things we just assume are "there"
207ECHO := echo