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 30DPSRCS+= assym.inc 31 32# These are needed for assym.inc 33SRCS+= 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.inc 57 58.include <bsd.kmod.mk> 59 60CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 61 62CWARNFLAGS+= -Wno-parentheses 63CWARNFLAGS+= -Wno-uninitialized 64CWARNFLAGS+= -Wno-cast-qual 65CWARNFLAGS+= -Wno-unused 66