1# $FreeBSD$ 2 3SYSDIR?= ${SRCTOP}/sys 4 5ARCHDIR= ${MACHINE_CPUARCH} 6 7.PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace 8.PATH: ${SYSDIR}/cddl/compat/opensolaris/kern 9.PATH: ${SYSDIR}/cddl/kern 10.PATH: ${SYSDIR}/cddl/dev/dtrace 11.PATH: ${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} 12 13KMOD= dtrace 14SRCS= dtrace.c \ 15 dtrace_xoroshiro128_plus.c \ 16 dtrace_asm.S \ 17 dtrace_subr.c 18 19.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" 20.PATH: ${SYSDIR}/cddl/dev/dtrace/x86 21SRCS+= dis_tables.c \ 22 instr_size.c 23CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/intel \ 24 -I${SYSDIR}/cddl/dev/dtrace/x86 25.endif 26 27.if ${MACHINE_CPUARCH} == "riscv" || ${MACHINE_CPUARCH} == "aarch64" 28SRCS+= instr_size.c 29.endif 30 31CFLAGS+= ${OPENZFS_CFLAGS} 32 33SRCS+= bus_if.h device_if.h vnode_if.h 34 35# Needed for dtrace_asm.S 36DPSRCS+= assym.inc 37 38# These are needed for assym.inc 39SRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h 40 41#This is needed for dtrace.c 42SRCS += opensolaris_taskq.c 43 44.if ${MACHINE_CPUARCH} == "i386" 45SRCS+= opt_apic.h 46.endif 47 48CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ 49 -I${SYSDIR}/cddl/dev/dtrace \ 50 -I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \ 51 -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ 52 -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ 53 -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ 54 -I${SYSDIR} -DDIS_MEM 55 56EXPORT_SYMS= YES 57 58dtrace_asm.o: assym.inc 59 60.include <bsd.kmod.mk> 61 62CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 63CFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE 64CWARNFLAGS+= -Wno-parentheses 65CWARNFLAGS+= -Wno-cast-qual 66CWARNFLAGS+= -Wno-unused 67