1# $FreeBSD$ 2 3SYSDIR?= ${.CURDIR}/../../.. 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_asm.S \ 16 dtrace_subr.c 17 18.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" 19.PATH: ${SYSDIR}/cddl/dev/dtrace/x86 20SRCS+= dis_tables.c \ 21 instr_size.c 22CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/intel \ 23 -I${SYSDIR}/cddl/dev/dtrace/x86 24.endif 25 26SRCS+= bus_if.h device_if.h vnode_if.h 27 28# Needed for dtrace_asm.S 29SRCS+= assym.s 30 31# These are needed for assym.s 32SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h 33 34#This is needed for dtrace.c 35SRCS += opensolaris_taskq.c 36 37.if ${MACHINE_CPUARCH} == "i386" 38SRCS+= opt_apic.h 39.endif 40 41CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ 42 -I${SYSDIR}/cddl/dev/dtrace \ 43 -I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \ 44 -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ 45 -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ 46 -I${SYSDIR} -DDIS_MEM 47 48CFLAGS+= -DSMP 49 50EXPORT_SYMS= dtrace_register \ 51 dtrace_unregister \ 52 dtrace_probe_lookup 53 54dtrace_asm.o: assym.s 55 56.include <bsd.kmod.mk> 57 58CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 59 60CWARNFLAGS+= -Wno-parentheses 61CWARNFLAGS+= -Wno-uninitialized 62CWARNFLAGS+= -Wno-cast-qual 63CWARNFLAGS+= -Wno-unused 64