diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 7ec3c918d5d8..b9f3a6ce006d 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -1,559 +1,562 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 # $FreeBSD$ # # The include file handles building and installing loadable # kernel modules. # # # +++ variables +++ # # CLEANFILES Additional files to remove for the clean and cleandir targets. # # EXPORT_SYMS A list of symbols that should be exported from the module, # or the name of a file containing a list of symbols, or YES # to export all symbols. If not defined, no symbols are # exported. # # KMOD The name of the kernel module to build. # # KMODDIR Base path for kernel modules (see kld(4)). [/boot/kernel] # # KMODOWN Module file owner. [${BINOWN}] # # KMODGRP Module file group. [${BINGRP}] # # KMODMODE Module file mode. [${BINMODE}] # # KMODLOAD Command to load a kernel module [/sbin/kldload] # # KMODUNLOAD Command to unload a kernel module [/sbin/kldunload] # # KMODISLOADED Command to check whether a kernel module is # loaded [/sbin/kldstat -q -n] # # PROG The name of the kernel module to build. # If not supplied, ${KMOD}.ko is used. # # SRCS List of source files. # # FIRMWS List of firmware images in format filename:shortname:version # # FIRMWARE_LICENSE # Set to the name of the license the user has to agree on in # order to use this firmware. See /usr/share/doc/legal # # DESTDIR The tree where the module gets installed. [not set] # # KERNBUILDDIR Set to the location of the kernel build directory where # the opt_*.h files, .o's and kernel winds up. # # BLOB_OBJS Prebuilt binary blobs .o's from the src tree to be linked into # the module. These are precious and not removed in make clean. # # +++ targets +++ # # install: # install the kernel module; if the Makefile # does not itself define the target install, the targets # beforeinstall and afterinstall may also be used to cause # actions immediately before and after the install target # is executed. # # load: # Load a module. # # unload: # Unload a module. # # reload: # Unload if loaded, then load. # AWK?= awk KMODLOAD?= /sbin/kldload KMODUNLOAD?= /sbin/kldunload KMODISLOADED?= /sbin/kldstat -q -n OBJCOPY?= objcopy .include "kmod.opts.mk" .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m # amd64 uses direct linking for kmod, all others use shared binaries .if ${MACHINE_CPUARCH} != amd64 __KLD_SHARED=yes .else __KLD_SHARED=no .endif .if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing .endif WERROR?= -Werror LINUXKPI_GENSRCS+= \ backlight_if.h \ bus_if.h \ device_if.h \ iicbus_if.h \ iicbb_if.h \ lkpi_iic_if.c \ lkpi_iic_if.h \ pci_if.h \ pci_iov_if.h \ pcib_if.h \ vnode_if.h \ usb_if.h \ opt_usb.h \ opt_stack.h +LINUXKPI_INCLUDES+= \ + -I${SYSDIR}/compat/linuxkpi/common/include + CFLAGS+= ${WERROR} CFLAGS+= -D_KERNEL CFLAGS+= -DKLD_MODULE .if defined(MODULE_TIED) CFLAGS+= -DKLD_TIED .endif # Don't use any standard or source-relative include directories. NOSTDINC= -nostdinc CFLAGS:= ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*} .if defined(KERNBUILDDIR) CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h .else SRCS+= opt_global.h CFLAGS+= -include ${.OBJDIR}/opt_global.h .endif # Add -I paths for system headers. Individual module makefiles don't # need any -I paths for this. Similar defaults for .PATH can't be # set because there are no standard paths for non-headers. CFLAGS+= -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT} CFLAGS.gcc+= -fms-extensions CFLAGS.gcc+= --param inline-unit-growth=100 CFLAGS.gcc+= --param large-function-growth=1000 # Disallow common variables, and if we end up with commons from # somewhere unexpected, allocate storage for them in the module itself. # # -fno-common is the default for src builds, but this should be left in place # until at least we catch up to GCC10/LLVM11 or otherwise enable -fno-common # in instead. For now, we will have duplicate -fno-common in # CFLAGS for in-tree module builds as they will also pick it up from # share/mk/src.sys.mk, but the following is important for out-of-tree modules # (e.g. ports). CFLAGS+= -fno-common .if ${LINKER_TYPE} != "lld" || ${LINKER_VERSION} < 140000 # lld >= 14 warns that -d is deprecated, and will be removed. LDFLAGS+= -d .endif LDFLAGS+= -warn-common .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} LDFLAGS+= --build-id=sha1 .endif CFLAGS+= ${DEBUG_FLAGS} .if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64 CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv" || \ ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -fPIC .endif # Temporary workaround for PR 196407, which contains the fascinating details. # Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm CFLAGS.clang+= -mno-movt CFLAGS.clang+= -mfpu=none CFLAGS+= -funwind-tables .endif .if ${MACHINE_CPUARCH} == powerpc CFLAGS+= -mlongcall -fno-omit-frame-pointer .if ${LINKER_TYPE} == "lld" # TOC optimization in LLD (9.0) currently breaks kernel modules, so disable it LDFLAGS+= --no-toc-optimize .endif .endif .if defined(DEBUG) || defined(DEBUG_FLAGS) CTFFLAGS+= -g .endif .if defined(FIRMWS) ${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk ${AWK} -f ${SYSDIR}/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} \ ${FIRMWARE_LICENSE:C/.+/-l/}${FIRMWARE_LICENSE} SRCS+= ${KMOD:S/$/.c/} CLEANFILES+= ${KMOD:S/$/.c/} .for _firmw in ${FIRMWS} ${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} ${SYSDIR}/kern/firmw.S @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${CC:N${CCACHE_BIN}} -c -x assembler-with-cpp -DLOCORE \ ${CFLAGS} ${WERROR} \ -DFIRMW_FILE="${.ALLSRC:M*${_firmw:C/\:.*$//}}" \ -DFIRMW_SYMBOL="${_firmw:C/\:.*$//:C/[-.\/@]/_/g}" \ ${SYSDIR}/kern/firmw.S -o ${.TARGET} OBJS+= ${_firmw:C/\:.*$/.fwo/:T} .endfor .endif # Conditionally include SRCS based on kernel config options. .for _o in ${KERN_OPTS} SRCS+=${SRCS.${_o}} .endfor OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if !defined(PROG) PROG= ${KMOD}.ko .endif .if !defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} == "no" FULLPROG= ${PROG} .else FULLPROG= ${PROG}.full ${PROG}: ${FULLPROG} ${PROG}.debug ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \ ${FULLPROG} ${.TARGET} ${PROG}.debug: ${FULLPROG} ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} .endif .if ${__KLD_SHARED} == yes ${FULLPROG}: ${KMOD}.kld ${LD} -m ${LD_EMULATION} -Bshareable -znotext -znorelro ${_LDFLAGS} \ -o ${.TARGET} ${KMOD}.kld .if !defined(DEBUG_FLAGS) ${OBJCOPY} --strip-debug ${.TARGET} .endif .endif EXPORT_SYMS?= NO .if ${EXPORT_SYMS} != YES CLEANFILES+= export_syms .endif .if exists(${SYSDIR}/conf/ldscript.kmod.${MACHINE}) LDSCRIPT_FLAGS?= -T ${SYSDIR}/conf/ldscript.kmod.${MACHINE} .endif .if ${__KLD_SHARED} == yes ${KMOD}.kld: ${OBJS} ${BLOB_OBJS} .else ${FULLPROG}: ${OBJS} ${BLOB_OBJS} .endif ${LD} -m ${LD_EMULATION} ${_LDFLAGS} ${LDSCRIPT_FLAGS} -r \ -o ${.TARGET} ${OBJS} ${BLOB_OBJS} .if ${MK_CTF} != "no" ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} ${BLOB_OBJS} .endif .if defined(EXPORT_SYMS) .if ${EXPORT_SYMS} != YES .if ${EXPORT_SYMS} == NO :> export_syms .elif !exists(${.CURDIR}/${EXPORT_SYMS}) echo -n "${EXPORT_SYMS:@s@$s${.newline}@}" > export_syms .else grep -v '^#' < ${EXPORT_SYMS} > export_syms .endif ${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .endif # defined(EXPORT_SYMS) .if defined(PREFIX_SYMS) ${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \ ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no ${OBJCOPY} --strip-debug ${.TARGET} .endif _MAP_DEBUG_PREFIX= yes _ILINKS=machine .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _ILINKS+=x86 .endif .if ${MACHINE_CPUARCH} == "amd64" _ILINKS+=i386 .endif CLEANFILES+=${_ILINKS} all: ${PROG} beforedepend: ${_ILINKS} beforebuild: ${_ILINKS} # Ensure that the links exist without depending on it when it exists which # causes all the modules to be rebuilt when the directory pointed to changes. # Ensure that debug info references the path in the source tree. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) OBJS_DEPEND_GUESS+= ${_link} .endif .if defined(_MAP_DEBUG_PREFIX) .if ${_link} == "machine" CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include .else CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include .endif .endif .endfor .NOPATH: ${_ILINKS} ${_ILINKS}: @case ${.TARGET} in \ machine) \ path=${SYSDIR}/${MACHINE}/include ;; \ *) \ path=${SYSDIR}/${.TARGET:T}/include ;; \ esac ; \ path=`realpath $$path`; \ ${ECHO} ${.TARGET:T} "->" $$path ; \ ln -fns $$path ${.TARGET:T} CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} .if defined(DEBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} != "no" CLEANFILES+= ${FULLPROG} ${PROG}.debug .endif .if !target(install) _INSTALLFLAGS:= ${INSTALLFLAGS} .for ie in ${INSTALLFLAGS_EDIT} _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} .endfor .if !target(realinstall) KERN_DEBUGDIR?= ${DEBUGDIR} realinstall: _kmodinstall .ORDER: beforeinstall _kmodinstall _kmodinstall: .PHONY ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/ .if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" ${INSTALL} -T dbg -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/ .endif .include .if !defined(NO_XREF) afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref _kldxref: .PHONY @if type kldxref >/dev/null 2>&1; then \ ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ fi .endif .endif # !target(realinstall) .endif # !target(install) .if !target(load) load: ${PROG} .PHONY ${KMODLOAD} -v ${.OBJDIR}/${PROG} .endif .if !target(unload) unload: .PHONY if ${KMODISLOADED} ${PROG} ; then ${KMODUNLOAD} -v ${PROG} ; fi .endif .if !target(reload) reload: unload load .PHONY .endif .if defined(KERNBUILDDIR) .PATH: ${KERNBUILDDIR} CFLAGS+= -I${KERNBUILDDIR} .for _src in ${SRCS:Mopt_*.h} CLEANFILES+= ${_src} .if !target(${_src}) ${_src}: ln -sf ${KERNBUILDDIR}/${_src} ${.TARGET} .endif .endfor .else .for _src in ${SRCS:Mopt_*.h} CLEANFILES+= ${_src} .if !target(${_src}) ${_src}: :> ${.TARGET} .endif .endfor .endif # Add the sanitizer C flags CFLAGS+= ${SAN_CFLAGS} # Add the gcov flags CFLAGS+= ${GCOV_CFLAGS} # Respect configuration-specific C flags. CFLAGS+= ${ARCH_FLAGS} ${CONF_CFLAGS} .if !empty(SRCS:Mvnode_if.c) CLEANFILES+= vnode_if.c vnode_if.c: ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -c .endif .if !empty(SRCS:Mvnode_if.h) CLEANFILES+= vnode_if.h vnode_if_newproto.h vnode_if_typedef.h vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: ${SYSDIR}/tools/vnode_if.awk \ ${SYSDIR}/kern/vnode_if.src vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -h vnode_if_newproto.h: ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -p vnode_if_typedef.h: ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -q .endif # Build _if.[ch] from _if.m, and clean them when we're done. # __MPATH defined in config.mk _MFILES=${__MPATH:T:O} _MPATH=${__MPATH:H:O:u} .PATH.m: ${_MPATH} .for _i in ${SRCS:M*_if.[ch]} _MATCH=M${_i:R:S/$/.m/} _MATCHES=${_MFILES:${_MATCH}} .if !empty(_MATCHES) CLEANFILES+= ${_i} .endif .endfor # _i .m.c: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c .m.h: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h .for _i in mii pccard .if !empty(SRCS:M${_i}devs.h) CLEANFILES+= ${_i}devs.h ${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs ${AWK} -f ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs .endif .endfor # _i .if !empty(SRCS:Mbhnd_nvram_map.h) CLEANFILES+= bhnd_nvram_map.h bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map bhnd_nvram_map.h: sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map -h .endif .if !empty(SRCS:Mbhnd_nvram_map_data.h) CLEANFILES+= bhnd_nvram_map_data.h bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \ ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map bhnd_nvram_map_data.h: sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \ ${SYSDIR}/dev/bhnd/nvram/nvram_map -d .endif .if !empty(SRCS:Musbdevs.h) CLEANFILES+= usbdevs.h usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -h .endif .if !empty(SRCS:Musbdevs_data.h) CLEANFILES+= usbdevs_data.h usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -d .endif .if !empty(SRCS:Msdiodevs.h) CLEANFILES+= sdiodevs.h sdiodevs.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -h .endif .if !empty(SRCS:Msdiodevs_data.h) CLEANFILES+= sdiodevs_data.h sdiodevs_data.h: ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs ${AWK} -f ${SYSDIR}/tools/sdiodevs2h.awk ${SYSDIR}/dev/sdio/sdiodevs -d .endif .if !empty(SRCS:Macpi_quirks.h) CLEANFILES+= acpi_quirks.h acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks ${AWK} -f ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks .endif .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) CLEANFILES+= assym.inc genassym.o DEPENDOBJS+= genassym.o DPSRCS+= offset.inc .endif .if defined(MODULE_TIED) DPSRCS+= offset.inc .endif .if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc) CLEANFILES+= offset.inc genoffset.o DEPENDOBJS+= genoffset.o .endif assym.inc: genassym.o offset.inc: genoffset.o assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ ${SYSDIR}/kern/genoffset.c CLEANDEPENDFILES+= ${_ILINKS} # .depend needs include links so we remove them only together. cleanilinks: rm -f ${_ILINKS} OBJS_DEPEND_GUESS+= ${SRCS:M*.h} .if defined(KERNBUILDDIR) OBJS_DEPEND_GUESS+= opt_global.h .endif ZINCDIR=${SYSDIR}/contrib/openzfs/include OPENZFS_CFLAGS= \ -D_SYS_VMEM_H_ \ -D__KERNEL__ \ -nostdinc \ -DSMP \ -I${ZINCDIR} \ -I${ZINCDIR}/os/freebsd \ -I${ZINCDIR}/os/freebsd/spl \ -I${ZINCDIR}/os/freebsd/zfs \ -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h OPENZFS_CWARNFLAGS= \ -Wno-nested-externs .include .include .include .include "kern.mk" diff --git a/sys/modules/axgbe/if_axa/Makefile b/sys/modules/axgbe/if_axa/Makefile index fd1cae37cacd..ed4d285b7ff1 100644 --- a/sys/modules/axgbe/if_axa/Makefile +++ b/sys/modules/axgbe/if_axa/Makefile @@ -1,12 +1,12 @@ #$FreeBSD$ .PATH: ${SRCTOP}/sys/dev/axgbe KMOD = if_axa SRCS = device_if.h bus_if.h miibus_if.h ofw_bus_if.h ifdi_if.h vnode_if.h SRCS += opt_inet.h opt_inet6.h opt_rss.h opt_iflib.h opt_platform.h SRCS += if_axgbe.c xgbe-sysctl.c xgbe_osdep.c xgbe-desc.c xgbe-drv.c xgbe-mdio.c xgbe-dev.c xgbe-i2c.c xgbe-phy-v1.c xgbe-txrx.c -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include diff --git a/sys/modules/axgbe/if_axp/Makefile b/sys/modules/axgbe/if_axp/Makefile index 4253a529348c..60b8d24b0909 100644 --- a/sys/modules/axgbe/if_axp/Makefile +++ b/sys/modules/axgbe/if_axp/Makefile @@ -1,12 +1,12 @@ #$FreeBSD$ .PATH: ${SRCTOP}/sys/dev/axgbe KMOD = if_axp SRCS = device_if.h bus_if.h miibus_if.h pci_if.h ifdi_if.h vnode_if.h SRCS += opt_inet.h opt_inet6.h opt_rss.h opt_iflib.h opt_platform.h SRCS += if_axgbe_pci.c xgbe-sysctl.c xgbe_osdep.c xgbe-desc.c xgbe-drv.c xgbe-mdio.c xgbe-dev.c xgbe-i2c.c xgbe-phy-v2.c xgbe-txrx.c -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include diff --git a/sys/modules/cxgbe/iw_cxgbe/Makefile b/sys/modules/cxgbe/iw_cxgbe/Makefile index 72631f585bc4..cfe06a696fcb 100644 --- a/sys/modules/cxgbe/iw_cxgbe/Makefile +++ b/sys/modules/cxgbe/iw_cxgbe/Makefile @@ -1,25 +1,25 @@ # $FreeBSD$ CXGBE= ${SRCTOP}/sys/dev/cxgbe .PATH: ${CXGBE}/iw_cxgbe KMOD= iw_cxgbe SRCS+= cm.c SRCS+= cq.c SRCS+= device.c SRCS+= ev.c SRCS+= id_table.c SRCS+= mem.c SRCS+= provider.c SRCS+= qp.c SRCS+= resource.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_kern_tls.h opt_ktr.h opt_ofed.h CFLAGS+= -I${CXGBE} -I${SRCTOP}/sys/ofed/include -DLINUX_TYPES_DEFINED CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET .include diff --git a/sys/modules/ibcore/Makefile b/sys/modules/ibcore/Makefile index 2f738b1702b7..e4e3c7056ce5 100644 --- a/sys/modules/ibcore/Makefile +++ b/sys/modules/ibcore/Makefile @@ -1,60 +1,60 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/ofed/drivers/infiniband/core KMOD= ibcore SRCS= \ ib_addr.c \ ib_agent.c \ ib_cache.c \ ib_cm.c \ ib_cma.c \ ib_core_uverbs.c \ ib_cq.c \ ib_device.c \ ib_fmr_pool.c \ ib_iwcm.c \ ib_iwpm_msg.c \ ib_iwpm_util.c \ ib_mad.c \ ib_mad_rmpp.c \ ib_multicast.c \ ib_packer.c \ ib_rdma_core.c \ ib_roce_gid_mgmt.c \ ib_sa_query.c \ ib_smi.c \ ib_sysfs.c \ ib_ucm.c \ ib_ucma.c \ ib_ud_header.c \ ib_umem.c \ ib_user_mad.c \ ib_uverbs_cmd.c \ ib_uverbs_ioctl.c \ ib_uverbs_main.c \ ib_uverbs_marshall.c \ ib_uverbs_std_types.c \ ib_uverbs_std_types_async_fd.c \ ib_uverbs_std_types_counters.c \ ib_uverbs_std_types_cq.c \ ib_uverbs_std_types_device.c \ ib_uverbs_std_types_dm.c \ ib_uverbs_std_types_flow_action.c \ ib_uverbs_std_types_mr.c \ ib_uverbs_uapi.c \ ib_verbs.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DINET6 -DINET -DCONFIG_INFINIBAND_USER_MEM EXPORT_SYMS= YES .include CWARNFLAGS+= -Wno-cast-qual -Wno-pointer-arith CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE} diff --git a/sys/modules/ipoib/Makefile b/sys/modules/ipoib/Makefile index 2eb9f348e91b..b10a9150c04a 100644 --- a/sys/modules/ipoib/Makefile +++ b/sys/modules/ipoib/Makefile @@ -1,17 +1,17 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/ofed/drivers/infiniband/ulp/ipoib KMOD= ipoib SRCS= ipoib_cm.c ipoib_ib.c ipoib_main.c \ ipoib_multicast.c ipoib_verbs.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_ofed.h CFLAGS+= -I${SRCTOP}/sys/ofed/drivers/infiniband/ulp/ipoib CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/irdma/Makefile b/sys/modules/irdma/Makefile index f212a8a1a658..b2ffb67ca66f 100644 --- a/sys/modules/irdma/Makefile +++ b/sys/modules/irdma/Makefile @@ -1,23 +1,23 @@ .include OFED_INC_DIR = ${.CURDIR}/../../ofed/include ICE_DIR = ${.CURDIR}/../../dev/ice .PATH: ${.CURDIR}/../../dev/irdma KMOD= irdma SRCS= icrdma.c SRCS+= fbsd_kcompat.c irdma_hw.c irdma_verbs.c irdma_utils.c SRCS+= irdma_cm.c irdma_kcompat.c SRCS+= irdma_if.h irdma_di_if.h ice_rdma.h vnode_if.h device_if.h bus_if.h opt_inet.h pci_if.h opt_inet6.h # Shared source SRCS+= irdma_ctrl.c irdma_hmc.c icrdma_hw.c irdma_pble.c irdma_puda.c irdma_uda.c irdma_uk.c irdma_ws.c CFLAGS+= -I${ICE_DIR} -I${OFED_INC_DIR} CFLAGS+= -I${OFED_INC_DIR}/uapi -CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM ice_rdma.h: cp $(ICE_DIR)/ice_rdma.h . .include diff --git a/sys/modules/iser/Makefile b/sys/modules/iser/Makefile index c24c42a0f6fb..4961c95599af 100644 --- a/sys/modules/iser/Makefile +++ b/sys/modules/iser/Makefile @@ -1,30 +1,30 @@ # $FreeBSD$ SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" .PATH: ${SYSDIR}/dev/iser/ KMOD= iser SRCS= icl_iser.c SRCS+= iser_initiator.c SRCS+= iser_memory.c SRCS+= iser_verbs.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_cam.h icl_conn_if.h CFLAGS+= -I${SYSDIR}/ CFLAGS+= -I${SYSDIR}/ofed/include CFLAGS+= -I${SYSDIR}/ofed/include/uapi -CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET CFLAGS+= -fms-extensions CFLAGS+=-DICL_KERNEL_PROXY MFILES= kern/bus_if.m kern/device_if.m dev/iscsi/icl_conn_if.m .include diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index e1bc1f25fe74..f33bf5418dd8 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -1,63 +1,63 @@ # $FreeBSD$ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi .PATH: ${DEVIWLWIFIDIR} KMOD= if_iwlwifi SRCS= iwl-drv.c SRCS+= iwl-dbg-tlv.c iwl-debug.c SRCS+= iwl-eeprom-parse.c iwl-eeprom-read.c SRCS+= iwl-io.c iwl-nvm-parse.c iwl-phy-db.c iwl-trans.c SRCS+= cfg/7000.c cfg/8000.c cfg/9000.c cfg/22000.c SRCS+= fw/dbg.c fw/dump.c fw/img.c fw/notif-wait.c SRCS+= fw/paging.c fw/pnvm.c fw/rs.c fw/smem.c fw/init.c #SRCS+= fw/uefi.c SRCS+= mvm/rs.c mvm/binding.c mvm/coex.c mvm/ftm-initiator.c SRCS+= mvm/ftm-responder.c mvm/fw.c mvm/mac-ctxt.c SRCS+= mvm/mac80211.c mvm/nvm.c mvm/offloading.c mvm/ops.c SRCS+= mvm/phy-ctxt.c mvm/power.c mvm/quota.c mvm/rs-fw.c mvm/rfi.c SRCS+= mvm/rx.c mvm/rxmq.c mvm/scan.c mvm/sf.c mvm/sta.c mvm/tdls.c SRCS+= mvm/time-event.c mvm/tt.c mvm/tx.c mvm/utils.c #SRCS+= mvm/led.c SRCS+= pcie/ctxt-info-gen3.c pcie/ctxt-info.c SRCS+= pcie/drv.c pcie/rx.c pcie/trans-gen2.c pcie/trans.c SRCS+= pcie/tx-gen2.c pcie/tx.c SRCS+= queue/tx.c SRCS+= iwl-devtrace.c # Other SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h opt_acpi.h CFLAGS+= -DKBUILD_MODNAME='"iwlwifi"' CFLAGS+= -I${DEVIWLWIFIDIR} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_IWLDVM=0 CFLAGS+= -DCONFIG_IWLMVM=1 # Helpful after fresh imports. #CFLAGS+= -ferror-limit=0 #CFLAGS+= -DCONFIG_ACPI=1 #CFLAGS+= -DCONFIG_INET=1 # Need LKPI TSO implementation. #CFLAGS+= -DCONFIG_IPV6=1 CFLAGS+= -DCONFIG_IWLWIFI_DEBUG=1 #CFLAGS+= -DCONFIG_IWLWIFI_DEBUGFS=1 #CFLAGS+= -DCONFIG_IWLWIFI_LEDS=1 #CFLAGS+= -DCONFIG_IWLWIFI_OPMODE_MODULAR=1 CFLAGS+= -DCONFIG_IWLWIFI_DEVICE_TRACING=1 #CFLAGS+= -DCONFIG_LOCKDEP=1 #CFLAGS+= -DCONFIG_MAC80211_DEBUGFS=1 #CFLAGS+= -DCONFIG_NL80211_TESTMODE=1 #CFLAGS+= -DCONFIG_PM=1 #CFLAGS+= -DCONFIG_PM_SLEEP=1 #CFLAGS+= -DCONFIG_THERMAL=1 #CFLAGS+= -DCONFIG_EFI=1 # GCC warns about NULL format strings passed to iwl_fw_dbg_collect_trig CWARNFLAGS.gcc+= -Wno-format .include diff --git a/sys/modules/lindebugfs/Makefile b/sys/modules/lindebugfs/Makefile index da61fd519e96..024b945dfc6c 100644 --- a/sys/modules/lindebugfs/Makefile +++ b/sys/modules/lindebugfs/Makefile @@ -1,11 +1,11 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/compat/lindebugfs KMOD= lindebugfs SRCS= lindebugfs.c SRCS+= ${LINUXKPI_GENSRCS} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index aa2c452db03a..e297361fce79 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -1,54 +1,54 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/compat/linuxkpi/common/src KMOD= linuxkpi SRCS= linux_compat.c \ linux_current.c \ linux_devres.c \ linux_dmi.c \ linux_domain.c \ linux_firmware.c \ linux_fpu.c \ linux_hrtimer.c \ linux_idr.c \ linux_interrupt.c \ linux_i2c.c \ linux_i2cbb.c \ linux_kmod.c \ linux_kthread.c \ linux_lock.c \ linux_netdev.c \ linux_page.c \ linux_pci.c \ linux_radix.c \ linux_rcu.c \ linux_schedule.c \ linux_seq_file.c \ linux_shmemfs.c \ linux_shrinker.c \ linux_simple_attr.c \ linux_skbuff.c \ linux_slab.c \ linux_tasklet.c \ linux_usb.c \ linux_work.c \ linux_xarray.c .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" SRCS+= opt_acpi.h acpi_if.h linux_acpi.c .endif .if ${MACHINE_CPUARCH} == "i386" SRCS+= opt_apic.h .endif SRCS+= opt_ddb.h SRCS+= ${LINUXKPI_GENSRCS} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include EXPORT_SYMS= YES .include diff --git a/sys/modules/linuxkpi_wlan/Makefile b/sys/modules/linuxkpi_wlan/Makefile index 4aba6f83137f..fccd1249bc72 100644 --- a/sys/modules/linuxkpi_wlan/Makefile +++ b/sys/modules/linuxkpi_wlan/Makefile @@ -1,15 +1,15 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/compat/linuxkpi/common/src KMOD= linuxkpi_wlan SRCS= linux_80211.c \ linux_80211_macops.c SRCS+= opt_wlan.h SRCS+= ${LINUXKPI_GENSRCS} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} EXPORT_SYMS= YES .include diff --git a/sys/modules/mlx4/Makefile b/sys/modules/mlx4/Makefile index 96818c2ef3d0..6cffacef5d7a 100644 --- a/sys/modules/mlx4/Makefile +++ b/sys/modules/mlx4/Makefile @@ -1,37 +1,37 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx4/mlx4_core KMOD= mlx4 SRCS= \ mlx4_alloc.c \ mlx4_catas.c \ mlx4_cmd.c \ mlx4_cq.c \ mlx4_eq.c \ mlx4_fw.c \ mlx4_fw_qos.c \ mlx4_icm.c \ mlx4_intf.c \ mlx4_main.c \ mlx4_mcg.c \ mlx4_mr.c \ mlx4_pd.c \ mlx4_port.c \ mlx4_profile.c \ mlx4_qp.c \ mlx4_reset.c \ mlx4_sense.c \ mlx4_srq.c \ mlx4_resource_tracker.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} EXPORT_SYMS= YES .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/mlx4en/Makefile b/sys/modules/mlx4en/Makefile index b03f93008333..34f24959b54b 100644 --- a/sys/modules/mlx4en/Makefile +++ b/sys/modules/mlx4en/Makefile @@ -1,19 +1,19 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx4/mlx4_en KMOD= mlx4en SRCS= \ mlx4_en_cq.c \ mlx4_en_main.c \ mlx4_en_netdev.c \ mlx4_en_port.c \ mlx4_en_resources.c \ mlx4_en_rx.c \ mlx4_en_tx.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include diff --git a/sys/modules/mlx4ib/Makefile b/sys/modules/mlx4ib/Makefile index dc819d7ef01d..2b0158e02544 100644 --- a/sys/modules/mlx4ib/Makefile +++ b/sys/modules/mlx4ib/Makefile @@ -1,30 +1,30 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx4/mlx4_ib KMOD= mlx4ib SRCS= \ mlx4_ib_alias_GUID.c \ mlx4_ib_mcg.c \ mlx4_ib_sysfs.c \ mlx4_ib_ah.c \ mlx4_ib_cq.c \ mlx4_ib_doorbell.c \ mlx4_ib_mad.c \ mlx4_ib_main.c \ mlx4_ib_mr.c \ mlx4_ib_qp.c \ mlx4_ib_srq.c \ mlx4_ib_wc.c \ mlx4_ib_cm.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/mlx5/Makefile b/sys/modules/mlx5/Makefile index f9e282789d1c..3eb21722f777 100644 --- a/sys/modules/mlx5/Makefile +++ b/sys/modules/mlx5/Makefile @@ -1,59 +1,59 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_core \ ${SRCTOP}/sys/dev/mlx5/mlx5_lib \ ${SRCTOP}/sys/dev/mlx5/mlx5_fpga KMOD=mlx5 SRCS= \ mlx5_alloc.c \ mlx5_cmd.c \ mlx5_cq.c \ mlx5_diagnostics.c \ mlx5_eq.c \ mlx5_eswitch.c \ mlx5_fs_cmd.c \ mlx5_fs_tcp.c \ mlx5_fs_tree.c \ mlx5_fw.c \ mlx5_fwdump.c \ mlx5_health.c \ mlx5_mad.c \ mlx5_main.c \ mlx5_mcg.c \ mlx5_mpfs.c \ mlx5_mr.c \ mlx5_pagealloc.c \ mlx5_pd.c \ mlx5_port.c \ mlx5_qp.c \ mlx5_rl.c \ mlx5_srq.c \ mlx5_tls.c \ mlx5_transobj.c \ mlx5_uar.c \ mlx5_vport.c \ mlx5_vsc.c \ mlx5_wq.c \ mlx5_gid.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .if defined(CONFIG_BUILD_FPGA) SRCS+= \ mlx5fpga_cmd.c \ mlx5fpga_core.c \ mlx5fpga_sdk.c \ mlx5fpga_trans.c \ mlx5fpga_xfer.c \ mlx5fpga_ipsec.c .endif EXPORT_SYMS= YES .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlx5en/Makefile b/sys/modules/mlx5en/Makefile index cc2cc264b435..ade9f75c12d8 100644 --- a/sys/modules/mlx5en/Makefile +++ b/sys/modules/mlx5en/Makefile @@ -1,39 +1,39 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_en KMOD=mlx5en SRCS= \ mlx5_en_dim.c \ mlx5_en_ethtool.c \ mlx5_en_main.c \ mlx5_en_tx.c \ mlx5_en_flow_table.c \ mlx5_en_hw_tls.c \ mlx5_en_hw_tls_rx.c \ mlx5_en_iq.c \ mlx5_en_rx.c \ mlx5_en_rl.c \ mlx5_en_txrx.c \ mlx5_en_port_buffer.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h opt_kern_tls.h .if defined(HAVE_PER_CQ_EVENT_PACKET) CFLAGS+= -DHAVE_PER_CQ_EVENT_PACKET .endif .if defined(HAVE_TCP_LRO_RX) CFLAGS+= -DHAVE_TCP_LRO_RX .endif .if defined(CONFIG_BUILD_FPGA) CFLAGS+= -DCONFIG_MLX5_FPGA .endif CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlx5fpga_tools/Makefile b/sys/modules/mlx5fpga_tools/Makefile index 1fe938862b38..0e8c29caf9de 100644 --- a/sys/modules/mlx5fpga_tools/Makefile +++ b/sys/modules/mlx5fpga_tools/Makefile @@ -1,19 +1,19 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_fpga_tools KMOD=mlx5fpga_tools SRCS= \ mlx5fpga_tools_main.c \ mlx5fpga_tools_char.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_rss.h opt_ratelimit.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} CFLAGS+= -DCONFIG_MLX5_FPGA -DCONFIG_MLX5_ACCEL diff --git a/sys/modules/mlx5ib/Makefile b/sys/modules/mlx5ib/Makefile index 7a3c4d218731..b9ed8076b54d 100644 --- a/sys/modules/mlx5ib/Makefile +++ b/sys/modules/mlx5ib/Makefile @@ -1,33 +1,33 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlx5/mlx5_ib KMOD=mlx5ib SRCS= \ mlx5_ib_ah.c \ mlx5_ib_cong.c \ mlx5_ib_cq.c \ mlx5_ib_devx.c \ mlx5_ib_doorbell.c \ mlx5_ib_gsi.c \ mlx5_ib_mad.c \ mlx5_ib_main.c \ mlx5_ib_mem.c \ mlx5_ib_mr.c \ mlx5_ib_qp.c \ mlx5_ib_srq.c \ mlx5_ib_virt.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h opt_ratelimit.h opt_rss.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM .if defined(CONFIG_BUILD_FPGA) CFLAGS+= -DCONFIG_MLX5_FPGA .endif .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} diff --git a/sys/modules/mlxfw/Makefile b/sys/modules/mlxfw/Makefile index 5980a49dabee..899f58df8f13 100644 --- a/sys/modules/mlxfw/Makefile +++ b/sys/modules/mlxfw/Makefile @@ -1,20 +1,20 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mlxfw KMOD=mlxfw SRCS= \ mlxfw_fsm.c \ mlxfw_mfa2.c \ mlxfw_mfa2_tlv_multi.c SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= \ -I${SRCTOP}/sys/ofed/include \ -I${SRCTOP}/sys/ofed/include/uapi \ - -I${SRCTOP}/sys/compat/linuxkpi/common/include \ + ${LINUXKPI_INCLUDES} \ -I${SRCTOP}/sys/contrib/xz-embedded/freebsd \ -I${SRCTOP}/sys/contrib/xz-embedded/linux/lib/xz EXPORT_SYMS= YES .include diff --git a/sys/modules/mthca/Makefile b/sys/modules/mthca/Makefile index 584a86b6ada7..d7807157f50c 100644 --- a/sys/modules/mthca/Makefile +++ b/sys/modules/mthca/Makefile @@ -1,35 +1,35 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/mthca KMOD= mthca SRCS= \ mthca_allocator.c \ mthca_av.c \ mthca_catas.c \ mthca_cmd.c \ mthca_cq.c \ mthca_eq.c \ mthca_mad.c \ mthca_main.c \ mthca_mcg.c \ mthca_memfree.c \ mthca_mr.c \ mthca_pd.c \ mthca_profile.c \ mthca_provider.c \ mthca_qp.c \ mthca_reset.c \ mthca_srq.c \ mthca_uar.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/qat/qat/Makefile b/sys/modules/qat/qat/Makefile index 7973faa2c4cb..a8b58573a272 100644 --- a/sys/modules/qat/qat/Makefile +++ b/sys/modules/qat/qat/Makefile @@ -1,24 +1,24 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2007-2022 Intel Corporation # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/qat/qat KMOD= qat SRCS+= qat_ocf.c qat_ocf_mem_pool.c qat_ocf_utils.c SRCS+= device_if.h bus_if.h vnode_if.h pci_if.h cryptodev_if.h -CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -I${SRCTOP}/sys/dev/qat/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/include/common CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include/lac CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_utils/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_direct/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/firmware/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/crypto/sym/include CWARNFLAGS.qat_ocf.c += -Wno-incompatible-pointer-types-discards-qualifiers CWARNFLAGS.qat_ocf_utils.c += -Wno-incompatible-pointer-types-discards-qualifiers .include diff --git a/sys/modules/qat/qat_api/Makefile b/sys/modules/qat/qat_api/Makefile index 20f3acd4ecdd..76b9c8965e1a 100644 --- a/sys/modules/qat/qat_api/Makefile +++ b/sys/modules/qat/qat_api/Makefile @@ -1,76 +1,76 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2007-2022 Intel Corporation # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/qat/qat_api KMOD= qat_api SRCS+= freebsd_module.c SRCS+= common/compression/dc_datapath.c SRCS+= common/compression/dc_header_footer.c SRCS+= common/compression/dc_session.c SRCS+= common/compression/dc_stats.c SRCS+= common/compression/dc_buffers.c SRCS+= common/compression/dc_dp.c SRCS+= common/compression/icp_sal_dc_err.c SRCS+= common/utils/lac_buffer_desc.c SRCS+= common/utils/lac_mem.c SRCS+= common/utils/lac_mem_pools.c SRCS+= common/utils/lac_sync.c SRCS+= common/utils/sal_service_state.c SRCS+= common/utils/sal_statistics.c SRCS+= common/utils/sal_string_parse.c SRCS+= common/utils/sal_versions.c SRCS+= common/utils/sal_user_process.c SRCS+= common/ctrl/sal_list.c SRCS+= common/ctrl/sal_compression.c SRCS+= common/ctrl/sal_ctrl_services.c SRCS+= common/ctrl/sal_create_services.c SRCS+= common/ctrl/sal_crypto.c SRCS+= common/qat_comms/sal_qat_cmn_msg.c SRCS+= common/crypto/sym/lac_sym_api.c SRCS+= common/crypto/sym/lac_sym_cb.c SRCS+= common/crypto/sym/lac_sym_queue.c SRCS+= common/crypto/sym/lac_sym_cipher.c SRCS+= common/crypto/sym/lac_sym_alg_chain.c SRCS+= common/crypto/sym/lac_sym_auth_enc.c SRCS+= common/crypto/sym/lac_sym_hash.c SRCS+= common/crypto/sym/lac_sym_hash_sw_precomputes.c SRCS+= common/crypto/sym/lac_sym_stats.c SRCS+= common/crypto/sym/lac_sym_compile_check.c SRCS+= common/crypto/sym/lac_sym_partial.c SRCS+= common/crypto/sym/lac_sym_dp.c SRCS+= common/crypto/sym/qat/lac_sym_qat.c SRCS+= common/crypto/sym/qat/lac_sym_qat_hash.c SRCS+= common/crypto/sym/qat/lac_sym_qat_hash_defs_lookup.c SRCS+= common/crypto/sym/qat/lac_sym_qat_cipher.c SRCS+= common/crypto/sym/qat/lac_sym_qat_key.c SRCS+= common/crypto/sym/key/lac_sym_key.c SRCS+= common/stubs/lac_stubs.c SRCS+= device/dev_info.c SRCS+= qat_kernel/src/lac_adf_interface_freebsd.c SRCS+= qat_kernel/src/qat_transport.c SRCS+= qat_kernel/src/lac_symbols.c SRCS+= qat_utils/src/QatUtilsServices.c SRCS+= qat_utils/src/QatUtilsSemaphore.c SRCS+= qat_utils/src/QatUtilsSpinLock.c SRCS+= qat_utils/src/QatUtilsAtomic.c SRCS+= qat_utils/src/QatUtilsCrypto.c SRCS+= bus_if.h cryptodev_if.h device_if.h pci_if.h vnode_if.h CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include/lac CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include/dc CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_direct/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_kernel/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_utils/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/compression/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/crypto/sym/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/firmware/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/include/common -CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include CWARNFLAGS+= -Wno-cast-qual diff --git a/sys/modules/qat/qat_common/Makefile b/sys/modules/qat/qat_common/Makefile index a2ea45fb6846..9645d3b765db 100644 --- a/sys/modules/qat/qat_common/Makefile +++ b/sys/modules/qat/qat_common/Makefile @@ -1,29 +1,29 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2007-2022 Intel Corporation # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/qat/qat_common KMOD= qat_common SRCS+= adf_accel_engine.c adf_freebsd_admin.c adf_aer.c adf_cfg.c qat_common_module.c SRCS+= adf_heartbeat.c adf_freebsd_heartbeat_dbg.c SRCS+= adf_dev_mgr.c adf_hw_arbiter.c SRCS+= adf_init.c adf_transport.c adf_isr.c adf_fw_counters.c adf_dev_err.c SRCS+= qat_freebsd.c SRCS+= adf_freebsd_cfg_dev_dbg.c adf_freebsd_ver_dbg.c SRCS+= adf_cfg_device.c adf_cfg_section.c adf_cfg_instance.c adf_cfg_bundle.c SRCS+= qat_hal.c qat_uclo.c SRCS+= adf_vf_isr.c adf_pf2vf_msg.c SRCS+= adf_vf2pf_msg.c SRCS+= adf_pf2vf_capabilities.c SRCS+= adf_pf2vf_ring_to_svc_map.c SRCS+= adf_freebsd_transport_debug.c adf_clock.c SRCS+= adf_freebsd_cnvnr_ctrs_dbg.c SRCS+= adf_freebsd_pfvf_ctrs_dbg.c SRCS+= bus_if.h device_if.h pci_if.h vnode_if.h CFLAGS+= -I${SRCTOP}/sys/dev/qat/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/include/common -CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include diff --git a/sys/modules/qat/qat_hw/Makefile b/sys/modules/qat/qat_hw/Makefile index 813f894757a7..820af989b536 100644 --- a/sys/modules/qat/qat_hw/Makefile +++ b/sys/modules/qat/qat_hw/Makefile @@ -1,27 +1,27 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2007-2022 Intel Corporation # $FreeBSD$ .PATH: ${SRCTOP}/sys/dev/qat/qat_hw KMOD= qat_hw SRCS+= qat_c62x/adf_c62x_hw_data.c qat_c62x/adf_drv.c SRCS+= qat_200xx/adf_200xx_hw_data.c qat_200xx/adf_drv.c SRCS+= qat_c3xxx/adf_c3xxx_hw_data.c qat_c3xxx/adf_drv.c SRCS+= qat_dh895xcc/adf_dh895xcc_hw_data.c qat_dh895xcc/adf_drv.c SRCS+= qat_c4xxx/adf_c4xxx_hw_data.c qat_c4xxx/adf_drv.c qat_c4xxx/adf_c4xxx_ae_config.c qat_c4xxx/adf_c4xxx_misc_error_stats.c SRCS+= qat_c4xxx/adf_c4xxx_pke_replay_stats.c qat_c4xxx/adf_c4xxx_ras.c qat_c4xxx/adf_c4xxx_res_part.c SRCS+= qat_c4xxx/adf_c4xxx_reset.c SRCS+= device_if.h bus_if.h vnode_if.h pci_if.h cryptodev_if.h -CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -I${SRCTOP}/sys/dev/qat/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/include/common CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/include/lac CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_utils/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/qat_direct/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/firmware/include CFLAGS+= -I${SRCTOP}/sys/dev/qat/qat_api/common/crypto/sym/include .include diff --git a/sys/modules/qlnx/qlnxe/Makefile b/sys/modules/qlnx/qlnxe/Makefile index 5d1d0eefec64..b033e4a623b5 100644 --- a/sys/modules/qlnx/qlnxe/Makefile +++ b/sys/modules/qlnx/qlnxe/Makefile @@ -1,94 +1,94 @@ #/* # * Copyright (c) 2017-2018 Cavium, Inc. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * 1. Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * 2. Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in the # * documentation and/or other materials provided with the distribution. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # * POSSIBILITY OF SUCH DAMAGE. # */ #/* # * File : Makefile # * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. # */ # # $FreeBSD$ # .PATH: ${SRCTOP}/sys/dev/qlnx/qlnxe #.PATH: ${.CURDIR} KMOD=if_qlnxe SRCS=ecore_cxt.c ecore_dcbx.c ecore_dev.c ecore_hw.c SRCS+=ecore_init_fw_funcs.c ecore_int.c ecore_mcp.c SRCS+=ecore_sp_commands.c ecore_spq.c ecore_l2.c SRCS+=ecore_init_ops.c ecore_dbg_fw_funcs.c SRCS+=ecore_mng_tlv.c SRCS+=ecore_sriov.c SRCS+=ecore_vf.c #roce/iwarp files. Compilation can be turned off roce/iwarp are not required. # In other words if you don't need RDMA please comment out SRCS adds for # ecore_rdma.c ecore_roce.c ecore_iwarp.c ecore_ooo.c ecore_ll2.c qlnx_rdma.c SRCS+=ecore_rdma.c SRCS+=ecore_roce.c SRCS+=ecore_iwarp.c SRCS+=ecore_ooo.c SRCS+=ecore_ll2.c SRCS+=qlnx_rdma.c SRCS+=qlnx_ioctl.c SRCS+=qlnx_os.c SRCS+= ${LINUXKPI_GENSRCS} .include #CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DECORE_CONFIG_DIRECT_HWFN -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS += -g #CFLAGS += -fno-inline #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE #CFLAGS += -DQLNX_USER_LLDP CFLAGS += -DCONFIG_ECORE_SRIOV # For roce/iwarp files. Compilation can be turned off if roce/iwarp are not required. # In other words if you don't need RDMA please comment out the CFLAGS which define # CONFIG_ECORE_LL2 CONFIG_ECORE_ROCE CONFIG_ECORE_IWARP QLNX_ENABLE_IWARP CFLAGS += -DCONFIG_ECORE_LL2 CFLAGS += -DCONFIG_ECORE_ROCE CFLAGS += -DCONFIG_ECORE_IWARP CFLAGS += -DCONFIG_ECORE_RDMA CFLAGS += -DQLNX_ENABLE_IWARP CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS.ecore_ll2.c+= ${NO_WUNUSED_BUT_SET_VARIABLE} diff --git a/sys/modules/qlnx/qlnxev/Makefile b/sys/modules/qlnx/qlnxev/Makefile index 4c79eee59a55..89ba62cd3027 100644 --- a/sys/modules/qlnx/qlnxev/Makefile +++ b/sys/modules/qlnx/qlnxev/Makefile @@ -1,76 +1,76 @@ #/* # * Copyright (c) 2017-2018 Cavium, Inc. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * 1. Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * 2. Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in the # * documentation and/or other materials provided with the distribution. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # * POSSIBILITY OF SUCH DAMAGE. # */ # /* # * File : Makefile # * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. # */ # # $FreeBSD$ # .PATH: ${SRCTOP}/sys/dev/qlnx/qlnxe #.PATH: ${.CURDIR}/../qlnxe KMOD=if_qlnxev SRCS=ecore_cxt.c ecore_dcbx.c ecore_dev.c ecore_hw.c SRCS+=ecore_init_fw_funcs.c ecore_int.c ecore_mcp.c SRCS+=ecore_sp_commands.c ecore_spq.c ecore_l2.c SRCS+=ecore_init_ops.c ecore_dbg_fw_funcs.c SRCS+=ecore_mng_tlv.c #SRIOV related SRCS+=ecore_sriov.c SRCS+=ecore_vf.c SRCS+=qlnx_ioctl.c SRCS+=qlnx_os.c SRCS+= ${LINUXKPI_GENSRCS} .include CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DECORE_CONFIG_DIRECT_HWFN -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS += -g CFLAGS += -fno-inline #CFLAGS += -DQLNX_SOFT_LRO #CFLAGS += -DQLNX_QSORT_LRO #CFLAGS += -DQLNX_MAX_COALESCE #SRIOV related CFLAGS += -DCONFIG_ECORE_SRIOV CFLAGS += -DQLNX_VF CWARNFLAGS+= -Wno-cast-qual diff --git a/sys/modules/qlnx/qlnxr/Makefile b/sys/modules/qlnx/qlnxr/Makefile index f193ff09e7ef..f02089588942 100644 --- a/sys/modules/qlnx/qlnxr/Makefile +++ b/sys/modules/qlnx/qlnxr/Makefile @@ -1,88 +1,88 @@ #/* # * Copyright (c) 2017-2018 Cavium, Inc. # * All rights reserved. # * # * Redistribution and use in source and binary forms, with or without # * modification, are permitted provided that the following conditions # * are met: # * # * 1. Redistributions of source code must retain the above copyright # * notice, this list of conditions and the following disclaimer. # * 2. Redistributions in binary form must reproduce the above copyright # * notice, this list of conditions and the following disclaimer in the # * documentation and/or other materials provided with the distribution. # * # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # * POSSIBILITY OF SUCH DAMAGE. # */ #/* # * File : Makefile # * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131. # */ # # $FreeBSD$ # #.PATH: ${.CURDIR} #OFEDDIR= /usr/src/sys #ETHDRVR=${.CURDIR}/../qlnxe .PATH: ${SRCTOP}/sys/dev/qlnx/qlnxr OFEDDIR=${SRCTOP}/sys ETHDRVR=${SRCTOP}/sys/dev/qlnx/qlnxe KMOD= qlnxr SRCS= \ qlnxr_os.c\ qlnxr_cm.c\ qlnxr_verbs.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h .include CFLAGS+= -I${.CURDIR} CFLAGS+= -I${ETHDRVR} CFLAGS+= -I${OFEDDIR}/ofed/include CFLAGS+= -I${OFEDDIR}/ofed/include/uapi -CFLAGS+= -I${OFEDDIR}/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DLINUX_TYPES_DEFINED CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET #CFLAGS+= -DDEFINE_NO_IP_BASED_GIDS CWARNEXTRA += -Wno-cast-qual CWARNEXTRA += -Wno-unused-function .if ${COMPILER_TYPE} == "clang" CWARNEXTRA += -Wno-gnu-variable-sized-type-not-at-end .endif CWARNEXTRA += -Wno-missing-prototypes CWARNEXTRA += ${NO_WCONSTANT_CONVERSION} CWARNEXTRA += -Wno-format CWARNEXTRA += ${NO_WSHIFT_COUNT_OVERFLOW} CWARNEXTRA += -Wno-empty-body CFLAGS += -DQLNX_DEBUG CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DCONFIG_ECORE_LL2 CFLAGS += -DCONFIG_ECORE_ROCE CFLAGS += -DCONFIG_ECORE_IWARP CFLAGS += -DCONFIG_ECORE_RDMA CFLAGS += -DECORE_CONFIG_DIRECT_HWFN CFLAGS += -g -fno-inline CFLAGS += -DQLNX_RDMA CFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/modules/rdma/krping/Makefile b/sys/modules/rdma/krping/Makefile index 97c2fdedb91d..7f3a4962190e 100644 --- a/sys/modules/rdma/krping/Makefile +++ b/sys/modules/rdma/krping/Makefile @@ -1,12 +1,12 @@ # $FreeBSD$ .PATH: ${SRCTOP}/sys/contrib/rdma/krping KMOD= krping SRCS= krping.c krping_dev.c getopt.c SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/ofed/include CFLAGS+= -I${SRCTOP}/sys/ofed/include/uapi -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} .include diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index aaaadfdca2d7..8ac4a8b8be65 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -1,43 +1,43 @@ # $FreeBSD$ DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} WITH_CONFIG_PM= 0 KMOD= if_rtw88 # Core parts. SRCS= main.c SRCS+= bf.c coex.c debug.c efuse.c fw.c mac.c mac80211.c SRCS+= phy.c ps.c regd.c SRCS+= rx.c sar.c sec.c tx.c util.c .if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 SRCR+= wow.c CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} .endif # PCI parts. SRCS+= pci.c SRCS+= rtw8723d.c rtw8723d_table.c rtw8723de.c # 11n SRCS+= rtw8821c.c rtw8821c_table.c rtw8821ce.c # 11ac SRCS+= rtw8822b.c rtw8822b_table.c rtw8822be.c # 11ac SRCS+= rtw8822c.c rtw8822c_table.c rtw8822ce.c # 11ac # Other SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h # Helpful after fresh imports. #CFLAGS+= -ferror-limit=0 CFLAGS+= -DKBUILD_MODNAME='"rtw88"' CFLAGS+= -I${DEVRTW88DIR} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW88_DEBUG #CFLAGS+= -DCONFIG_RTW88_DEBUGFS .include diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index d5b6cec50bb8..42e9d276c537 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -1,40 +1,40 @@ # $FreeBSD$ DEVRTW89DIR= ${SRCTOP}/sys/contrib/dev/rtw89 .PATH: ${DEVRTW89DIR} WITH_CONFIG_PM= 0 KMOD= if_rtw89 SRCS= core.c SRCS+= pci.c SRCS+= chan.c mac80211.c mac.c phy.c fw.c SRCS+= rtw8852a.c rtw8852a_table.c SRCS+= rtw8852a_rfk.c rtw8852a_rfk_table.c SRCS+= rtw8852ae.c SRCS+= rtw8852c.c rtw8852c_table.c SRCS+= rtw8852c_rfk.c rtw8852c_rfk_table.c SRCS+= rtw8852ce.c SRCS+= cam.c efuse.c regd.c sar.c coex.c ps.c ser.c SRCS+= debug.c .if defined(WITH_CONFIG_PM) && ${WITH_CONFIG_PM} > 0 CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} .endif # Other SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h CFLAGS+= -DKBUILD_MODNAME='"rtw89"' CFLAGS+= -I${DEVRTW89DIR} -CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW89_DEBUGMSG #CFLAGS+= -DCONFIG_RTW89_DEBUGFS #CFLAGS+= -ferror-limit=0 .include