]> git.saurik.com Git - apple/xnu.git/blame - tools/lldbmacros/Makefile
xnu-7195.101.1.tar.gz
[apple/xnu.git] / tools / lldbmacros / Makefile
CommitLineData
39236c6e
A
1export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
39236c6e
A
6include $(MakeInc_cmd)
7include $(MakeInc_def)
8
9.PHONY: lldbmacros_install
10
11do_config_all:: lldbmacros_install
12
13LLDBMACROS_SOURCE:=$(SRCROOT)/tools/lldbmacros/
fe8ab488
A
14LLDBMACROS_BOOTSTRAP_DEST:=$(OBJPATH)/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)
15LLDBMACROS_DEST:=$(LLDBMACROS_BOOTSTRAP_DEST)/lldbmacros/
3e170ce0 16LLDBMACROS_USERDEBUG_FILES=
d9a64523 17ifeq ($(BUILD_STATIC_LINK),1)
a991bd8d 18ifneq ($(BUILD_XNU_LIBRARY),1)
0a7de745 19KERNEL_STATIC_DSYM_LLDBMACROS := $(OBJPATH)/$(KERNEL_FILE_NAME).link/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)/lldbmacros/
d9a64523 20endif
a991bd8d 21endif
39236c6e 22
39037602
A
23LLDBMACROS_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
3e170ce0
A
30
31LLDBMACROS_PYTHON_FILES = $(LLDBMACROS_USERDEBUG_FILES) \
39236c6e
A
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 \
cb323159 43 sysregdoc/AArch64-esr_el1.xml \
fe8ab488 44 bank.py \
d9a64523 45 turnstile.py \
5ba3f43e 46 kevent.py \
d9a64523 47 workqueue.py \
cb323159 48 ulock.py \
39236c6e
A
49 xnu.py \
50 xnudefines.py \
39037602
A
51 ktrace.py \
52 macho.py \
39236c6e
A
53 mbufdefines.py \
54 netdefines.py \
5ba3f43e 55 ntstat.py \
39236c6e
A
56 routedefines.py \
57 ipc.py \
fe8ab488 58 ipcimportancedetail.py \
3e170ce0 59 kcdata.py \
39236c6e 60 scheduler.py \
fe8ab488 61 structanalyze.py \
39236c6e
A
62 pmap.py \
63 memory.py \
64 mbufs.py \
65 net.py \
d9a64523 66 skywalk.py \
39236c6e
A
67 ioreg.py \
68 utils.py \
69 kdp.py \
70 process.py \
71 userspace.py \
72 pci.py \
73 misc.py \
3e170ce0 74 apic.py \
5ba3f43e 75 kasan.py \
3e170ce0
A
76 kauth.py \
77 usertaskgdbserver.py \
39037602
A
78 waitq.py \
79 pgtrace.py \
a39ff7e2 80 xnutriage.py \
cb323159 81 zonetriage.py \
c3c9b80d
A
82 sysreg.py \
83 counter.py
39236c6e 84
fe8ab488
A
85ifneq ($(PLATFORM),MacOSX)
86 LLDBMACROS_PYTHON_FILES+= \
87 plugins/iosspeedtracer.py \
88 plugins/iosspeedtracer.sh
89endif
90
d9a64523
A
91include $(MakeInc_rule)
92include $(MakeInc_dir)
5ba3f43e 93
39236c6e 94INSTALL_LLDBMACROS_PYTHON_FILES=$(addprefix $(LLDBMACROS_DEST), $(LLDBMACROS_PYTHON_FILES))
d9a64523
A
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)/))
39236c6e 97
d9a64523 98ifeq ($(BUILD_STATIC_LINK),1)
a991bd8d 99ifneq ($(BUILD_XNU_LIBRARY),1)
d9a64523
A
100INSTALL_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)/../))
103endif
a991bd8d 104endif
39236c6e 105
0a7de745 106ifeq ($(BUILD_STATIC_LINK),1)
a991bd8d 107ifneq ($(BUILD_XNU_LIBRARY),1)
0a7de745
A
108STATIC_DSYM_LLDBMACROS_INSTALL_TARGETS := \
109 $(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES) \
110 $(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME)
111endif
a991bd8d 112endif
0a7de745
A
113
114lldbmacros_install: $(INSTALL_LLDBMACROS_PYTHON_FILES) $(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME) $(STATIC_DSYM_LLDBMACROS_INSTALL_TARGETS)
d9a64523
A
115 $(_v)$(MKDIR) $(LLDBMACROS_DEST)/builtinkexts
116ifeq ($(BUILD_STATIC_LINK),1)
a991bd8d 117ifneq ($(BUILD_XNU_LIBRARY),1)
d9a64523
A
118 $(_v)$(MKDIR) $(KERNEL_STATIC_DSYM_LLDBMACROS)/builtinkexts
119endif
a991bd8d 120endif