1b8915e90SJohn Birrell# $FreeBSD$ 2b8915e90SJohn Birrell 3193d9e76SEnji CooperSYSDIR?= ${SRCTOP}/sys 450dd852bSMarcel Moolenaar 5c09808d0SWarner LoshARCHDIR= ${MACHINE_CPUARCH} 6b8915e90SJohn Birrell 750dd852bSMarcel Moolenaar.PATH: ${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace 850dd852bSMarcel Moolenaar.PATH: ${SYSDIR}/cddl/compat/opensolaris/kern 950dd852bSMarcel Moolenaar.PATH: ${SYSDIR}/cddl/kern 1050dd852bSMarcel Moolenaar.PATH: ${SYSDIR}/cddl/dev/dtrace 1150dd852bSMarcel Moolenaar.PATH: ${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} 12b8915e90SJohn Birrell 13b8915e90SJohn BirrellKMOD= dtrace 14b8915e90SJohn BirrellSRCS= dtrace.c \ 1500bb01a4SGeorge V. Neville-Neil dtrace_xoroshiro128_plus.c \ 16b8915e90SJohn Birrell dtrace_asm.S \ 17b8915e90SJohn Birrell dtrace_subr.c 18b8915e90SJohn Birrell 19c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" 2050dd852bSMarcel Moolenaar.PATH: ${SYSDIR}/cddl/dev/dtrace/x86 21b8915e90SJohn BirrellSRCS+= dis_tables.c \ 22b8915e90SJohn Birrell instr_size.c 2350dd852bSMarcel MoolenaarCFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/intel \ 2457c24230SRui Paulo -I${SYSDIR}/cddl/dev/dtrace/x86 25b8915e90SJohn Birrell.endif 26*080e56a6SChristos Margiolis 27*080e56a6SChristos Margiolis.if ${MACHINE_CPUARCH} == "riscv" 28*080e56a6SChristos MargiolisSRCS+= instr_size.c 29*080e56a6SChristos Margiolis.endif 30*080e56a6SChristos Margiolis 319e5787d2SMatt MacyCFLAGS+= ${OPENZFS_CFLAGS} 32b8915e90SJohn Birrell 33b8915e90SJohn BirrellSRCS+= bus_if.h device_if.h vnode_if.h 34b8915e90SJohn Birrell 35b8915e90SJohn Birrell# Needed for dtrace_asm.S 36fc2a8776SEd MasteDPSRCS+= assym.inc 37b8915e90SJohn Birrell 38fc2a8776SEd Maste# These are needed for assym.inc 396469bdcdSBrooks DavisSRCS+= opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h 40b8915e90SJohn Birrell 419f4c7ba4SPedro F. Giffuni#This is needed for dtrace.c 429f4c7ba4SPedro F. GiffuniSRCS += opensolaris_taskq.c 439f4c7ba4SPedro F. Giffuni 44c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "i386" 45b8915e90SJohn BirrellSRCS+= opt_apic.h 46b8915e90SJohn Birrell.endif 47b8915e90SJohn Birrell 4850dd852bSMarcel MoolenaarCFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ 4950dd852bSMarcel Moolenaar -I${SYSDIR}/cddl/dev/dtrace \ 5050dd852bSMarcel Moolenaar -I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \ 5150dd852bSMarcel Moolenaar -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ 5200bb01a4SGeorge V. Neville-Neil -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ 53d18aa577SRui Paulo -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ 5450dd852bSMarcel Moolenaar -I${SYSDIR} -DDIS_MEM 55b8915e90SJohn Birrell 568a693ccfSMark JohnstonEXPORT_SYMS= YES 57b8915e90SJohn Birrell 58fc2a8776SEd Mastedtrace_asm.o: assym.inc 59a4e40567SEitan Adler 60b8915e90SJohn Birrell.include <bsd.kmod.mk> 61e97c96b7SAndriy Gapon 6250dd852bSMarcel MoolenaarCFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h 639e5787d2SMatt MacyCFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE 64e97c96b7SAndriy GaponCWARNFLAGS+= -Wno-parentheses 655d7430f0SAndriy GaponCWARNFLAGS+= -Wno-cast-qual 66c319ea15SAndriy GaponCWARNFLAGS+= -Wno-unused 67