kmod.mk (1c6eb1b25b3c2c6f3dad919c980ba68aacc2b518) kmod.mk (cc4a90c445aa04be36c3ef745cbe67fa339b94b5)
1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
2# $FreeBSD$
3#
4# The include file <bsd.kmod.mk> handles building and installing loadable
5# kernel modules.
6#
7#
8# +++ variables +++

--- 91 unchanged lines hidden (view full) ---

100# set because there are no standard paths for non-headers.
101CFLAGS+= -I. -I${SYSDIR}
102
103# Add -I path for altq headers as they are included via net/if_var.h
104# for example.
105CFLAGS+= -I${SYSDIR}/contrib/altq
106
107CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT}
1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
2# $FreeBSD$
3#
4# The include file <bsd.kmod.mk> handles building and installing loadable
5# kernel modules.
6#
7#
8# +++ variables +++

--- 91 unchanged lines hidden (view full) ---

100# set because there are no standard paths for non-headers.
101CFLAGS+= -I. -I${SYSDIR}
102
103# Add -I path for altq headers as they are included via net/if_var.h
104# for example.
105CFLAGS+= -I${SYSDIR}/contrib/altq
106
107CFLAGS.gcc+= -finline-limit=${INLINE_LIMIT}
108CFLAGS.gcc+= -fms-extensions
108CFLAGS.gcc+= --param inline-unit-growth=100
109CFLAGS.gcc+= --param large-function-growth=1000
110
111# Disallow common variables, and if we end up with commons from
112# somewhere unexpected, allocate storage for them in the module itself.
113CFLAGS+= -fno-common
114LDFLAGS+= -d -warn-common
115

--- 161 unchanged lines hidden (view full) ---

277.for ie in ${INSTALLFLAGS_EDIT}
278_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
279.endfor
280
281.if !target(realinstall)
282realinstall: _kmodinstall
283.ORDER: beforeinstall _kmodinstall
284_kmodinstall:
109CFLAGS.gcc+= --param inline-unit-growth=100
110CFLAGS.gcc+= --param large-function-growth=1000
111
112# Disallow common variables, and if we end up with commons from
113# somewhere unexpected, allocate storage for them in the module itself.
114CFLAGS+= -fno-common
115LDFLAGS+= -d -warn-common
116

--- 161 unchanged lines hidden (view full) ---

278.for ie in ${INSTALLFLAGS_EDIT}
279_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
280.endfor
281
282.if !target(realinstall)
283realinstall: _kmodinstall
284.ORDER: beforeinstall _kmodinstall
285_kmodinstall:
285 ${INSTALL} -T release -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
286 ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
286 ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
287.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
287 ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
288.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
288 ${INSTALL} -T debug -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
289 ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
289 ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR}
290.endif
291
292.include <bsd.links.mk>
293
294.if !defined(NO_XREF)
295afterinstall: _kldxref
296.ORDER: realinstall _kldxref

--- 181 unchanged lines hidden ---
290 ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR}
291.endif
292
293.include <bsd.links.mk>
294
295.if !defined(NO_XREF)
296afterinstall: _kldxref
297.ORDER: realinstall _kldxref

--- 181 unchanged lines hidden ---