blob: 9668cf5aba31403db9fcf257e8eb5b158a370557 [file] [log] [blame]
Greg Clayton54e7afa2010-07-09 20:39:50 +00001##===- 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 := ..
Filipe Cabecinhas3844c482013-01-29 22:20:20 +000011DIRS := API Breakpoint Commands Core DataFormatters Expression Host Interpreter Plugins Symbol Target Utility
Greg Clayton54e7afa2010-07-09 20:39:50 +000012LIBRARYNAME := lldbInitAndLog
13BUILD_ARCHIVE = 1
14
Daniel Malea3dd21ab2013-02-28 16:51:15 +000015# 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))
Greg Clayton54e7afa2010-07-09 20:39:50 +000019BUILT_SOURCES = LLDB_vers.c
Daniel Malea3dd21ab2013-02-28 16:51:15 +000020endif
21
Filipe Cabecinhas1377f382012-05-29 14:03:55 +000022SOURCES := lldb-log.cpp lldb.cpp
Greg Clayton54e7afa2010-07-09 20:39:50 +000023
24include $(LLDB_LEVEL)/Makefile
25
Daniel Malea3dd21ab2013-02-28 16:51:15 +000026ifeq ($(HOST_OS),Darwin)
Greg Clayton980d0672010-07-12 23:14:00 +000027LLDB_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
Daniel Malea3dd21ab2013-02-28 16:51:15 +000029else
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