1##===- source/Interpreter/Makefile  ------------------------*- Makefile -*-===##
2# 
3#                     The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7# 
8##===----------------------------------------------------------------------===##
9
10LLDB_LEVEL := ../..
11LIBRARYNAME := lldbInterpreter
12BUILD_ARCHIVE = 1
13
14BUILT_SOURCES := LLDBWrapPython.cpp
15
16include $(LLDB_LEVEL)/Makefile
17-include $(PROJ_OBJ_DIR)/LLDBWrapPython.cpp.d
18
19# Drop -Wfour-char-constants,  which we are not currently clean with.
20EXTRA_OPTIONS += -Wno-four-char-constants
21
22# Drop -Wself-assign, -Wmissing-field-initializers and -Wsometimes-uninitialized,
23# which we are not currently clean with (due to SWIG generated cpp source).
24EXTRA_OPTIONS += -Wno-missing-field-initializers -Wno-self-assign -Wno-sometimes-uninitialized
25
26# edit-swig-python-wrapper-file.py needs $(SRCROOT)
27export SRCROOT := $(PROJ_SRC_DIR)/$(LLDB_LEVEL)
28
29PYTHON_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)
30
31LLDBWrapPython.cpp lldb.py: $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/Python/modify-python-lldb.py \
32                            $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/Python/edit-swig-python-wrapper-file.py \
33                            $(wildcard $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/Python/interface/*.i)
34	$(Echo) Generating LLDBWrapPython.cpp
35	$(Verb) "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/build-swig-wrapper-classes.sh" "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)" "$(PROJ_OBJ_DIR)" "$(PROJ_OBJ_DIR)" "$(PYTHON_DIR)" -m $(if $(DISABLE_AUTO_DEPENDENCIES),,-M)
36	$(Verb) "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/finish-swig-wrapper-classes.sh" "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)" "$(PROJ_OBJ_DIR)" "$(PROJ_OBJ_DIR)" "$(PYTHON_DIR)" -m
37
38install-local:: lldb.py
39	$(Echo) Installing $(BuildMode) LLDB python modules
40	$(Verb) "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/finish-swig-wrapper-classes.sh" "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)" "$(PROJ_OBJ_DIR)" "$(PROJ_OBJ_DIR)" "" -m
41
42clean-local::
43	$(Verb) $(RM) -f LLDBWrapPython.cpp lldb.py
44