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-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

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