Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.
[clang.git] / Makefile
blob17365d9013066e47c4eeb92b89b785026d8ad9de
1 ##===- Makefile --------------------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 # If CLANG_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
11 # are being included from a subdirectory makefile.
13 ifndef CLANG_LEVEL
15 IS_TOP_LEVEL := 1
16 CLANG_LEVEL := .
17 DIRS := include lib tools docs
19 PARALLEL_DIRS :=
21 ifeq ($(BUILD_EXAMPLES),1)
22 PARALLEL_DIRS += examples
23 endif
24 endif
26 ###
27 # Common Makefile code, shared by all Clang Makefiles.
29 # Set LLVM source root level.
30 LEVEL := $(CLANG_LEVEL)/../..
32 # Include LLVM common makefile.
33 include $(LEVEL)/Makefile.common
35 # Set common Clang build flags.
36 CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include
37 ifdef CLANG_VENDOR
38 CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
39 endif
41 # Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
42 # work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
43 # GCC's have false positive warnings with it on Linux (which prove a pain to
44 # fix). For example:
45 # http://gcc.gnu.org/PR41874
46 # http://gcc.gnu.org/PR41838
48 # We can revisit this when LLVM/Clang support it.
49 CXX.Flags += -fno-strict-aliasing
51 ###
52 # Clang Top Level specific stuff.
54 ifeq ($(IS_TOP_LEVEL),1)
56 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
57 $(RecursiveTargets)::
58 $(Verb) if [ ! -f test/Makefile ]; then \
59 $(MKDIR) test; \
60 $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
62 endif
64 test::
65 @ $(MAKE) -C test
67 report::
68 @ $(MAKE) -C test report
70 clean::
71 @ $(MAKE) -C test clean
73 tags::
74 $(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
75 grep -v /lib/Headers | grep -v /test/`
77 cscope.files:
78 find tools lib include -name '*.cpp' \
79 -or -name '*.def' \
80 -or -name '*.td' \
81 -or -name '*.h' > cscope.files
83 .PHONY: test report clean cscope.files
85 endif