Adding notes from release experience.
[llvm-complete.git] / Makefile
blobb48b49b16762ee9f6e6b75fe626fe8dbeef6271b
1 #===- ./Makefile -------------------------------------------*- Makefile -*--===#
2 #
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.
7 #
8 #===------------------------------------------------------------------------===#
10 LEVEL := .
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))
20 endif
22 ifeq ($(MAKECMDGOALS),libs-only)
23 DIRS := $(filter-out tools runtime docs, $(DIRS))
24 OPTIONAL_DIRS :=
25 endif
27 ifeq ($(MAKECMDGOALS),tools-only)
28 DIRS := $(filter-out runtime docs, $(DIRS))
29 OPTIONAL_DIRS :=
30 endif
32 # Don't install utils, examples, or projects they are only used to
33 # build LLVM.
34 ifeq ($(MAKECMDGOALS),install)
35 DIRS := $(filter-out utils, $(DIRS))
36 OPTIONAL_DIRS :=
37 endif
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
47 debug-opt-prof:
48 $(Echo) Building Debug Version
49 $(Verb) $(MAKE)
50 $(Echo)
51 $(Echo) Building Optimized Version
52 $(Echo)
53 $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
54 $(Echo)
55 $(Echo) Building Profiling Version
56 $(Echo)
57 $(Verb) $(MAKE) ENABLE_PROFILING=1
59 dist-hook::
60 $(Echo) Eliminating files constructed by configure
61 $(Verb) $(RM) -f \
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
69 tools-only: all
70 libs-only: all
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 #------------------------------------------------------------------------
76 FilesToConfig := \
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.
92 all::
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.
98 endif
100 check-llvm2cpp:
101 $(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1