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

Cache object: 1d30c7e65ea2979cbbe8bf7baa744aa5


[ 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.