Greg Clayton | 54e7afa | 2010-07-09 20:39:50 +0000 | [diff] [blame] | 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 | |
| 10 | LLDB_LEVEL := .. |
Filipe Cabecinhas | 3844c48 | 2013-01-29 22:20:20 +0000 | [diff] [blame] | 11 | DIRS := API Breakpoint Commands Core DataFormatters Expression Host Interpreter Plugins Symbol Target Utility |
Greg Clayton | 54e7afa | 2010-07-09 20:39:50 +0000 | [diff] [blame] | 12 | LIBRARYNAME := lldbInitAndLog |
| 13 | BUILD_ARCHIVE = 1 |
| 14 | |
Daniel Malea | 3dd21ab | 2013-02-28 16:51:15 +0000 | [diff] [blame] | 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. |
| 18 | ifeq (Darwin,$(shell uname -s)) |
Greg Clayton | 54e7afa | 2010-07-09 20:39:50 +0000 | [diff] [blame] | 19 | BUILT_SOURCES = LLDB_vers.c |
Daniel Malea | 3dd21ab | 2013-02-28 16:51:15 +0000 | [diff] [blame] | 20 | endif |
| 21 | |
Filipe Cabecinhas | 1377f38 | 2012-05-29 14:03:55 +0000 | [diff] [blame] | 22 | SOURCES := lldb-log.cpp lldb.cpp |
Greg Clayton | 54e7afa | 2010-07-09 20:39:50 +0000 | [diff] [blame] | 23 | |
| 24 | include $(LLDB_LEVEL)/Makefile |
| 25 | |
Daniel Malea | 3dd21ab | 2013-02-28 16:51:15 +0000 | [diff] [blame] | 26 | ifeq ($(HOST_OS),Darwin) |
Greg Clayton | 980d067 | 2010-07-12 23:14:00 +0000 | [diff] [blame] | 27 | LLDB_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 Malea | 3dd21ab | 2013-02-28 16:51:15 +0000 | [diff] [blame] | 29 | else |
| 30 | LLDB_REVISION := $(strip \ |
| 31 | $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(LLVM_SRC_ROOT)/tools/lldb)) |
| 32 | |
| 33 | LLDB_REPOSITORY := $(strip \ |
| 34 | $(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(LLVM_SRC_ROOT)/tools/lldb)) |
| 35 | |
| 36 | CPP.Defines += -DLLDB_REVISION='"$(LLDB_REVISION)"' -DLLDB_REPOSITORY='"$(LLDB_REPOSITORY)"' |
| 37 | endif |