xref: /xnu-10002.1.13/tools/lldbmacros/Makefile (revision 1031c584a5e37aff177559b9f69dbd3c8c3fd30a)
1*1031c584SApple OSS Distributionsexport MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2*1031c584SApple OSS Distributionsexport MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3*1031c584SApple OSS Distributionsexport MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4*1031c584SApple OSS Distributionsexport MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5*1031c584SApple OSS Distributions
6*1031c584SApple OSS Distributionsinclude $(MakeInc_cmd)
7*1031c584SApple OSS Distributionsinclude $(MakeInc_def)
8*1031c584SApple OSS Distributions
9*1031c584SApple OSS Distributions.PHONY: lldbmacros_install
10*1031c584SApple OSS Distributions
11*1031c584SApple OSS Distributionsdo_config_all:: lldbmacros_install
12*1031c584SApple OSS Distributions
13*1031c584SApple OSS DistributionsLLDBMACROS_SOURCE:=$(SRCROOT)/tools/lldbmacros/
14*1031c584SApple OSS DistributionsLLDBMACROS_BOOTSTRAP_DEST:=$(OBJPATH)/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)
15*1031c584SApple OSS DistributionsLLDBMACROS_DEST:=$(LLDBMACROS_BOOTSTRAP_DEST)/lldbmacros/
16*1031c584SApple OSS DistributionsLLDBMACROS_USERDEBUG_FILES=
17*1031c584SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1)
18*1031c584SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1)
19*1031c584SApple OSS DistributionsKERNEL_STATIC_DSYM_LLDBMACROS := $(OBJPATH)/$(KERNEL_FILE_NAME).link/$(KERNEL_FILE_NAME).dSYM/$(DSYMLLDBMACROSDIR)/lldbmacros/
20*1031c584SApple OSS Distributionsendif
21*1031c584SApple OSS Distributionsendif
22*1031c584SApple OSS Distributions
23*1031c584SApple OSS DistributionsLLDBMACROS_USERDEBUG_FILES:= \
24*1031c584SApple OSS Distributions	usertaskdebugging/__init__.py \
25*1031c584SApple OSS Distributions	usertaskdebugging/gdbserver.py \
26*1031c584SApple OSS Distributions	usertaskdebugging/interface.py \
27*1031c584SApple OSS Distributions	usertaskdebugging/rsprotocol.py \
28*1031c584SApple OSS Distributions	usertaskdebugging/target.py \
29*1031c584SApple OSS Distributions	usertaskdebugging/userprocess.py
30*1031c584SApple OSS Distributions
31*1031c584SApple OSS DistributionsLLDBMACROS_PYTHON_FILES = $(LLDBMACROS_USERDEBUG_FILES) \
32*1031c584SApple OSS Distributions	core/__init__.py \
33*1031c584SApple OSS Distributions	core/caching.py \
34*1031c584SApple OSS Distributions	core/collections.py \
35*1031c584SApple OSS Distributions	core/compat.py \
36*1031c584SApple OSS Distributions	core/configuration.py \
37*1031c584SApple OSS Distributions	core/cvalue.py \
38*1031c584SApple OSS Distributions	core/io.py \
39*1031c584SApple OSS Distributions	core/kernelcore.py \
40*1031c584SApple OSS Distributions	core/lazytarget.py \
41*1031c584SApple OSS Distributions	core/lldbwrap.py \
42*1031c584SApple OSS Distributions	core/operating_system.py \
43*1031c584SApple OSS Distributions	core/pointer.py \
44*1031c584SApple OSS Distributions	core/standard.py \
45*1031c584SApple OSS Distributions	core/xnu_lldb_init.py \
46*1031c584SApple OSS Distributions	kmemory/__init__.py \
47*1031c584SApple OSS Distributions	kmemory/btlog.py \
48*1031c584SApple OSS Distributions	kmemory/kmem.py \
49*1031c584SApple OSS Distributions	kmemory/vm.py \
50*1031c584SApple OSS Distributions	kmemory/whatis.py \
51*1031c584SApple OSS Distributions	kmemory/zone.py \
52*1031c584SApple OSS Distributions	plugins/__init__.py \
53*1031c584SApple OSS Distributions	plugins/zprint_perf_log.py \
54*1031c584SApple OSS Distributions	sysregdoc/AArch64-esr_el1.xml \
55*1031c584SApple OSS Distributions	bank.py \
56*1031c584SApple OSS Distributions	turnstile.py \
57*1031c584SApple OSS Distributions	kevent.py \
58*1031c584SApple OSS Distributions	workqueue.py \
59*1031c584SApple OSS Distributions	ulock.py \
60*1031c584SApple OSS Distributions	xnu.py \
61*1031c584SApple OSS Distributions	xnudefines.py \
62*1031c584SApple OSS Distributions	ktrace.py \
63*1031c584SApple OSS Distributions	macho.py \
64*1031c584SApple OSS Distributions	mbufdefines.py \
65*1031c584SApple OSS Distributions	netdefines.py \
66*1031c584SApple OSS Distributions	ntstat.py \
67*1031c584SApple OSS Distributions	routedefines.py \
68*1031c584SApple OSS Distributions	ipc.py \
69*1031c584SApple OSS Distributions	ipcimportancedetail.py \
70*1031c584SApple OSS Distributions	kcdata.py \
71*1031c584SApple OSS Distributions	scheduler.py \
72*1031c584SApple OSS Distributions	structanalyze.py \
73*1031c584SApple OSS Distributions	pmap.py \
74*1031c584SApple OSS Distributions	memory.py \
75*1031c584SApple OSS Distributions	mbufs.py \
76*1031c584SApple OSS Distributions	net.py \
77*1031c584SApple OSS Distributions	skywalk.py \
78*1031c584SApple OSS Distributions	ioreg.py \
79*1031c584SApple OSS Distributions	utils.py \
80*1031c584SApple OSS Distributions	kdp.py \
81*1031c584SApple OSS Distributions	process.py \
82*1031c584SApple OSS Distributions	userspace.py \
83*1031c584SApple OSS Distributions	pci.py \
84*1031c584SApple OSS Distributions	misc.py \
85*1031c584SApple OSS Distributions	apic.py \
86*1031c584SApple OSS Distributions	kasan.py \
87*1031c584SApple OSS Distributions	kauth.py \
88*1031c584SApple OSS Distributions	usertaskgdbserver.py \
89*1031c584SApple OSS Distributions	waitq.py \
90*1031c584SApple OSS Distributions	xnutriage.py \
91*1031c584SApple OSS Distributions	kmtriage.py \
92*1031c584SApple OSS Distributions	zonetriage.py \
93*1031c584SApple OSS Distributions	recount.py \
94*1031c584SApple OSS Distributions	sysreg.py \
95*1031c584SApple OSS Distributions	counter.py \
96*1031c584SApple OSS Distributions	refgrp.py \
97*1031c584SApple OSS Distributions	workload.py \
98*1031c584SApple OSS Distributions	log.py \
99*1031c584SApple OSS Distributions	kext.py
100*1031c584SApple OSS Distributions
101*1031c584SApple OSS Distributionsifneq ($(PLATFORM),MacOSX)
102*1031c584SApple OSS Distributions	LLDBMACROS_PYTHON_FILES+= \
103*1031c584SApple OSS Distributions		plugins/iosspeedtracer.py \
104*1031c584SApple OSS Distributions		plugins/iosspeedtracer.sh
105*1031c584SApple OSS Distributionsendif
106*1031c584SApple OSS Distributions
107*1031c584SApple OSS Distributions
108*1031c584SApple OSS Distributionsinclude $(MakeInc_rule)
109*1031c584SApple OSS Distributionsinclude $(MakeInc_dir)
110*1031c584SApple OSS Distributions
111*1031c584SApple OSS Distributions# Strip macros during install (default)
112*1031c584SApple OSS Distributionsifeq ($(SKIP_LLDBMACROS_UNIFDEF),1)
113*1031c584SApple OSS Distributions	LLDBMACROS_UNIFDEF :=
114*1031c584SApple OSS Distributionselse
115*1031c584SApple OSS Distributions	LLDBMACROS_UNIFDEF := $(DATA_UNIFDEF)
116*1031c584SApple OSS Distributionsendif
117*1031c584SApple OSS Distributions
118*1031c584SApple OSS DistributionsINSTALL_LLDBMACROS_PYTHON_FILES=$(addprefix $(LLDBMACROS_DEST), $(LLDBMACROS_PYTHON_FILES))
119*1031c584SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(INSTALL_LLDBMACROS_PYTHON_FILES),$(LLDBMACROS_SOURCE)%,pydir,$(LLDBMACROS_UNIFDEF),$(LLDBMACROS_DEST)))
120*1031c584SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME),$(LLDBMACROS_SOURCE)/core/xnu_lldb_init.py,kbpydir,$(LLDBMACROS_UNIFDEF),$(LLDBMACROS_BOOTSTRAP_DEST)/))
121*1031c584SApple OSS Distributions
122*1031c584SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1)
123*1031c584SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1)
124*1031c584SApple OSS DistributionsINSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES=$(addprefix $(KERNEL_STATIC_DSYM_LLDBMACROS), $(LLDBMACROS_PYTHON_FILES))
125*1031c584SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES),$(LLDBMACROS_SOURCE)%,sdpydir,$(LLDBMACROS_UNIFDEF),$(KERNEL_STATIC_DSYM_LLDBMACROS)))
126*1031c584SApple OSS Distributions$(eval $(call INSTALLPYTHON_RULE_template,$(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME),$(LLDBMACROS_SOURCE)/core/xnu_lldb_init.py,kbsdpydir,$(LLDBMACROS_UNIFDEF),$(KERNEL_STATIC_DSYM_LLDBMACROS)/../))
127*1031c584SApple OSS Distributionsendif
128*1031c584SApple OSS Distributionsendif
129*1031c584SApple OSS Distributions
130*1031c584SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1)
131*1031c584SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1)
132*1031c584SApple OSS DistributionsSTATIC_DSYM_LLDBMACROS_INSTALL_TARGETS := \
133*1031c584SApple OSS Distributions	$(INSTALL_STATIC_DSYM_LLDBMACROS_PYTHON_FILES) \
134*1031c584SApple OSS Distributions	$(KERNEL_STATIC_DSYM_LLDBMACROS)/../$(KERNEL_LLDBBOOTSTRAP_NAME)
135*1031c584SApple OSS Distributionsendif
136*1031c584SApple OSS Distributionsendif
137*1031c584SApple OSS Distributions
138*1031c584SApple OSS Distributionslldbmacros_install: $(INSTALL_LLDBMACROS_PYTHON_FILES) $(LLDBMACROS_BOOTSTRAP_DEST)/$(KERNEL_LLDBBOOTSTRAP_NAME) $(STATIC_DSYM_LLDBMACROS_INSTALL_TARGETS)
139*1031c584SApple OSS Distributions	$(_v)$(MKDIR) $(LLDBMACROS_DEST)/builtinkexts
140*1031c584SApple OSS Distributionsifeq ($(BUILD_STATIC_LINK),1)
141*1031c584SApple OSS Distributionsifneq ($(BUILD_XNU_LIBRARY),1)
142*1031c584SApple OSS Distributions	$(_v)$(MKDIR) $(KERNEL_STATIC_DSYM_LLDBMACROS)/builtinkexts
143*1031c584SApple OSS Distributionsendif
144*1031c584SApple OSS Distributionsendif
145