diff options
author | msmith <msmith@FreeBSD.org> | 2002-01-11 01:11:44 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2002-01-11 01:11:44 +0000 |
commit | 2f13afa09c7bc1e4af91731ca10d1c30847a8daa (patch) | |
tree | a4c8e1fc076acea8ad0ccd3472608709b466c5a8 /sys/conf/kmod.mk | |
parent | 7ec591383b46b2353bc78b9dc12dcf430f935831 (diff) | |
download | FreeBSD-src-2f13afa09c7bc1e4af91731ca10d1c30847a8daa.zip FreeBSD-src-2f13afa09c7bc1e4af91731ca10d1c30847a8daa.tar.gz |
Reverse the sense of EXPORT_SYMS. If EXPORT_SYMS is not
defined, no symbols are exported from the module. This is
the typical configuration for most device drivers and
standalone modules; only infrastructure modules or those with
special requirements typically need to export symbols.
Don't print the objcopy commands as they are run when converting
symbols; they're bulky and annoying in many cases.
Diffstat (limited to 'sys/conf/kmod.mk')
-rw-r--r-- | sys/conf/kmod.mk | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 72e93a1..dbec48f 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -52,8 +52,8 @@ # This file contains a default list of interfaces. # # EXPORT_SYMS A list of symbols that should be exported from the module, -# or the name of a file containing a list of symbols, or NO -# to export no symbols. If missing, all global symbols are +# or the name of a file containing a list of symbols, or YES +# to export all symbols. If not defined, no symbols are # exported. # # +++ targets +++ @@ -153,13 +153,15 @@ ${PROG}: ${FULLPROG} ${FULLPROG}: ${KMOD}.kld ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld -.if defined(EXPORT_SYMS) +EXPORT_SYMS?= NO +.if ${EXPORT_SYMS} != YES CLEANFILES+= ${.OBJDIR}/export_syms .endif ${KMOD}.kld: ${OBJS} ${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS} .if defined(EXPORT_SYMS) +.if ${EXPORT_SYMS} != YES .if ${EXPORT_SYMS} == NO touch ${.OBJDIR}/export_syms .elif !exists(${.CURDIR}/${EXPORT_SYMS}) @@ -169,7 +171,8 @@ ${KMOD}.kld: ${OBJS} .endif awk -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ ${.OBJDIR}/export_syms | \ - xargs -t -J% ${OBJCOPY} % ${.TARGET} + xargs -J% ${OBJCOPY} % ${.TARGET} +.endif .endif |