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 LLDB_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
11 # are being included from a subdirectory makefile.
17 DIRS := include source lib tools
23 # Common Makefile code, shared by all LLDB Makefiles.
25 # Set LLVM source root level.
26 LEVEL := $(LLDB_LEVEL)/../..
28 # Include LLVM common makefile.
29 include $(LEVEL)/Makefile.common
31 # Set common LLDB build flags.
32 CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include
33 CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/include
34 CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/../clang/include
35 CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/../clang/include
36 CPP.Flags += -I/usr/include/python2.6
37 CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source
38 CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/Utility
39 ifeq ($(HOST_OS),Darwin)
40 CPP.Flags += -F/System/Library/Frameworks -F/System/Library/PrivateFrameworks
43 CPP.Flags += -DLLDB_VENDOR='"$(LLDB_VENDOR) "'
46 # Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
47 # work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
48 # GCC's have false positive warnings with it on Linux (which prove a pain to
50 # http://gcc.gnu.org/PR41874
51 # http://gcc.gnu.org/PR41838
53 # We can revisit this when LLVM/Clang support it.
54 CXX.Flags += -fno-strict-aliasing
57 # LLDB Top Level specific stuff.
59 ifeq ($(IS_TOP_LEVEL),1)
61 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
63 $(Verb) if [ ! -f test/Makefile ]; then \
65 $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
73 # @ $(MAKE) -C test report
76 # @ $(MAKE) -C test clean
79 $(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
80 grep -v /lib/Headers | grep -v /test/`
83 find tools lib include -name '*.cpp' \
86 -or -name '*.h' > cscope.files
88 .PHONY: test report clean cscope.files