Changeset View
Changeset View
Standalone View
Standalone View
sys/conf/kmod.mk
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | |||||
.if !defined(PROG) | .if !defined(PROG) | ||||
PROG= ${KMOD}.ko | PROG= ${KMOD}.ko | ||||
.endif | .endif | ||||
.if !defined(DEBUG_FLAGS) | .if !defined(DEBUG_FLAGS) | ||||
FULLPROG= ${PROG} | FULLPROG= ${PROG} | ||||
.else | .else | ||||
FULLPROG= ${PROG}.debug | FULLPROG= ${PROG}.full | ||||
${PROG}: ${FULLPROG} ${PROG}.symbols | ${PROG}: ${FULLPROG} ${PROG}.debug | ||||
${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.symbols\ | ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \ | ||||
${FULLPROG} ${.TARGET} | ${FULLPROG} ${.TARGET} | ||||
${PROG}.symbols: ${FULLPROG} | ${PROG}.debug: ${FULLPROG} | ||||
${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} | ${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET} | ||||
.endif | .endif | ||||
.if ${__KLD_SHARED} == yes | .if ${__KLD_SHARED} == yes | ||||
${FULLPROG}: ${KMOD}.kld | ${FULLPROG}: ${KMOD}.kld | ||||
${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld | ${LD} -Bshareable ${_LDFLAGS} -o ${.TARGET} ${KMOD}.kld | ||||
.if !defined(DEBUG_FLAGS) | .if !defined(DEBUG_FLAGS) | ||||
${OBJCOPY} --strip-debug ${.TARGET} | ${OBJCOPY} --strip-debug ${.TARGET} | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | ${_ILINKS}: | ||||
esac ; \ | esac ; \ | ||||
path=`(cd $$path && /bin/pwd)` ; \ | path=`(cd $$path && /bin/pwd)` ; \ | ||||
${ECHO} ${.TARGET:T} "->" $$path ; \ | ${ECHO} ${.TARGET:T} "->" $$path ; \ | ||||
ln -sf $$path ${.TARGET:T} | ln -sf $$path ${.TARGET:T} | ||||
CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} | CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} | ||||
.if defined(DEBUG_FLAGS) | .if defined(DEBUG_FLAGS) | ||||
CLEANFILES+= ${FULLPROG} ${PROG}.symbols | CLEANFILES+= ${FULLPROG} ${PROG}.debug | ||||
.endif | .endif | ||||
.if !target(install) | .if !target(install) | ||||
_INSTALLFLAGS:= ${INSTALLFLAGS} | _INSTALLFLAGS:= ${INSTALLFLAGS} | ||||
.for ie in ${INSTALLFLAGS_EDIT} | .for ie in ${INSTALLFLAGS_EDIT} | ||||
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} | _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}} | ||||
.endfor | .endfor | ||||
.if !target(realinstall) | .if !target(realinstall) | ||||
KERN_DEBUGDIR?= ${DEBUGDIR} | |||||
realinstall: _kmodinstall | realinstall: _kmodinstall | ||||
.ORDER: beforeinstall _kmodinstall | .ORDER: beforeinstall _kmodinstall | ||||
_kmodinstall: | _kmodinstall: | ||||
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ | ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ | ||||
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} | ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} | ||||
.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" | .if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" | ||||
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ | ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ | ||||
${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} | ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${KERN_DEBUGDIR}${KMODDIR} | ||||
imp:
This change (.symbols -> .debug) likely will break people's scripts even worse than moving the… | |||||
.endif | .endif | ||||
.include <bsd.links.mk> | .include <bsd.links.mk> | ||||
.if !defined(NO_XREF) | .if !defined(NO_XREF) | ||||
afterinstall: _kldxref | afterinstall: _kldxref | ||||
.ORDER: realinstall _kldxref | .ORDER: realinstall _kldxref | ||||
.ORDER: _installlinks _kldxref | .ORDER: _installlinks _kldxref | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |
This change (.symbols -> .debug) likely will break people's scripts even worse than moving the files.