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.config
14 ifeq ($(MAKECMDGOALS),tools-only)
17 ifneq ($(MAKECMDGOALS),libs-only)
19 ifneq ($(LLVMGCC_MAJVERS),4)
22 $(warning Skipping runtime libraries, llvm-gcc 4 detected.)
24 OPTIONAL_DIRS := examples projects
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
38 $(Echo) Building Debug Version
41 $(Echo) Building Optimized Version
43 $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
45 $(Echo) Building Profiling Version
47 $(Verb) $(MAKE) ENABLE_PROFILING=1
50 $(Echo) Eliminating files constructed by configure
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
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 #------------------------------------------------------------------------
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.
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.