aboutsummaryrefslogtreecommitdiff
path: root/tools/debugserver/source/MacOSX/Makefile
blob: d047444a9c8112ce6d082ec9eb467cb55e6c99c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
##===- tools/debugserver/source/MacOSX/Makefile ------------*- Makefile -*-===##
#
#                     The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LLDB_LEVEL := ../../../..

DIRS := i386 x86_64

TOOLNAME = debugserver

CODESIGN_TOOLS := 1

TOOL_CODESIGN_IDENTITY := lldb_codesign

LLVMLibsOptions += -llldbDebugserverCommon -llldbUtility -llldbDebugserverMacOSX_I386 -llldbDebugserverMacOSX_X86_64 \
					-framework Foundation -framework CoreFoundation

GENERATED_MACH_SOURCES = $(PROJ_OBJ_DIR)/mach_excServer.c $(PROJ_OBJ_DIR)/mach_excUser.c

SOURCES := CFBundle.cpp \
  CFData.cpp			\
  CFString.cpp			\
  MachException.cpp		\
  MachProcess.cpp		\
  MachTask.cpp			\
  MachThread.cpp		\
  MachThreadList.cpp	\
  MachVMMemory.cpp		\
  MachVMRegion.cpp

BUILT_SOURCES = $(GENERATED_MACH_SOURCES) $(PROJ_OBJ_DIR)/HasAVX.o

CPP.Flags += -I$(PROJ_OBJ_DIR)/../.. -I$(PROJ_SRC_DIR)/..

LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(PROJ_SRC_DIR)/../../resources/lldb-debugserver-Info.plist

include $(LLDB_LEVEL)/Makefile

ObjectsO += $(PROJ_OBJ_DIR)/HasAVX.o

$(PROJ_OBJ_DIR)/HasAVX.o: $(PROJ_SRC_DIR)/HasAVX.s
	$(Echo) "Compiling HasAVX.s for $(BuildMode) build" $(PIC_FLAG)
	$(CC) $(TargetCommonOpts) $(CompileCommonOpts) -c $< -o $@

ifeq ($(HOST_OS),Darwin)
LLVMLibsOptions += -Wl,-rpath,@loader_path/../lib/
endif

$(GENERATED_MACH_SOURCES):
	mig -I$(PROJ_OBJ_DIR)/../.. $(PROJ_SRC_DIR)/dbgnub-mig.defs