1 #===- ./Makefile -------------------------------------------*- Makefile -*--===#
3 # The LLVM Compiler Infrastructure
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.
8 #===------------------------------------------------------------------------===#
11 DIRS
:= lib
/System lib
/Support utils lib
/VMCore lib tools runtime docs
12 OPTIONAL_DIRS
:= examples projects
13 EXTRA_DIST
:= test llvm.spec
include win32 Xcode
15 include $(LEVEL
)/Makefile.config
17 # llvm-gcc4 doesn't need runtime libs.
18 ifeq ($(LLVMGCC_MAJVERS
),4)
19 DIRS
:= $(filter-out runtime
, $(DIRS
))
22 ifeq ($(MAKECMDGOALS
),libs-only
)
23 DIRS
:= $(filter-out tools runtime docs
, $(DIRS
))
27 ifeq ($(MAKECMDGOALS
),tools-only
)
28 DIRS
:= $(filter-out runtime docs
, $(DIRS
))
32 # Don't install utils, examples, or projects they are only used to
34 ifeq ($(MAKECMDGOALS
),install)
35 DIRS
:= $(filter-out utils
, $(DIRS
))
39 # Include the main makefile machinery.
40 include $(LLVM_SRC_ROOT
)/Makefile.rules
42 # Specify options to pass to configure script when we're
43 # running the dist-check target
44 DIST_CHECK_CONFIG_OPTIONS
= --with-llvmgccdir
=$(LLVMGCCDIR
)
46 .PHONY
: debug-opt-prof
48 $(Echo
) Building Debug Version
51 $(Echo
) Building Optimized Version
53 $(Verb
) $(MAKE
) ENABLE_OPTIMIZED
=1
55 $(Echo
) Building Profiling Version
57 $(Verb
) $(MAKE
) ENABLE_PROFILING
=1
60 $(Echo
) Eliminating files constructed by configure
62 $(TopDistDir
)/include/llvm
/ADT
/hash_map \
63 $(TopDistDir
)/include/llvm
/ADT
/hash_set \
64 $(TopDistDir
)/include/llvm
/ADT
/iterator \
65 $(TopDistDir
)/include/llvm
/Config
/config.h \
66 $(TopDistDir
)/include/llvm
/Support
/DataTypes.h \
67 $(TopDistDir
)/include/llvm
/Support
/ThreadSupport.h
72 #------------------------------------------------------------------------
73 # Make sure the generated headers are up-to-date. This must be kept in
74 # sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
75 #------------------------------------------------------------------------
77 include/llvm
/Config
/config.h \
78 include/llvm
/Support
/DataTypes.h \
79 include/llvm
/ADT
/hash_map \
80 include/llvm
/ADT
/hash_set \
81 include/llvm
/ADT
/iterator
82 FilesToConfigPATH
:= $(addprefix $(LLVM_OBJ_ROOT
)/,$(FilesToConfig
))
84 all-local
:: $(FilesToConfigPATH
)
85 $(FilesToConfigPATH
) : $(LLVM_OBJ_ROOT
)/% : $(LLVM_SRC_ROOT
)/%.in
86 $(Echo
) Regenerating
$*
87 $(Verb
) cd
$(LLVM_OBJ_ROOT
) && $(ConfigStatusScript
) $*
88 .PRECIOUS
: $(FilesToConfigPATH
)
90 # NOTE: This needs to remain as the last target definition in this file so
91 # that it gets executed last.
93 $(Echo
) '*****' Completed
$(BuildMode
)$(AssertMode
) Build
94 ifeq ($(BuildMode
),Debug
)
95 $(Echo
) '*****' Note
: Debug build can be
10 times slower than an
96 $(Echo
) '*****' optimized build. Use
'make ENABLE_OPTIMIZED=1' to
97 $(Echo
) '*****' make an optimized build.
101 $(MAKE
) check TESTSUITE
=Feature RUNLLVM2CPP
=1