Make sure the tools get built if no build target is specified.
[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 ifeq ($(MAKECMDGOALS),tools-only)
13 DIRS += tools
14 else
15   ifneq ($(MAKECMDGOALS),libs-only)
16     DIRS += tools runtime docs
17     OPTIONAL_DIRS = examples projects
18   endif
19 endif
20
21 EXTRA_DIST := test llvm.spec include
22
23 include $(LEVEL)/Makefile.common
24
25 # Specify options to pass to configure script when we're
26 # running the dist-check target
27 DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
28
29 .PHONY: debug-opt-prof
30 debug-opt-prof:
31         $(Echo) Building Debug Version
32         $(Verb) $(MAKE)
33         $(Echo)
34         $(Echo) Building Optimized Version
35         $(Echo)
36         $(Verb) $(MAKE) ENABLE_OPTIMIZED=1
37         $(Echo)
38         $(Echo) Building Profiling Version
39         $(Echo)
40         $(Verb) $(MAKE) ENABLE_PROFILING=1
41
42 dist-hook::
43         $(Echo) Eliminating files constructed by configure
44         $(Verb) $(RM) -f \
45           $(TopDistDir)/include/llvm/ADT/hash_map  \
46           $(TopDistDir)/include/llvm/ADT/hash_set  \
47           $(TopDistDir)/include/llvm/ADT/iterator  \
48           $(TopDistDir)/include/llvm/Config/config.h  \
49           $(TopDistDir)/include/llvm/Support/DataTypes.h  \
50           $(TopDistDir)/include/llvm/Support/ThreadSupport.h
51
52 tools-only: all
53 libs-only: all