kmod.mk (233099) | kmod.mk (241711) |
---|---|
1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 | 1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 |
2# $FreeBSD: stable/9/sys/conf/kmod.mk 233099 2012-03-17 22:29:05Z dim $ | 2# $FreeBSD: stable/9/sys/conf/kmod.mk 241711 2012-10-19 00:22:09Z jhb $ |
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. --- 56 unchanged lines hidden (view full) --- 67KMODLOAD?= /sbin/kldload 68KMODUNLOAD?= /sbin/kldunload 69OBJCOPY?= objcopy 70 71.if defined(KMODDEPS) 72.error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" 73.endif 74 | 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. --- 56 unchanged lines hidden (view full) --- 67KMODLOAD?= /sbin/kldload 68KMODUNLOAD?= /sbin/kldunload 69OBJCOPY?= objcopy 70 71.if defined(KMODDEPS) 72.error "Do not use KMODDEPS on 5.0+; use MODULE_VERSION/MODULE_DEPEND" 73.endif 74 |
75# Enable CTF conversion on request. 76.if defined(WITH_CTF) 77.undef NO_CTF 78.endif 79 | |
80.include <bsd.init.mk> 81 82.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S 83 84# amd64 and mips use direct linking for kmod, all others use shared binaries 85.if ${MACHINE_CPUARCH} != amd64 && ${MACHINE_CPUARCH} != mips 86__KLD_SHARED=yes 87.else --- 113 unchanged lines hidden (view full) --- 201.endif 202 203.if ${__KLD_SHARED} == yes 204${KMOD}.kld: ${OBJS} 205.else 206${FULLPROG}: ${OBJS} 207.endif 208 ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} | 75.include <bsd.init.mk> 76 77.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S 78 79# amd64 and mips use direct linking for kmod, all others use shared binaries 80.if ${MACHINE_CPUARCH} != amd64 && ${MACHINE_CPUARCH} != mips 81__KLD_SHARED=yes 82.else --- 113 unchanged lines hidden (view full) --- 196.endif 197 198.if ${__KLD_SHARED} == yes 199${KMOD}.kld: ${OBJS} 200.else 201${FULLPROG}: ${OBJS} 202.endif 203 ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} |
209 @[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} | 204.if defined(MK_CTF) && ${MK_CTF} != "no" 205 ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS} 206.endif |
210.if defined(EXPORT_SYMS) 211.if ${EXPORT_SYMS} != YES 212.if ${EXPORT_SYMS} == NO 213 :> export_syms 214.elif !exists(${.CURDIR}/${EXPORT_SYMS}) 215 echo ${EXPORT_SYMS} > export_syms 216.else 217 grep -v '^#' < ${EXPORT_SYMS} > export_syms --- 267 unchanged lines hidden --- | 207.if defined(EXPORT_SYMS) 208.if ${EXPORT_SYMS} != YES 209.if ${EXPORT_SYMS} == NO 210 :> export_syms 211.elif !exists(${.CURDIR}/${EXPORT_SYMS}) 212 echo ${EXPORT_SYMS} > export_syms 213.else 214 grep -v '^#' < ${EXPORT_SYMS} > export_syms --- 267 unchanged lines hidden --- |