• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1##===- source/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 := ..
11DIRS := API Breakpoint Commands Core DataFormatters Expression Host Interpreter Plugins Symbol Target Utility
12LIBRARYNAME := lldbInitAndLog
13BUILD_ARCHIVE = 1
14
15# Although LLVM makefiles provide $(HOST_OS), we cannot use that here because it is defined by including the $(LLDB_LEVEL)/Makefile
16# below. Instead, we use uname -s to detect the HOST_OS and generate LLDB_vers.c only on Mac. On Linux, the version number is
17# calculated in the same way as Clang's version.
18ifeq (Darwin,$(shell uname -s))
19BUILT_SOURCES = LLDB_vers.c
20endif
21
22SOURCES := lldb-log.cpp lldb.cpp
23
24include $(LLDB_LEVEL)/Makefile
25
26ifeq ($(HOST_OS),Darwin)
27LLDB_vers.c: $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/generate-vers.pl $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/lldb.xcodeproj/project.pbxproj
28	"$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/generate-vers.pl" "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/lldb.xcodeproj/project.pbxproj" > LLDB_vers.c
29else
30LLDB_REVISION := $(strip \
31        $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(LLVM_SRC_ROOT)/tools/lldb))
32
33LLDB_REPOSITORY := $(strip \
34        $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(LLVM_SRC_ROOT)/tools/lldb))
35
36CPP.Defines += -DLLDB_REVISION='"$(LLDB_REVISION)"' -DLLDB_REPOSITORY='"$(LLDB_REPOSITORY)"'
37endif
38