3 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common
4 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libgen/common
65 FILESDIR= /usr/lib/dtrace
66 FILESMODE= ${NOBINMODE}
68 INCSGROUPS= INCS SYSINCS
69 SYSINCSDIR= ${INCLUDEDIR}/sys
70 INCS+= ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h
71 SYSINCS+= ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
72 SYSINCS+= ${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h
77 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
78 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
79 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
80 CFLAGS+= -I${SRCTOP}/sys
81 CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
82 CFLAGS+= -DHAVE_ISSETUGID
85 CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \
86 -I${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH} \
87 -I${SRCTOP}/sys/cddl/dev/kinst \
88 -I${SRCTOP}/sys/cddl/compat/opensolaris \
89 -I${SRCTOP}/cddl/compat/opensolaris/include \
90 -I${OPENSOLARIS_USR_DISTDIR}/head \
91 -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
92 -I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
93 -I${OPENSOLARIS_SYS_DISTDIR}/uts/common
97 .if ${MACHINE_CPUARCH} == "aarch64"
98 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64
99 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/aarch64
100 .PATH: ${SRCTOP}/sys/cddl/dev/dtrace/aarch64
101 .elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
102 CFLAGS+= -I${SRCTOP}/sys/cddl/dev/dtrace/x86
103 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel -DDIS_MEM
104 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/i386
105 .PATH: ${SRCTOP}/sys/cddl/dev/dtrace/${MACHINE_ARCH}
106 .PATH: ${SRCTOP}/sys/cddl/dev/dtrace/x86
107 .elif ${MACHINE_CPUARCH} == "arm"
108 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
109 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/arm
110 .PATH: ${SRCTOP}/sys/cddl/dev/dtrace/arm
111 .elif ${MACHINE_CPUARCH} == "powerpc"
112 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/powerpc
113 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/powerpc
114 .PATH: ${SRCTOP}/sys/cddl/dev/dtrace/powerpc
115 .elif ${MACHINE_CPUARCH} == "riscv"
116 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/riscv
117 .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libdtrace/riscv
118 .PATH: ${SRCTOP}/sys/cddl/dev/dtrace/riscv
121 CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
124 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
125 SRCS+= dis_tables.c instr_size.c
129 .if ${MACHINE_CPUARCH} == "riscv"
134 .if ${MACHINE_CPUARCH} == "aarch64"
136 DSRCS+= regs_aarch64.d
141 LIBADD= ctf elf proc pthread rtld_db
143 CLEANFILES= dt_errtags.c dt_names.c
145 .include <bsd.lib.mk>
147 dt_errtags.c: ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h
148 sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${.ALLSRC} > ${.TARGET}
150 dt_names.c: ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h
151 sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${.ALLSRC} > ${.TARGET}