2004-04-24 02:10:56 +02:00
|
|
|
#===- ./Makefile -------------------------------------------*- Makefile -*--===#
|
2003-10-21 00:26:57 +02:00
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file was developed by the LLVM research group and is distributed under
|
|
|
|
# the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
#
|
2004-04-24 02:10:56 +02:00
|
|
|
#===------------------------------------------------------------------------===#
|
2006-06-03 00:41:18 +02:00
|
|
|
|
2001-06-06 22:29:01 +02:00
|
|
|
LEVEL = .
|
2006-05-18 00:55:35 +02:00
|
|
|
DIRS = lib/System lib/Support utils lib/VMCore lib
|
2001-06-06 22:29:01 +02:00
|
|
|
|
2006-04-08 04:14:37 +02:00
|
|
|
include $(LEVEL)/Makefile.config
|
2006-04-07 00:15:51 +02:00
|
|
|
|
2006-06-03 00:41:18 +02:00
|
|
|
|
2005-05-25 23:03:17 +02:00
|
|
|
ifeq ($(MAKECMDGOALS),tools-only)
|
2006-04-07 00:15:51 +02:00
|
|
|
DIRS += tools
|
2005-05-25 23:03:17 +02:00
|
|
|
else
|
|
|
|
ifneq ($(MAKECMDGOALS),libs-only)
|
2006-04-07 00:15:51 +02:00
|
|
|
DIRS += tools
|
2006-04-07 23:45:23 +02:00
|
|
|
ifneq ($(LLVMGCC_MAJVERS),4)
|
2006-04-07 00:15:51 +02:00
|
|
|
DIRS += runtime
|
|
|
|
else
|
|
|
|
$(warning Skipping runtime libraries, llvm-gcc 4 detected.)
|
|
|
|
endif
|
2006-06-03 00:34:39 +02:00
|
|
|
|
2006-04-07 00:15:51 +02:00
|
|
|
DIRS += docs
|
2005-05-25 23:03:17 +02:00
|
|
|
endif
|
2004-02-04 00:05:24 +01:00
|
|
|
endif
|
2006-06-03 00:41:18 +02:00
|
|
|
|
|
|
|
# Don't install utils, they are only used to build LLVM.
|
|
|
|
#
|
|
|
|
ifeq ($(MAKECMDGOALS),install)
|
|
|
|
DIRS := $(filter-out utils, $(DIRS))
|
|
|
|
|
|
|
|
# Don't install examples or projects.
|
|
|
|
OPTIONAL_DIRS :=
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2006-04-12 22:53:14 +02:00
|
|
|
EXTRA_DIST := test llvm.spec include win32 Xcode
|
2004-10-26 09:05:09 +02:00
|
|
|
|
2006-06-03 00:41:18 +02:00
|
|
|
# Include the main makefile machinery.
|
2006-04-08 04:14:37 +02:00
|
|
|
include $(LLVM_SRC_ROOT)/Makefile.rules
|
|
|
|
|
2005-05-24 04:33:20 +02:00
|
|
|
# Specify options to pass to configure script when we're
|
|
|
|
# running the dist-check target
|
|
|
|
DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
|
|
|
|
|
2004-11-25 10:08:54 +01:00
|
|
|
.PHONY: debug-opt-prof
|
|
|
|
debug-opt-prof:
|
|
|
|
$(Echo) Building Debug Version
|
|
|
|
$(Verb) $(MAKE)
|
|
|
|
$(Echo)
|
|
|
|
$(Echo) Building Optimized Version
|
|
|
|
$(Echo)
|
|
|
|
$(Verb) $(MAKE) ENABLE_OPTIMIZED=1
|
|
|
|
$(Echo)
|
|
|
|
$(Echo) Building Profiling Version
|
|
|
|
$(Echo)
|
|
|
|
$(Verb) $(MAKE) ENABLE_PROFILING=1
|
|
|
|
|
2004-10-25 10:27:37 +02:00
|
|
|
dist-hook::
|
2004-10-30 11:19:36 +02:00
|
|
|
$(Echo) Eliminating files constructed by configure
|
|
|
|
$(Verb) $(RM) -f \
|
2004-10-26 09:05:09 +02:00
|
|
|
$(TopDistDir)/include/llvm/ADT/hash_map \
|
|
|
|
$(TopDistDir)/include/llvm/ADT/hash_set \
|
|
|
|
$(TopDistDir)/include/llvm/ADT/iterator \
|
|
|
|
$(TopDistDir)/include/llvm/Config/config.h \
|
|
|
|
$(TopDistDir)/include/llvm/Support/DataTypes.h \
|
|
|
|
$(TopDistDir)/include/llvm/Support/ThreadSupport.h
|
2004-10-25 10:27:37 +02:00
|
|
|
|
2004-02-03 23:56:40 +01:00
|
|
|
tools-only: all
|
2005-05-25 23:03:17 +02:00
|
|
|
libs-only: all
|
2005-08-25 06:59:49 +02:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
# Make sure the generated headers are up-to-date. This must be kept in
|
|
|
|
# sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
FilesToConfig := \
|
|
|
|
include/llvm/Config/config.h \
|
|
|
|
include/llvm/Support/DataTypes.h \
|
|
|
|
include/llvm/ADT/hash_map \
|
|
|
|
include/llvm/ADT/hash_set \
|
|
|
|
include/llvm/ADT/iterator
|
|
|
|
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
|
|
|
|
|
|
|
|
all-local:: $(FilesToConfigPATH)
|
|
|
|
$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
|
|
|
|
$(Echo) Regenerating $*
|
|
|
|
$(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
|
|
|
|
.PRECIOUS: $(FilesToConfigPATH)
|
2006-04-07 17:58:18 +02:00
|
|
|
|
2006-04-07 18:21:59 +02:00
|
|
|
# NOTE: This needs to remain as the last target definition in this file so
|
|
|
|
# that it gets executed last.
|
2006-04-07 17:58:18 +02:00
|
|
|
all::
|
|
|
|
$(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build
|
|
|
|
ifeq ($(BuildMode),Debug)
|
|
|
|
$(Echo) '*****' Note: Debug build can be 10 times slower than an
|
|
|
|
$(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to
|
|
|
|
$(Echo) '*****' make an optimized build.
|
|
|
|
endif
|
2006-04-07 18:21:59 +02:00
|
|
|
|
2006-06-01 09:27:53 +02:00
|
|
|
check-llvm2cpp:
|
|
|
|
$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
|