1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 2# $FreeBSD$ 3# 4# The include file <bsd.kmod.mk> handles building and installing loadable 5# kernel modules. 6# 7# 8# +++ variables +++ 9# 10# CLEANFILES Additional files to remove for the clean and cleandir targets. 11# 12# EXPORT_SYMS A list of symbols that should be exported from the module, 13# or the name of a file containing a list of symbols, or YES 14# to export all symbols. If not defined, no symbols are 15# exported. 16# 17# KMOD The name of the kernel module to build. 18# 19# KMODDIR Base path for kernel modules (see kld(4)). [/boot/kernel] 20# 21# KMODOWN Module file owner. [${BINOWN}] 22# 23# KMODGRP Module file group. [${BINGRP}] 24# 25# KMODMODE Module file mode. [${BINMODE}] 26# 27# KMODLOAD Command to load a kernel module [/sbin/kldload] 28# 29# KMODUNLOAD Command to unload a kernel module [/sbin/kldunload] 30# 31# KMODISLOADED Command to check whether a kernel module is 32# loaded [/sbin/kldstat -q -n] 33# 34# PROG The name of the kernel module to build. 35# If not supplied, ${KMOD}.ko is used. 36# 37# SRCS List of source files. 38# 39# FIRMWS List of firmware images in format filename:shortname:version 40# 41# FIRMWARE_LICENSE 42# Set to the name of the license the user has to agree on in 43# order to use this firmware. See /usr/share/doc/legal 44# 45# DESTDIR The tree where the module gets installed. [not set] 46# 47# KERNBUILDDIR Set to the location of the kernel build directory where 48# the opt_*.h files, .o's and kernel winds up. 49# 50# BLOB_OBJS Prebuilt binary blobs .o's from the src tree to be linked into 51# the module. These are precious and not removed in make clean. 52# 53# +++ targets +++ 54# 55# install: 56# install the kernel module; if the Makefile 57# does not itself define the target install, the targets 58# beforeinstall and afterinstall may also be used to cause 59# actions immediately before and after the install target 60# is executed. 61# 62# load: 63# Load a module. 64# 65# unload: 66# Unload a module. 67# 68# reload: 69# Unload if loaded, then load. 70# 71 72AWK?= awk 73KMODLOAD?= /sbin/kldload 74KMODUNLOAD?= /sbin/kldunload 75KMODISLOADED?= /sbin/kldstat -q -n 76OBJCOPY?= objcopy 77 78.include "kmod.opts.mk" 79.include <bsd.sysdir.mk> 80 81.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m 82 83# amd64 uses direct linking for kmod, all others use shared binaries 84.if ${MACHINE_CPUARCH} != amd64 85__KLD_SHARED=yes 86.else 87__KLD_SHARED=no 88.endif 89 90.if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) 91CFLAGS+= -fno-strict-aliasing 92.endif 93WERROR?= -Werror 94 95LINUXKPI_GENSRCS+= \ 96 backlight_if.h \ 97 bus_if.h \ 98 device_if.h \ 99 iicbus_if.h \ 100 iicbb_if.h \ 101 lkpi_iic_if.c \ 102 lkpi_iic_if.h \ 103 pci_if.h \ 104 pci_iov_if.h \ 105 pcib_if.h \ 106 vnode_if.h \ 107 usb_if.h \ 108 opt_usb.h \ 109 opt_stack.h 110 111CFLAGS+= ${WERROR} 112CFLAGS+= -D_KERNEL 113CFLAGS+= -DKLD_MODULE 114.if defined(MODULE_TIED) 115CFLAGS+= -DKLD_TIED 116.endif 117 118# Don't use any standard or source-relative include directories. 119NOSTDINC= -nostdinc 120CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} 121.if defined(KERNBUILDDIR) 122CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h 123.else 124SRCS+= opt_global.h 125CFLAGS+= -include ${.OBJDIR}/opt_global.h 126.endif 127 128# Add -I paths for system headers. Individual module makefiles don't 129# need any -I paths for this. Similar defaults for .PATH can't be 130# set because there are no standard paths for non-headers. 131CFLAGS+= -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include 132 133CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT} 134CFLAGS.gcc+= -fms-extensions 135CFLAGS.gcc+= --param inline-unit-growth=100 136CFLAGS.gcc+= --param large-function-growth=1000 137 138# Disallow common variables, and if we end up with commons from 139# somewhere unexpected, allocate storage for them in the module itself. 140# 141# -fno-common is the default for src builds, but this should be left in place 142# until at least we catch up to GCC10/LLVM11 or otherwise enable -fno-common 143# in <bsd.sys.mk> instead. For now, we will have duplicate -fno-common in 144# CFLAGS for in-tree module builds as they will also pick it up from 145# share/mk/src.sys.mk, but the following is important for out-of-tree modules 146# (e.g. ports). 147CFLAGS+= -fno-common 148.if ${LINKER_TYPE} != "lld" || ${LINKER_VERSION} < 140000 149# lld >= 14 warns that -d is deprecated, and will be removed. 150LDFLAGS+= -d 151.endif 152LDFLAGS+= -warn-common 153 154.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} 155LDFLAGS+= --build-id=sha1 156.endif 157 158CFLAGS+= ${DEBUG_FLAGS} 159.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 160CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer 161.endif 162 163.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \ 164 ${MACHINE_CPUARCH} == "powerpc" 165CFLAGS+= -fPIC 166.endif 167 168# Temporary workaround for PR 196407, which contains the fascinating details. 169# Don't allow clang to use fpu instructions or registers in kernel modules. 170.if ${MACHINE_CPUARCH} == arm 171CFLAGS.clang+= -mno-movt 172CFLAGS.clang+= -mfpu=none 173CFLAGS+= -funwind-tables 174.endif 175 176.if ${MACHINE_CPUARCH} == powerpc 177CFLAGS+= -mlongcall -fno-omit-frame-pointer 178.if ${LINKER_TYPE} == "lld" 179# TOC optimization in LLD (9.0) currently breaks kernel modules, so disable it 180LDFLAGS+= --no-toc-optimize 181.endif 182.endif 183 184.if defined(DEBUG) || defined(DEBUG_FLAGS) 185CTFFLAGS+= -g 186.endif 187 188.if defined(FIRMWS) 189${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk 190 ${AWK} -f ${SYSDIR}/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} \ 191 ${FIRMWARE_LICENSE:C/.+/-l/}${FIRMWARE_LICENSE} 192 193SRCS+= ${KMOD:S/$/.c/} 194CLEANFILES+= ${KMOD:S/$/.c/} 195 196.for _firmw in ${FIRMWS} 197${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} ${SYSDIR}/kern/firmw.S 198 @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} 199 ${CC:N${CCACHE_BIN}} -c -x assembler-with-cpp -DLOCORE \ 200 ${CFLAGS} ${WERROR} \ 201 -DFIRMW_FILE="${.ALLSRC:M*${_firmw:C/\:.*$//}}" \ 202 -DFIRMW_SYMBOL="${_firmw:C/\:.*$//:C/[-.\/]/_/g}" \ 203 ${SYSDIR}/kern/firmw.S -o ${.TARGET} 204 205OBJS+= ${_firmw:C/\:.*$/.fwo/:T} 206.endfor 207.endif 208 209# Conditionally include SRCS based on kernel config options. 210.for _o in ${KERN_OPTS} 211SRCS+=${SRCS.${_o}} 212.endfor 213 214OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 215 216.if !defined(PROG) 217PROG= ${KMOD}.ko 218.endif 219 220.if !defined(DEBUG_FLAGS) || ${MK_KERNEL_SYMBOLS} == "no" 221FULLPROG= ${PROG} 222.else 223FULLPROG= ${PROG}.full 224${PROG}: ${FULLPROG} ${PROG}.debug 225 ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \ 226 ${FULLPROG} ${.TARGET} 227${PROG}.debug: ${FULLPROG} 228 ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} 229.endif 230 231.if ${__KLD_SHARED} == yes 232${FULLPROG}: ${KMOD}.kld 233 ${LD} -m ${LD_EMULATION} -Bshareable -znotext -znorelro ${_LDFLAGS} \ 234 -o ${.TARGET} ${KMOD}.kld 235.if !defined(DEBUG_FLAGS) 236 ${OBJCOPY} --strip-debug ${.TARGET} 237.endif 238.endif 239 240EXPORT_SYMS?= NO 241.if ${EXPORT_SYMS} != YES 242CLEANFILES+= export_syms 243.endif 244 245.if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE}) 246LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE} 247.endif 248 249.if ${__KLD_SHARED} == yes 250${KMOD}.kld: ${OBJS} ${BLOB_OBJS} 251.else 252${FULLPROG}: ${OBJS} ${BLOB_OBJS} 253.endif 254 ${LD} -m ${LD_EMULATION} ${_LDFLAGS} ${LDSCRIPT_FLAGS} -r \ 255 -o ${.TARGET} ${OBJS} ${BLOB_OBJS} 256.if ${MK_CTF} != "no" 257 ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} ${BLOB_OBJS} 258.endif 259.if defined(EXPORT_SYMS) 260.if ${EXPORT_SYMS} != YES 261.if ${EXPORT_SYMS} == NO 262 :> export_syms 263.elif !exists(${.CURDIR}/${EXPORT_SYMS}) 264 echo -n "${EXPORT_SYMS:@s@$s${.newline}@}" > export_syms 265.else 266 grep -v '^#' < ${EXPORT_SYMS} > export_syms 267.endif 268 ${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ 269 export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} 270.endif 271.endif # defined(EXPORT_SYMS) 272.if defined(PREFIX_SYMS) 273 ${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \ 274 ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET} 275.endif 276.if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no 277 ${OBJCOPY} --strip-debug ${.TARGET} 278.endif 279 280_MAP_DEBUG_PREFIX= yes 281 282_ILINKS=machine 283.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 284_ILINKS+=x86 285.endif 286CLEANFILES+=${_ILINKS} 287 288all: ${PROG} 289 290beforedepend: ${_ILINKS} 291beforebuild: ${_ILINKS} 292 293# Ensure that the links exist without depending on it when it exists which 294# causes all the modules to be rebuilt when the directory pointed to changes. 295# Ensure that debug info references the path in the source tree. 296.for _link in ${_ILINKS} 297.if !exists(${.OBJDIR}/${_link}) 298OBJS_DEPEND_GUESS+= ${_link} 299.endif 300.if defined(_MAP_DEBUG_PREFIX) 301.if ${_link} == "machine" 302CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include 303.else 304CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include 305.endif 306.endif 307.endfor 308 309.NOPATH: ${_ILINKS} 310 311${_ILINKS}: 312 @case ${.TARGET} in \ 313 machine) \ 314 path=${SYSDIR}/${MACHINE}/include ;; \ 315 *) \ 316 path=${SYSDIR}/${.TARGET:T}/include ;; \ 317 esac ; \ 318 path=`realpath $$path`; \ 319 ${ECHO} ${.TARGET:T} "->" $$path ; \ 320 ln -fns $$path ${.TARGET:T} 321 322CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} 323 324.if defined(DEBUG_FLAGS) && ${MK_KERNEL_SYMBOLS} != "no" 325CLEANFILES+= ${FULLPROG} ${PROG}.debug 326.endif 327 328.if !target(install) 329 330_INSTALLFLAGS:= ${INSTALLFLAGS} 331.for ie in ${INSTALLFLAGS_EDIT} 332_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} 333.endfor 334 335.if !target(realinstall) 336KERN_DEBUGDIR?= ${DEBUGDIR} 337realinstall: _kmodinstall 338.ORDER: beforeinstall _kmodinstall 339_kmodinstall: .PHONY 340 ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ 341 ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/ 342.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" 343 ${INSTALL} -T dbg -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ 344 ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/ 345.endif 346 347.include <bsd.links.mk> 348 349.if !defined(NO_XREF) 350afterinstall: _kldxref 351.ORDER: realinstall _kldxref 352.ORDER: _installlinks _kldxref 353_kldxref: .PHONY 354 @if type kldxref >/dev/null 2>&1; then \ 355 ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ 356 ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ 357 fi 358.endif 359.endif # !target(realinstall) 360 361.endif # !target(install) 362 363.if !target(load) 364load: ${PROG} .PHONY 365 ${KMODLOAD} -v ${.OBJDIR}/${PROG} 366.endif 367 368.if !target(unload) 369unload: .PHONY 370 if ${KMODISLOADED} ${PROG} ; then ${KMODUNLOAD} -v ${PROG} ; fi 371.endif 372 373.if !target(reload) 374reload: unload load .PHONY 375.endif 376 377.if defined(KERNBUILDDIR) 378.PATH: ${KERNBUILDDIR} 379CFLAGS+= -I${KERNBUILDDIR} 380.for _src in ${SRCS:Mopt_*.h} 381CLEANFILES+= ${_src} 382.if !target(${_src}) 383${_src}: 384 ln -sf ${KERNBUILDDIR}/${_src} ${.TARGET} 385.endif 386.endfor 387.else 388.for _src in ${SRCS:Mopt_*.h} 389CLEANFILES+= ${_src} 390.if !target(${_src}) 391${_src}: 392 :> ${.TARGET} 393.endif 394.endfor 395.endif 396 397# Add the sanitizer C flags 398CFLAGS+= ${SAN_CFLAGS} 399 400# Add the gcov flags 401CFLAGS+= ${GCOV_CFLAGS} 402 403# Respect configuration-specific C flags. 404CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS} 405 406.if !empty(SRCS:Mvnode_if.c) 407CLEANFILES+= vnode_if.c 408vnode_if.c: ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src 409 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -c 410.endif 411 412.if !empty(SRCS:Mvnode_if.h) 413CLEANFILES+= vnode_if.h vnode_if_newproto.h vnode_if_typedef.h 414vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: ${SYSDIR}/tools/vnode_if.awk \ 415 ${SYSDIR}/kern/vnode_if.src 416vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h 417 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -h 418vnode_if_newproto.h: 419 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -p 420vnode_if_typedef.h: 421 ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -q 422.endif 423 424# Build _if.[ch] from _if.m, and clean them when we're done. 425# __MPATH defined in config.mk 426_MFILES=${__MPATH:T:O} 427_MPATH=${__MPATH:H:O:u} 428.PATH.m: ${_MPATH} 429.for _i in ${SRCS:M*_if.[ch]} 430_MATCH=M${_i:R:S/$/.m/} 431_MATCHES=${_MFILES:${_MATCH}} 432.if !empty(_MATCHES) 433CLEANFILES+= ${_i} 434.endif 435.endfor # _i 436.m.c: ${SYSDIR}/tools/makeobjops.awk 437 ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c 438 439.m.h: ${SYSDIR}/tools/makeobjops.awk 440 ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h 441 442.for _i in mii pccard 443.if !empty(SRCS:M${_i}devs.h) 444CLEANFILES+= ${_i}devs.h 445${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs 446 ${AWK} -f ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs 447.endif 448.endfor # _i 449 450.if !empty(SRCS:Mbhnd_nvram_map.h) 451CLEANFILES+= bhnd_nvram_map.h 452bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ 453 ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 454 ${SYSDIR}/dev/bhnd/nvram/nvram_map 455bhnd_nvram_map.h: 456 sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 457 ${SYSDIR}/dev/bhnd/nvram/nvram_map -h 458.endif 459 460.if !empty(SRCS:Mbhnd_nvram_map_data.h) 461CLEANFILES+= bhnd_nvram_map_data.h 462bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ 463 ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 464 ${SYSDIR}/dev/bhnd/nvram/nvram_map 465bhnd_nvram_map_data.h: 466 sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ 467 ${SYSDIR}/dev/bhnd/nvram/nvram_map -d 468.endif 469 470.if !empty(SRCS:Musbdevs.h) 471CLEANFILES+= usbdevs.h 472usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs 473 ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -h 474.endif 475 476.if !empty(SRCS:Musbdevs_data.h) 477CLEANFILES+= usbdevs_data.h 478usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs 479 ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -d 480.endif 481 482.if !empty(SRCS:Msdiodevs.h) 483CLEANFILES+= sdiodevs.h 484sdiodevs.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs 485 ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -h 486.endif 487 488.if !empty(SRCS:Msdiodevs_data.h) 489CLEANFILES+= sdiodevs_data.h 490sdiodevs_data.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs 491 ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -d 492.endif 493 494.if !empty(SRCS:Macpi_quirks.h) 495CLEANFILES+= acpi_quirks.h 496acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks 497 ${AWK} -f ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks 498.endif 499 500.if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) 501CLEANFILES+= assym.inc genassym.o 502DEPENDOBJS+= genassym.o 503DPSRCS+= offset.inc 504.endif 505.if defined(MODULE_TIED) 506DPSRCS+= offset.inc 507.endif 508.if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc) 509CLEANFILES+= offset.inc genoffset.o 510DEPENDOBJS+= genoffset.o 511.endif 512assym.inc: genassym.o 513offset.inc: genoffset.o 514assym.inc: ${SYSDIR}/kern/genassym.sh 515 sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} 516genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc 517genassym.o: ${SRCS:Mopt_*.h} 518 ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ 519 ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c 520offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o 521 sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} 522genoffset.o: ${SYSDIR}/kern/genoffset.c 523genoffset.o: ${SRCS:Mopt_*.h} 524 ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ 525 ${SYSDIR}/kern/genoffset.c 526 527CLEANDEPENDFILES+= ${_ILINKS} 528# .depend needs include links so we remove them only together. 529cleanilinks: 530 rm -f ${_ILINKS} 531 532OBJS_DEPEND_GUESS+= ${SRCS:M*.h} 533.if defined(KERNBUILDDIR) 534OBJS_DEPEND_GUESS+= opt_global.h 535.endif 536 537ZINCDIR=${SYSDIR}/contrib/openzfs/include 538OPENZFS_CFLAGS= \ 539 -D_SYS_VMEM_H_ \ 540 -D__KERNEL__ \ 541 -nostdinc \ 542 -DSMP \ 543 -I${ZINCDIR} \ 544 -I${ZINCDIR}/os/freebsd \ 545 -I${ZINCDIR}/os/freebsd/spl \ 546 -I${ZINCDIR}/os/freebsd/zfs \ 547 -I${SYSDIR}/cddl/compat/opensolaris \ 548 -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ 549 -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h 550OPENZFS_CWARNFLAGS= \ 551 -Wno-nested-externs 552 553.include <bsd.dep.mk> 554.include <bsd.clang-analyze.mk> 555.include <bsd.obj.mk> 556.include "kern.mk" 557