blob: ddbaf48c3cf25d1f49f31d3cb8631ab09e6db32b [file] [log] [blame]
Vikram S. Adved60aede2002-07-09 12:04:21 +00001#===-- Makefile.common - Common make rules for LLVM -------*- makefile -*--====
Chris Lattner00950542001-06-06 20:29:01 +00002#
3# This file is included by all of the LLVM makefiles. This file defines common
Misha Brukman36bc6422003-08-21 22:02:18 +00004# rules to do things like compile a .cpp file or generate dependency info.
5# These are platform dependent, so this is the file used to specify these
6# system dependent operations.
Chris Lattner00950542001-06-06 20:29:01 +00007#
Vikram S. Advec214e712002-08-29 23:28:46 +00008# The following functionality can be set by setting incoming variables.
9# The variable $(LEVEL) *must* be set:
Chris Lattner00950542001-06-06 20:29:01 +000010#
11# 1. LEVEL - The level of the current subdirectory from the top of the
12# MagicStats view. This level should be expressed as a path, for
13# example, ../.. for two levels deep.
14#
15# 2. DIRS - A list of subdirectories to be built. Fake targets are set up
Chris Lattnera8abc222002-09-18 03:22:27 +000016# so that each of the targets "all", "install", and "clean" each build
17# the subdirectories before the local target. DIRS are guaranteed to be
18# built in order.
Chris Lattner00950542001-06-06 20:29:01 +000019#
Chris Lattnera8abc222002-09-18 03:22:27 +000020# 3. PARALLEL_DIRS - A list of subdirectories to be built, but that may be
21# built in any order. All DIRS are built in order before PARALLEL_DIRS are
22# built, which are then built in any order.
23#
24# 4. Source - If specified, this sets the source code filenames. If this
Chris Lattner00950542001-06-06 20:29:01 +000025# is not set, it defaults to be all of the .cpp, .c, .y, and .l files
Chris Lattnere0010592001-10-18 01:48:09 +000026# in the current directory. Also, if you want to build files in addition
27# to the local files, you can use the ExtraSource variable
Chris Lattner00950542001-06-06 20:29:01 +000028#
Chris Lattner694c5df2003-05-15 21:28:55 +000029# 5. SourceDir - If specified, this specifies a directory that the source files
30# are in, if they are not in the current directory. This should include a
31# trailing / character.
32#
John Criswell7a73b802003-06-30 21:59:07 +000033# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree.
Dinakar Dhurjati584dd182003-05-29 21:49:00 +000034#
John Criswell7a73b802003-06-30 21:59:07 +000035# 8. BUILD_SRC_DIR - The directory which contains the current set of Makefiles
36# and usually the source code too (unless SourceDir is set).
37#
38# 9. BUILD_SRC_ROOT - The root directory of the source code being compiled.
39#
40# 10. BUILD_OBJ_DIR - The directory where object code should be placed.
41#
42# 11. BUILD_OBJ_ROOT - The root directory for where object code should be
43# placed.
44#
45# For building,
Chris Lattnere430a1e2003-08-21 22:23:49 +000046# LLVM, LLVM_SRC_ROOT = BUILD_SRC_ROOT
Chris Lattneraf06a082003-08-15 03:02:52 +000047#
Vikram S. Adved60aede2002-07-09 12:04:21 +000048#===-----------------------------------------------------------------------====
Chris Lattner00950542001-06-06 20:29:01 +000049
John Criswell2a6530f2003-06-27 16:58:44 +000050#
Vikram S. Advec214e712002-08-29 23:28:46 +000051# Configuration file to set paths specific to local installation of LLVM
52#
53include $(LEVEL)/Makefile.config
54
John Criswell8bff5092003-06-11 13:55:44 +000055#
John Criswell7f336952003-09-06 14:44:17 +000056# Include all of the build rules used for making LLVM
John Criswell8bff5092003-06-11 13:55:44 +000057#
John Criswell7f336952003-09-06 14:44:17 +000058include $(LLVM_SRC_ROOT)/Makefile.rules
Chris Lattner1ddb6b62003-08-18 17:27:40 +000059