]> git.saurik.com Git - apple/xnu.git/blob - tools/lldbmacros/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / lldbmacros / Makefile
1 export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2 export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3 export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4 export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6 include $(MakeInc_cmd)
7 include $(MakeInc_def)
8
9 .PHONY: lldbmacros_install
10
11 do_config_all:: lldbmacros_install
12
13 LLDBMACROS_SOURCE:=$(SRCROOT)/tools/lldbmacros/
14 LLDBMACROS_BOOTSTRAP_DEST:=$(OBJPATH)/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)
15 LLDBMACROS_DEST:=$(LLDBMACROS_BOOTSTRAP_DEST)/lldbmacros/
16 LLDBMACROS_USERDEBUG_FILES=
17 ifeq ($(BUILD_STATIC_LINK),1)
18 ifneq ($(BUILD_XNU_LIBRARY),1)
19 KERNEL_STATIC_DSYM_LLDBMACROS := $(OBJPATH)/$(KERNEL_FILE_NAME).link/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)/lldbmacros/
20 endif
21 endif
22
23 LLDBMACROS_USERDEBUG_FILES:= \
24 usertaskdebugging/__init__.py \
25 usertaskdebugging/gdbserver.py \
26 usertaskdebugging/interface.py \
27 usertaskdebugging/rsprotocol.py \
28 usertaskdebugging/target.py \
29 usertaskdebugging/userprocess.py
30
31 LLDBMACROS_PYTHON_FILES = $(LLDBMACROS_USERDEBUG_FILES) \
32 core/standard.py \
33 core/cvalue.py \
34 core/__init__.py \
35 core/configuration.py \
36 core/caching.py \
37 core/lazytarget.py \
38 core/kernelcore.py \
39 core/operating_system.py \
40 core/xnu_lldb_init.py \
41 plugins/__init__.py \
42 plugins/zprint_perf_log.py \
43 sysregdoc/AArch64-esr_el1.xml \
44 bank.py \
45 turnstile.py \
46 kevent.py \
47 workqueue.py \
48 ulock.py \
49 xnu.py \
50 xnudefines.py \
51 ktrace.py \
52 macho.py \
53 mbufdefines.py \
54 netdefines.py \
55 ntstat.py \
56 routedefines.py \
57 ipc.py \
58 ipcimportancedetail.py \
59 kcdata.py \
60 scheduler.py \
61 structanalyze.py \
62 pmap.py \
63 memory.py \
64 mbufs.py \
65 net.py \
66 skywalk.py \
67 ioreg.py \
68 utils.py \
69 kdp.py \
70 process.py \
71 userspace.py \
72 pci.py \
73 misc.py \
74 apic.py \
75 kasan.py \
76 kauth.py \
77 usertaskgdbserver.py \
78 waitq.py \
79 pgtrace.py \
80 xnutriage.py \
81 zonetriage.py \
82 sysreg.py \
83 counter.py
84
85 ifneq ($(PLATFORM),MacOSX)
86 LLDBMACROS_PYTHON_FILES+= \
87 plugins/iosspeedtracer.py \
88 plugins/iosspeedtracer.sh
89 endif
90
91 include $(MakeInc_rule)
92 include $(MakeInc_dir)
93
94 INSTALL_LLDBMACROS_PYTHON_FILES=$(addprefix $(LLDBMACROS_DEST), $(LLDBMACROS_PYTHON_FILES))
95 $(eval $(call INSTALLPYTHON_RULE_template,$(INSTALL_LLDBMACROS_PYTHON_FILES),$(LLDBMACROS_SOURCE)%,pydir,$(DATA_UNIFDEF),$(LLDBMACROS_DEST)))
96 $(eval $(call INSTALLPYTHON_RULE_template,$(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME),$(LLDBMACROS_SOURCE)/core/xnu_lldb_init.py,kbpydir,$(DATA_UNIFDEF),$(LLDBMACROS_BOOTSTRAP_DEST)/))
97
98 ifeq ($(BUILD_STATIC_LINK),1)
99 ifneq ($(BUILD_XNU_LIBRARY),1)
100 INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES=$(addprefix $(KERNEL_STATIC_DSYM_LLDBMACROS), $(LLDBMACROS_PYTHON_FILES))
101 $(eval $(call INSTALLPYTHON_RULE_template,$(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES),$(LLDBMACROS_SOURCE)%,sdpydir,$(DATA_UNIFDEF),$(KERNEL_STATIC_DSYM_LLDBMACROS)))
102 $(eval $(call INSTALLPYTHON_RULE_template,$(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME),$(LLDBMACROS_SOURCE)/core/xnu_lldb_init.py,kbsdpydir,$(DATA_UNIFDEF),$(KERNEL_STATIC_DSYM_LLDBMACROS)/../))
103 endif
104 endif
105
106 ifeq ($(BUILD_STATIC_LINK),1)
107 ifneq ($(BUILD_XNU_LIBRARY),1)
108 STATIC_DSYM_LLDBMACROS_INSTALL_TARGETS := \
109 $(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES) \
110 $(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME)
111 endif
112 endif
113
114 lldbmacros_install: $(INSTALL_LLDBMACROS_PYTHON_FILES) $(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME) $(STATIC_DSYM_LLDBMACROS_INSTALL_TARGETS)
115 $(_v)$(MKDIR) $(LLDBMACROS_DEST)/builtinkexts
116 ifeq ($(BUILD_STATIC_LINK),1)
117 ifneq ($(BUILD_XNU_LIBRARY),1)
118 $(_v)$(MKDIR) $(KERNEL_STATIC_DSYM_LLDBMACROS)/builtinkexts
119 endif
120 endif