blob: e1f52036f6f6afbee5f5b35e7581e2b25f7c773f [file] [log] [blame]
Misha Brukman6d5ab862004-04-24 00:10:56 +00001#===-- Makefile.common - Common make rules for LLVM --------*- Makefile -*--===#
Misha Brukman9b8f5422009-01-09 16:44:42 +00002#
John Criswelld8846c12003-10-21 14:33:46 +00003# The LLVM Compiler Infrastructure
4#
Chris Lattner57360d12007-12-29 20:11:13 +00005# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
Misha Brukman9b8f5422009-01-09 16:44:42 +00007#
Misha Brukman6d5ab862004-04-24 00:10:56 +00008#===------------------------------------------------------------------------===#
Chris Lattner00950542001-06-06 20:29:01 +00009#
10# This file is included by all of the LLVM makefiles. This file defines common
Misha Brukman36bc6422003-08-21 22:02:18 +000011# rules to do things like compile a .cpp file or generate dependency info.
12# These are platform dependent, so this is the file used to specify these
13# system dependent operations.
Chris Lattner00950542001-06-06 20:29:01 +000014#
Vikram S. Advec214e712002-08-29 23:28:46 +000015# The following functionality can be set by setting incoming variables.
16# The variable $(LEVEL) *must* be set:
Chris Lattner00950542001-06-06 20:29:01 +000017#
Misha Brukman9b8f5422009-01-09 16:44:42 +000018# 1. LEVEL - The level of the current subdirectory from the top of the
19# source directory. This level should be expressed as a path, for
Chris Lattner00950542001-06-06 20:29:01 +000020# example, ../.. for two levels deep.
21#
22# 2. DIRS - A list of subdirectories to be built. Fake targets are set up
Chris Lattnera8abc222002-09-18 03:22:27 +000023# so that each of the targets "all", "install", and "clean" each build
24# the subdirectories before the local target. DIRS are guaranteed to be
25# built in order.
Chris Lattner00950542001-06-06 20:29:01 +000026#
Chris Lattnera8abc222002-09-18 03:22:27 +000027# 3. PARALLEL_DIRS - A list of subdirectories to be built, but that may be
28# built in any order. All DIRS are built in order before PARALLEL_DIRS are
29# built, which are then built in any order.
30#
31# 4. Source - If specified, this sets the source code filenames. If this
Misha Brukman9b8f5422009-01-09 16:44:42 +000032# is not set, it defaults to be all of the .cpp, .c, .y, and .l files
Chris Lattnere0010592001-10-18 01:48:09 +000033# in the current directory. Also, if you want to build files in addition
34# to the local files, you can use the ExtraSource variable
Chris Lattner00950542001-06-06 20:29:01 +000035#
Chris Lattner694c5df2003-05-15 21:28:55 +000036# 5. SourceDir - If specified, this specifies a directory that the source files
37# are in, if they are not in the current directory. This should include a
38# trailing / character.
39#
John Criswell7a73b802003-06-30 21:59:07 +000040# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree.
Dinakar Dhurjati584dd182003-05-29 21:49:00 +000041#
Reid Spencercf61b122005-02-14 16:02:19 +000042# 8. PROJ_SRC_DIR - The directory which contains the current set of Makefiles
John Criswell7a73b802003-06-30 21:59:07 +000043# and usually the source code too (unless SourceDir is set).
44#
Reid Spencercf61b122005-02-14 16:02:19 +000045# 9. PROJ_SRC_ROOT - The root directory of the source code being compiled.
John Criswell7a73b802003-06-30 21:59:07 +000046#
Reid Spencercf61b122005-02-14 16:02:19 +000047# 10. PROJ_OBJ_DIR - The directory where object code should be placed.
John Criswell7a73b802003-06-30 21:59:07 +000048#
Reid Spencercf61b122005-02-14 16:02:19 +000049# 11. PROJ_OBJ_ROOT - The root directory for where object code should be
John Criswell7a73b802003-06-30 21:59:07 +000050# placed.
51#
52# For building,
Reid Spencercf61b122005-02-14 16:02:19 +000053# LLVM, LLVM_SRC_ROOT = PROJ_SRC_ROOT
Chris Lattneraf06a082003-08-15 03:02:52 +000054#
Vikram S. Adved60aede2002-07-09 12:04:21 +000055#===-----------------------------------------------------------------------====
Chris Lattner00950542001-06-06 20:29:01 +000056
John Criswell2a6530f2003-06-27 16:58:44 +000057#
Vikram S. Advec214e712002-08-29 23:28:46 +000058# Configuration file to set paths specific to local installation of LLVM
Misha Brukman9b8f5422009-01-09 16:44:42 +000059#
Reid Spencer6ca9e442005-01-16 02:20:30 +000060ifndef LLVM_OBJ_ROOT
Vikram S. Advec214e712002-08-29 23:28:46 +000061include $(LEVEL)/Makefile.config
Reid Spencer6ca9e442005-01-16 02:20:30 +000062else
63include $(LLVM_OBJ_ROOT)/Makefile.config
64endif
Vikram S. Advec214e712002-08-29 23:28:46 +000065
John Criswell8bff5092003-06-11 13:55:44 +000066#
John Criswell7f336952003-09-06 14:44:17 +000067# Include all of the build rules used for making LLVM
John Criswell8bff5092003-06-11 13:55:44 +000068#
John Criswell7f336952003-09-06 14:44:17 +000069include $(LLVM_SRC_ROOT)/Makefile.rules
Chris Lattner1ddb6b62003-08-18 17:27:40 +000070