Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 1 | #===- ./Makefile -------------------------------------------*- Makefile -*--===# |
John Criswell | e488e93 | 2003-10-20 22:26:57 +0000 | [diff] [blame] | 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 | # |
Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 8 | #===------------------------------------------------------------------------===# |
Chris Lattner | 0095054 | 2001-06-06 20:29:01 +0000 | [diff] [blame] | 9 | LEVEL = . |
Reid Spencer | 8b1f767 | 2005-05-25 21:03:17 +0000 | [diff] [blame] | 10 | DIRS = lib/System lib/Support utils lib |
Chris Lattner | 0095054 | 2001-06-06 20:29:01 +0000 | [diff] [blame] | 11 | |
Reid Spencer | 8b1f767 | 2005-05-25 21:03:17 +0000 | [diff] [blame] | 12 | ifeq ($(MAKECMDGOALS),tools-only) |
| 13 | DIRS += tools |
| 14 | else |
| 15 | ifneq ($(MAKECMDGOALS),libs-only) |
Reid Spencer | 085ae94 | 2005-05-29 00:49:24 +0000 | [diff] [blame] | 16 | DIRS += tools runtime docs |
Reid Spencer | 8b1f767 | 2005-05-25 21:03:17 +0000 | [diff] [blame] | 17 | OPTIONAL_DIRS = examples projects |
| 18 | endif |
Chris Lattner | 6a8c290 | 2004-02-03 23:05:24 +0000 | [diff] [blame] | 19 | endif |
| 20 | |
Reid Spencer | 90c2949 | 2004-10-26 07:05:09 +0000 | [diff] [blame] | 21 | EXTRA_DIST := test llvm.spec include |
| 22 | |
Chris Lattner | 0095054 | 2001-06-06 20:29:01 +0000 | [diff] [blame] | 23 | include $(LEVEL)/Makefile.common |
| 24 | |
Reid Spencer | 45eeed9 | 2005-05-24 02:33:20 +0000 | [diff] [blame] | 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 | |
Reid Spencer | df561f4 | 2004-11-25 09:08:54 +0000 | [diff] [blame] | 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 | |
Reid Spencer | 151f8ba | 2004-10-25 08:27:37 +0000 | [diff] [blame] | 42 | dist-hook:: |
Reid Spencer | cc2d1e2 | 2004-10-30 09:19:36 +0000 | [diff] [blame] | 43 | $(Echo) Eliminating files constructed by configure |
| 44 | $(Verb) $(RM) -f \ |
Reid Spencer | 90c2949 | 2004-10-26 07:05:09 +0000 | [diff] [blame] | 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 |
Reid Spencer | 151f8ba | 2004-10-25 08:27:37 +0000 | [diff] [blame] | 51 | |
Chris Lattner | 9cf662b | 2004-02-03 22:56:40 +0000 | [diff] [blame] | 52 | tools-only: all |
Reid Spencer | 8b1f767 | 2005-05-25 21:03:17 +0000 | [diff] [blame] | 53 | libs-only: all |
Reid Spencer | ca739c6 | 2005-08-25 04:59:49 +0000 | [diff] [blame] | 54 | |
| 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 | #------------------------------------------------------------------------ |
| 59 | FilesToConfig := \ |
| 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 |
| 65 | FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig)) |
| 66 | |
| 67 | all-local:: $(FilesToConfigPATH) |
| 68 | $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in |
| 69 | $(Echo) Regenerating $* |
| 70 | $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $* |
| 71 | .PRECIOUS: $(FilesToConfigPATH) |