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 #===------------------------------------------------------------------------===#
10 DIRS = lib/System lib/Support utils lib
12 include $(LEVEL)/Makefile.common
14 ifeq ($(MAKECMDGOALS),tools-only)
17 ifneq ($(MAKECMDGOALS),libs-only)
19 ifeq ($(LLVMGCC_MAJVERS),3)
22 $(warning Skipping runtime libraries, llvm-gcc 4 detected.)
26 OPTIONAL_DIRS = examples projects
28 EXTRA_DIST := test llvm.spec include
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)
34 .PHONY: debug-opt-prof
36 $(Echo) Building Debug Version
39 $(Echo) Building Optimized Version
41 $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
43 $(Echo) Building Profiling Version
45 $(Verb) $(MAKE) ENABLE_PROFILING=1
48 $(Echo) Eliminating files constructed by configure
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
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 #------------------------------------------------------------------------
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))
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)
78 #NOTE: THis needs to remain as the last target definition in this file so
79 #that it gets executed last.
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.