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

Cache object: e93e9fae500005d9da0d736cbf61e9cc


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