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