The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/kmod.mk

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

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

Cache object: 5e36b38ba26fc0c938ddb57fbd2510e8


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.