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