Invert the tests on LLVMGCC_MAJVERS to check for value 4 instead of value
[oota-llvm.git] / Makefile
1 #===- ./Makefile -------------------------------------------*- Makefile -*--===#
2
3 #                     The LLVM Compiler Infrastructure
4 #
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
11
12 include $(LEVEL)/Makefile.common
13
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     DIRS += docs
25   endif
26   OPTIONAL_DIRS = examples projects
27 endif
28 EXTRA_DIST := test llvm.spec include
29
30 # Specify options to pass to configure script when we're
31 # running the dist-check target
32 DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
33
34 .PHONY: debug-opt-prof
35 debug-opt-prof:
36         $(Echo) Building Debug Version
37         $(Verb) $(MAKE)
38         $(Echo)
39         $(Echo) Building Optimized Version
40         $(Echo)
41         $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
42         $(Echo)
43         $(Echo) Building Profiling Version
44         $(Echo)
45         $(Verb) $(MAKE) ENABLE_PROFILING=1
46
47 dist-hook::
48         $(Echo) Eliminating files constructed by configure
49         $(Verb) $(RM) -f \
50           $(TopDistDir)/include/llvm/ADT/hash_map  \
51           $(TopDistDir)/include/llvm/ADT/hash_set  \
52           $(TopDistDir)/include/llvm/ADT/iterator  \
53           $(TopDistDir)/include/llvm/Config/config.h  \
54           $(TopDistDir)/include/llvm/Support/DataTypes.h  \
55           $(TopDistDir)/include/llvm/Support/ThreadSupport.h
56
57 tools-only: all
58 libs-only: all
59
60 #------------------------------------------------------------------------
61 # Make sure the generated headers are up-to-date. This must be kept in
62 # sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
63 #------------------------------------------------------------------------
64 FilesToConfig := \
65   include/llvm/Config/config.h \
66   include/llvm/Support/DataTypes.h \
67   include/llvm/ADT/hash_map \
68   include/llvm/ADT/hash_set \
69   include/llvm/ADT/iterator
70 FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
71
72 all-local:: $(FilesToConfigPATH)
73 $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in 
74         $(Echo) Regenerating $*
75         $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
76 .PRECIOUS: $(FilesToConfigPATH)
77
78 # NOTE: This needs to remain as the last target definition in this file so
79 # that it gets executed last.
80 all:: 
81         $(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build
82 ifeq ($(BuildMode),Debug)
83         $(Echo) '*****' Note: Debug build can be 10 times slower than an
84         $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to
85         $(Echo) '*****' make an optimized build.
86 endif
87