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 352094 2019-09-09 18:27:52Z imp $
    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 CFLAGS+=        ${WERROR}
  117 CFLAGS+=        -D_KERNEL
  118 CFLAGS+=        -DKLD_MODULE
  119 .if defined(MODULE_TIED)
  120 CFLAGS+=        -DKLD_TIED
  121 .endif
  122 
  123 # Don't use any standard or source-relative include directories.
  124 NOSTDINC=       -nostdinc
  125 CFLAGS:=        ${CFLAGS:N-I*} ${NOSTDINC} ${INCLMAGIC} ${CFLAGS:M-I*}
  126 .if defined(KERNBUILDDIR)
  127 CFLAGS+=        -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h
  128 .endif
  129 
  130 # Add -I paths for system headers.  Individual module makefiles don't
  131 # need any -I paths for this.  Similar defaults for .PATH can't be
  132 # set because there are no standard paths for non-headers.
  133 CFLAGS+=        -I. -I${SYSDIR} -I${SYSDIR}/contrib/ck/include
  134 
  135 CFLAGS.gcc+=    -finline-limit=${INLINE_LIMIT}
  136 CFLAGS.gcc+=    -fms-extensions
  137 CFLAGS.gcc+= --param inline-unit-growth=100
  138 CFLAGS.gcc+= --param large-function-growth=1000
  139 
  140 # Disallow common variables, and if we end up with commons from
  141 # somewhere unexpected, allocate storage for them in the module itself.
  142 CFLAGS+=        -fno-common
  143 LDFLAGS+=       -d -warn-common
  144 
  145 .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id}
  146 LDFLAGS+=       --build-id=sha1
  147 .endif
  148 
  149 CFLAGS+=        ${DEBUG_FLAGS}
  150 .if ${MACHINE_CPUARCH} == amd64
  151 CFLAGS+=        -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
  152 .endif
  153 
  154 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
  155 CFLAGS+=        -fPIC
  156 .endif
  157 
  158 # Temporary workaround for PR 196407, which contains the fascinating details.
  159 # Don't allow clang to use fpu instructions or registers in kernel modules.
  160 .if ${MACHINE_CPUARCH} == arm
  161 .if ${COMPILER_VERSION} < 30800
  162 CFLAGS.clang+=  -mllvm -arm-use-movt=0
  163 .else
  164 CFLAGS.clang+=  -mno-movt
  165 .endif
  166 CFLAGS.clang+=  -mfpu=none
  167 CFLAGS+=        -funwind-tables
  168 .endif
  169 
  170 .if ${MACHINE_CPUARCH} == powerpc
  171 CFLAGS+=        -mlongcall -fno-omit-frame-pointer
  172 .endif
  173 
  174 .if ${MACHINE_CPUARCH} == mips
  175 CFLAGS+=        -G0 -fno-pic -mno-abicalls -mlong-calls
  176 .endif
  177 
  178 .if defined(DEBUG) || defined(DEBUG_FLAGS)
  179 CTFFLAGS+=      -g
  180 .endif
  181 
  182 .if defined(FIRMWS)
  183 ${KMOD:S/$/.c/}: ${SYSDIR}/tools/fw_stub.awk
  184         ${AWK} -f ${SYSDIR}/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} \
  185             ${FIRMWARE_LICENSE:C/.+/-l/}${FIRMWARE_LICENSE}
  186 
  187 SRCS+=  ${KMOD:S/$/.c/}
  188 CLEANFILES+=    ${KMOD:S/$/.c/}
  189 
  190 .for _firmw in ${FIRMWS}
  191 ${_firmw:C/\:.*$/.fwo/:T}:      ${_firmw:C/\:.*$//}
  192         @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}}
  193         @if [ -e ${_firmw:C/\:.*$//} ]; then                    \
  194                 ${LD} -b binary --no-warn-mismatch ${_LDFLAGS}  \
  195                     -m ${LD_EMULATION} -r -d                    \
  196                     -o ${.TARGET} ${_firmw:C/\:.*$//};          \
  197         else                                                    \
  198                 ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \
  199                 ${LD} -b binary --no-warn-mismatch ${_LDFLAGS}  \
  200                     -m ${LD_EMULATION} -r -d                    \
  201                     -o ${.TARGET} ${_firmw:C/\:.*$//};          \
  202                 rm ${_firmw:C/\:.*$//};                         \
  203         fi
  204 
  205 OBJS+=  ${_firmw:C/\:.*$/.fwo/:T}
  206 .endfor
  207 .endif
  208 
  209 # Conditionally include SRCS based on kernel config options.
  210 .for _o in ${KERN_OPTS}
  211 SRCS+=${SRCS.${_o}}
  212 .endfor
  213 
  214 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
  215 
  216 .if !defined(PROG)
  217 PROG=   ${KMOD}.ko
  218 .endif
  219 
  220 .if !defined(DEBUG_FLAGS)
  221 FULLPROG=       ${PROG}
  222 .else
  223 FULLPROG=       ${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 ${_LDFLAGS} \
  234             -o ${.TARGET} ${KMOD}.kld
  235 .if !defined(DEBUG_FLAGS)
  236         ${OBJCOPY} --strip-debug ${.TARGET}
  237 .endif
  238 .endif
  239 
  240 EXPORT_SYMS?=   NO
  241 .if ${EXPORT_SYMS} != YES
  242 CLEANFILES+=    export_syms
  243 .endif
  244 
  245 .if ${__KLD_SHARED} == yes
  246 ${KMOD}.kld: ${OBJS}
  247 .else
  248 ${FULLPROG}: ${OBJS}
  249 .endif
  250         ${LD} -m ${LD_EMULATION} ${_LDFLAGS} -r -d -o ${.TARGET} ${OBJS}
  251 .if ${MK_CTF} != "no"
  252         ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
  253 .endif
  254 .if defined(EXPORT_SYMS)
  255 .if ${EXPORT_SYMS} != YES
  256 .if ${EXPORT_SYMS} == NO
  257         :> export_syms
  258 .elif !exists(${.CURDIR}/${EXPORT_SYMS})
  259         echo -n "${EXPORT_SYMS:@s@$s${.newline}@}" > export_syms
  260 .else
  261         grep -v '^#' < ${EXPORT_SYMS} > export_syms
  262 .endif
  263         ${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \
  264             export_syms | xargs -J% ${OBJCOPY} % ${.TARGET}
  265 .endif
  266 .endif # defined(EXPORT_SYMS)
  267 .if defined(PREFIX_SYMS)
  268         ${AWK} -v prefix=${PREFIX_SYMS} -f ${SYSDIR}/conf/kmod_syms_prefix.awk \
  269             ${.TARGET} /dev/null | xargs -J% ${OBJCOPY} % ${.TARGET}
  270 .endif
  271 .if !defined(DEBUG_FLAGS) && ${__KLD_SHARED} == no
  272         ${OBJCOPY} --strip-debug ${.TARGET}
  273 .endif
  274 
  275 .if ${COMPILER_TYPE} == "clang" || \
  276     (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60000)
  277 _MAP_DEBUG_PREFIX= yes
  278 .endif
  279 
  280 _ILINKS=machine
  281 .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
  282 _ILINKS+=${MACHINE_CPUARCH}
  283 .endif
  284 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
  285 _ILINKS+=x86
  286 .endif
  287 CLEANFILES+=${_ILINKS}
  288 
  289 all: ${PROG}
  290 
  291 beforedepend: ${_ILINKS}
  292 beforebuild: ${_ILINKS}
  293 
  294 # Ensure that the links exist without depending on it when it exists which
  295 # causes all the modules to be rebuilt when the directory pointed to changes.
  296 # Ensure that debug info references the path in the source tree.
  297 .for _link in ${_ILINKS}
  298 .if !exists(${.OBJDIR}/${_link})
  299 OBJS_DEPEND_GUESS+=     ${_link}
  300 .endif
  301 .if defined(_MAP_DEBUG_PREFIX)
  302 .if ${_link} == "machine"
  303 CFLAGS+= -fdebug-prefix-map=./machine=${SYSDIR}/${MACHINE}/include
  304 .else
  305 CFLAGS+= -fdebug-prefix-map=./${_link}=${SYSDIR}/${_link}/include
  306 .endif
  307 .endif
  308 .endfor
  309 
  310 .NOPATH: ${_ILINKS}
  311 
  312 ${_ILINKS}:
  313         @case ${.TARGET} in \
  314         machine) \
  315                 path=${SYSDIR}/${MACHINE}/include ;; \
  316         *) \
  317                 path=${SYSDIR}/${.TARGET:T}/include ;; \
  318         esac ; \
  319         path=`(cd $$path && /bin/pwd)` ; \
  320         ${ECHO} ${.TARGET:T} "->" $$path ; \
  321         ln -fns $$path ${.TARGET:T}
  322 
  323 CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS}
  324 
  325 .if defined(DEBUG_FLAGS)
  326 CLEANFILES+= ${FULLPROG} ${PROG}.debug
  327 .endif
  328 
  329 .if !target(install)
  330 
  331 _INSTALLFLAGS:= ${INSTALLFLAGS}
  332 .for ie in ${INSTALLFLAGS_EDIT}
  333 _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
  334 .endfor
  335 
  336 .if !target(realinstall)
  337 KERN_DEBUGDIR?= ${DEBUGDIR}
  338 realinstall: _kmodinstall
  339 .ORDER: beforeinstall _kmodinstall
  340 _kmodinstall: .PHONY
  341         ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
  342             ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}/
  343 .if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
  344         ${INSTALL} -T debug -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
  345             ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR}/
  346 .endif
  347 
  348 .include <bsd.links.mk>
  349 
  350 .if !defined(NO_XREF)
  351 afterinstall: _kldxref
  352 .ORDER: realinstall _kldxref
  353 .ORDER: _installlinks _kldxref
  354 _kldxref: .PHONY
  355         @if type kldxref >/dev/null 2>&1; then \
  356                 ${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
  357                 kldxref ${DESTDIR}${KMODDIR}; \
  358         fi
  359 .endif
  360 .endif # !target(realinstall)
  361 
  362 .endif # !target(install)
  363 
  364 .if !target(load)
  365 load: ${PROG} .PHONY
  366         ${KMODLOAD} -v ${.OBJDIR}/${PROG}
  367 .endif
  368 
  369 .if !target(unload)
  370 unload: .PHONY
  371         if ${KMODISLOADED} ${PROG} ; then ${KMODUNLOAD} -v ${PROG} ; fi
  372 .endif
  373 
  374 .if !target(reload)
  375 reload: unload load .PHONY
  376 .endif
  377 
  378 .if defined(KERNBUILDDIR)
  379 .PATH: ${KERNBUILDDIR}
  380 CFLAGS+=        -I${KERNBUILDDIR}
  381 .for _src in ${SRCS:Mopt_*.h}
  382 CLEANFILES+=    ${_src}
  383 .if !target(${_src})
  384 ${_src}:
  385         ln -sf ${KERNBUILDDIR}/${_src} ${.TARGET}
  386 .endif
  387 .endfor
  388 .else
  389 .for _src in ${SRCS:Mopt_*.h}
  390 CLEANFILES+=    ${_src}
  391 .if !target(${_src})
  392 ${_src}:
  393         :> ${.TARGET}
  394 .endif
  395 .endfor
  396 .endif
  397 
  398 # Respect configuration-specific C flags.
  399 CFLAGS+=        ${ARCH_FLAGS} ${CONF_CFLAGS}
  400 
  401 .if !empty(SRCS:Mvnode_if.c)
  402 CLEANFILES+=    vnode_if.c
  403 vnode_if.c: ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src
  404         ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -c
  405 .endif
  406 
  407 .if !empty(SRCS:Mvnode_if.h)
  408 CLEANFILES+=    vnode_if.h vnode_if_newproto.h vnode_if_typedef.h
  409 vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: ${SYSDIR}/tools/vnode_if.awk \
  410     ${SYSDIR}/kern/vnode_if.src
  411 vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h
  412         ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -h
  413 vnode_if_newproto.h:
  414         ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -p
  415 vnode_if_typedef.h:
  416         ${AWK} -f ${SYSDIR}/tools/vnode_if.awk ${SYSDIR}/kern/vnode_if.src -q
  417 .endif
  418 
  419 # Build _if.[ch] from _if.m, and clean them when we're done.
  420 # __MPATH defined in config.mk
  421 _MFILES=${__MPATH:T:O}
  422 _MPATH=${__MPATH:H:O:u}
  423 .PATH.m: ${_MPATH}
  424 .for _i in ${SRCS:M*_if.[ch]}
  425 _MATCH=M${_i:R:S/$/.m/}
  426 _MATCHES=${_MFILES:${_MATCH}}
  427 .if !empty(_MATCHES)
  428 CLEANFILES+=    ${_i}
  429 .endif
  430 .endfor # _i
  431 .m.c:   ${SYSDIR}/tools/makeobjops.awk
  432         ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c
  433 
  434 .m.h:   ${SYSDIR}/tools/makeobjops.awk
  435         ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -h
  436 
  437 .for _i in mii pccard
  438 .if !empty(SRCS:M${_i}devs.h)
  439 CLEANFILES+=    ${_i}devs.h
  440 ${_i}devs.h: ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs
  441         ${AWK} -f ${SYSDIR}/tools/${_i}devs2h.awk ${SYSDIR}/dev/${_i}/${_i}devs
  442 .endif
  443 .endfor # _i
  444 
  445 .if !empty(SRCS:Mbhnd_nvram_map.h)
  446 CLEANFILES+=    bhnd_nvram_map.h
  447 bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \
  448     ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
  449     ${SYSDIR}/dev/bhnd/nvram/nvram_map
  450 bhnd_nvram_map.h:
  451         sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
  452             ${SYSDIR}/dev/bhnd/nvram/nvram_map -h
  453 .endif
  454 
  455 .if !empty(SRCS:Mbhnd_nvram_map_data.h)
  456 CLEANFILES+=    bhnd_nvram_map_data.h
  457 bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.awk \
  458     ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
  459     ${SYSDIR}/dev/bhnd/nvram/nvram_map
  460 bhnd_nvram_map_data.h:
  461         sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
  462             ${SYSDIR}/dev/bhnd/nvram/nvram_map -d
  463 .endif
  464 
  465 .if !empty(SRCS:Musbdevs.h)
  466 CLEANFILES+=    usbdevs.h
  467 usbdevs.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs
  468         ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -h
  469 .endif
  470 
  471 .if !empty(SRCS:Musbdevs_data.h)
  472 CLEANFILES+=    usbdevs_data.h
  473 usbdevs_data.h: ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs
  474         ${AWK} -f ${SYSDIR}/tools/usbdevs2h.awk ${SYSDIR}/dev/usb/usbdevs -d
  475 .endif
  476 
  477 .if !empty(SRCS:Macpi_quirks.h)
  478 CLEANFILES+=    acpi_quirks.h
  479 acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks
  480         ${AWK} -f ${SYSDIR}/tools/acpi_quirks2h.awk ${SYSDIR}/dev/acpica/acpi_quirks
  481 .endif
  482 
  483 .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc)
  484 CLEANFILES+=    assym.inc genassym.o
  485 DEPENDOBJS+=    genassym.o
  486 DPSRCS+=        offset.inc
  487 .endif
  488 .if defined(MODULE_TIED)
  489 DPSRCS+=        offset.inc
  490 .endif
  491 .if !empty(SRCS:Moffset.inc) || !empty(DPSRCS:Moffset.inc)
  492 CLEANFILES+=    offset.inc genoffset.o
  493 DEPENDOBJS+=    genoffset.o
  494 .endif
  495 assym.inc: genassym.o
  496 offset.inc: genoffset.o
  497 assym.inc: ${SYSDIR}/kern/genassym.sh
  498         sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
  499 genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc
  500 genassym.o: ${SRCS:Mopt_*.h}
  501         ${CC} -c ${CFLAGS:N-flto:N-fno-common} \
  502             ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c
  503 offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o
  504         sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET}
  505 genoffset.o: ${SYSDIR}/kern/genoffset.c
  506 genoffset.o: ${SRCS:Mopt_*.h}
  507         ${CC} -c ${CFLAGS:N-flto:N-fno-common} \
  508             ${SYSDIR}/kern/genoffset.c
  509 
  510 CLEANDEPENDFILES+=      ${_ILINKS}
  511 # .depend needs include links so we remove them only together.
  512 cleanilinks:
  513         rm -f ${_ILINKS}
  514 
  515 OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
  516 .if defined(KERNBUILDDIR)
  517 OBJS_DEPEND_GUESS+= opt_global.h
  518 .endif
  519 
  520 .include <bsd.dep.mk>
  521 .include <bsd.clang-analyze.mk>
  522 .include <bsd.obj.mk>
  523 .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.