Home | History | Annotate | Download | only in source
      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 := ..
     11 DIRS := API Breakpoint Commands Core DataFormatters Expression Host Interpreter Plugins Symbol Target Utility
     12 LIBRARYNAME := lldbInitAndLog
     13 BUILD_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.
     18 ifeq (Darwin,$(shell uname -s)) 
     19 BUILT_SOURCES = LLDB_vers.c
     20 endif
     21 
     22 SOURCES := lldb-log.cpp lldb.cpp
     23 
     24 include $(LLDB_LEVEL)/Makefile
     25 
     26 ifeq ($(HOST_OS),Darwin)
     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
     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
     38