Made warning red.
[llvm-complete.git] / Makefile
blob1aa33039794ad534742c5c08114342283f742c8b
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 #===------------------------------------------------------------------------===#
9 LEVEL = .
10 DIRS = lib/System lib/Support utils lib
12 include $(LEVEL)/Makefile.config
14 ifeq ($(MAKECMDGOALS),tools-only)
15 DIRS += tools
16 else
17 ifneq ($(MAKECMDGOALS),libs-only)
18 DIRS += tools
19 ifneq ($(LLVMGCC_MAJVERS),4)
20 DIRS += runtime
21 else
22 $(warning Skipping runtime libraries, llvm-gcc 4 detected.)
23 endif
24 OPTIONAL_DIRS := examples projects
25 DIRS += docs
26 endif
27 endif
28 EXTRA_DIST := test llvm.spec include win32 Xcode
30 include $(LLVM_SRC_ROOT)/Makefile.rules
32 # Specify options to pass to configure script when we're
33 # running the dist-check target
34 DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
36 .PHONY: debug-opt-prof
37 debug-opt-prof:
38 $(Echo) Building Debug Version
39 $(Verb) $(MAKE)
40 $(Echo)
41 $(Echo) Building Optimized Version
42 $(Echo)
43 $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
44 $(Echo)
45 $(Echo) Building Profiling Version
46 $(Echo)
47 $(Verb) $(MAKE) ENABLE_PROFILING=1
49 dist-hook::
50 $(Echo) Eliminating files constructed by configure
51 $(Verb) $(RM) -f \
52 $(TopDistDir)/include/llvm/ADT/hash_map \
53 $(TopDistDir)/include/llvm/ADT/hash_set \
54 $(TopDistDir)/include/llvm/ADT/iterator \
55 $(TopDistDir)/include/llvm/Config/config.h \
56 $(TopDistDir)/include/llvm/Support/DataTypes.h \
57 $(TopDistDir)/include/llvm/Support/ThreadSupport.h
59 tools-only: all
60 libs-only: all
62 #------------------------------------------------------------------------
63 # Make sure the generated headers are up-to-date. This must be kept in
64 # sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
65 #------------------------------------------------------------------------
66 FilesToConfig := \
67 include/llvm/Config/config.h \
68 include/llvm/Support/DataTypes.h \
69 include/llvm/ADT/hash_map \
70 include/llvm/ADT/hash_set \
71 include/llvm/ADT/iterator
72 FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
74 all-local:: $(FilesToConfigPATH)
75 $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
76 $(Echo) Regenerating $*
77 $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
78 .PRECIOUS: $(FilesToConfigPATH)
80 # NOTE: This needs to remain as the last target definition in this file so
81 # that it gets executed last.
82 all::
83 $(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build
84 ifeq ($(BuildMode),Debug)
85 $(Echo) '*****' Note: Debug build can be 10 times slower than an
86 $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to
87 $(Echo) '*****' make an optimized build.
88 endif