blob: b474a3a0674e65e1c1380d9c89a7d1da534230ce [file] [log] [blame]
Misha Brukman6d5ab862004-04-24 00:10:56 +00001#===- ./Makefile -------------------------------------------*- Makefile -*--===#
John Criswelle488e932003-10-20 22:26:57 +00002#
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#
Misha Brukman6d5ab862004-04-24 00:10:56 +00008#===------------------------------------------------------------------------===#
Chris Lattner00950542001-06-06 20:29:01 +00009LEVEL = .
Reid Spencer8b1f7672005-05-25 21:03:17 +000010DIRS = lib/System lib/Support utils lib
Chris Lattner00950542001-06-06 20:29:01 +000011
Reid Spencer8b1f7672005-05-25 21:03:17 +000012ifeq ($(MAKECMDGOALS),tools-only)
13DIRS += tools
14else
15 ifneq ($(MAKECMDGOALS),libs-only)
Reid Spencer085ae942005-05-29 00:49:24 +000016 DIRS += tools runtime docs
Reid Spencer8b1f7672005-05-25 21:03:17 +000017 OPTIONAL_DIRS = examples projects
18 endif
Chris Lattner6a8c2902004-02-03 23:05:24 +000019endif
20
Reid Spencer90c29492004-10-26 07:05:09 +000021EXTRA_DIST := test llvm.spec include
22
Chris Lattner00950542001-06-06 20:29:01 +000023include $(LEVEL)/Makefile.common
24
Reid Spencer45eeed92005-05-24 02:33:20 +000025# Specify options to pass to configure script when we're
26# running the dist-check target
27DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
28
Reid Spencerdf561f42004-11-25 09:08:54 +000029.PHONY: debug-opt-prof
30debug-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
Reid Spencer151f8ba2004-10-25 08:27:37 +000042dist-hook::
Reid Spencercc2d1e22004-10-30 09:19:36 +000043 $(Echo) Eliminating files constructed by configure
44 $(Verb) $(RM) -f \
Reid Spencer90c29492004-10-26 07:05:09 +000045 $(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
Reid Spencer151f8ba2004-10-25 08:27:37 +000051
Chris Lattner9cf662b2004-02-03 22:56:40 +000052tools-only: all
Reid Spencer8b1f7672005-05-25 21:03:17 +000053libs-only: all
Reid Spencerca739c62005-08-25 04:59:49 +000054
55#------------------------------------------------------------------------
56# Make sure the generated headers are up-to-date. This must be kept in
57# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
58#------------------------------------------------------------------------
59FilesToConfig := \
60 include/llvm/Config/config.h \
61 include/llvm/Support/DataTypes.h \
62 include/llvm/ADT/hash_map \
63 include/llvm/ADT/hash_set \
64 include/llvm/ADT/iterator
65FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
66
67all-local:: $(FilesToConfigPATH)
68$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
69 $(Echo) Regenerating $*
70 $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
71.PRECIOUS: $(FilesToConfigPATH)