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 27SRCS+= bus_if.h device_if.h vnode_if.h 28 29# Needed for dtrace_asm.S 30SRCS+= assym.s 31 32# These are needed for assym.s 33SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h 34 35#This is needed for dtrace.c 36SRCS += opensolaris_taskq.c 37 38.if ${MACHINE_CPUARCH} == "i386" 39SRCS+= opt_apic.h 40.endif 41 42CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ 43 -I${SYSDIR}/cddl/dev/dtrace \ 44 -I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \ 45 -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ 46 -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ 47 -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ 48 -I${SYSDIR} -DDIS_MEM 49 50CFLAGS+= -DSMP 51 52EXPORT_SYMS= dtrace_register \ 53 dtrace_unregister \ 54 dtrace_probe_lookup 55 56dtrace_asm.o: assym.s 57 58.if ${MACHINE_CPUARCH} == "arm" 59assym.o: assym.s 60 ${AS} -meabi=5 -o assym.o assym.s 61.endif 62 63.if ${MACHINE_CPUARCH} == "riscv" 64assym.o: assym.s 65.if ${TARGET_ARCH:Mriscv*sf} 66 ${AS} -mfloat-abi=soft -o assym.o assym.s 67.else 68 ${AS} -mfloat-abi=double -o assym.o assym.s 69.endif 70.endif 71 72.include <bsd.kmod.mk> 73 74CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 75 76CWARNFLAGS+= -Wno-parentheses 77CWARNFLAGS+= -Wno-uninitialized 78CWARNFLAGS+= -Wno-cast-qual 79CWARNFLAGS+= -Wno-unused 80