kmod.mk (152918) | kmod.mk (154974) |
---|---|
1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 | 1# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 |
2# $FreeBSD: head/sys/conf/kmod.mk 152918 2005-11-29 09:37:42Z ru $ | 2# $FreeBSD: head/sys/conf/kmod.mk 154974 2006-01-29 02:52:42Z mlaier $ |
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. --- 20 unchanged lines hidden (view full) --- 31# MFILES Optionally a list of interfaces used by the module. 32# This file contains a default list of interfaces. 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# | 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. --- 20 unchanged lines hidden (view full) --- 31# MFILES Optionally a list of interfaces used by the module. 32# This file contains a default list of interfaces. 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# |
|
39# DESTDIR The tree where the module gets installed. [not set] 40# 41# +++ targets +++ 42# 43# install: 44# install the kernel module; if the Makefile 45# does not itself define the target install, the targets 46# beforeinstall and afterinstall may also be used to cause --- 67 unchanged lines hidden (view full) --- 114.if ${MACHINE_ARCH} == amd64 115CFLAGS+= -fno-omit-frame-pointer 116.endif 117 118.if ${MACHINE_ARCH} == "powerpc" 119CFLAGS+= -mlongcall -fno-omit-frame-pointer 120.endif 121 | 41# DESTDIR The tree where the module gets installed. [not set] 42# 43# +++ targets +++ 44# 45# install: 46# install the kernel module; if the Makefile 47# does not itself define the target install, the targets 48# beforeinstall and afterinstall may also be used to cause --- 67 unchanged lines hidden (view full) --- 116.if ${MACHINE_ARCH} == amd64 117CFLAGS+= -fno-omit-frame-pointer 118.endif 119 120.if ${MACHINE_ARCH} == "powerpc" 121CFLAGS+= -mlongcall -fno-omit-frame-pointer 122.endif 123 |
124.if defined(FIRMWS) 125.if !exists(@) 126${KMOD:S/$/.c/}: @ 127.else 128${KMOD:S/$/.c/}: @/tools/fw_stub.awk 129.endif 130 ${AWK} -f @/tools/fw_stub.awk ${FIRMWS} -m${KMOD} -c${KMOD:S/$/.c/g} 131 132SRCS+= ${KMOD:S/$/.c/} 133CLEANFILES+= ${KMOD:S/$/.c/} 134 135.for _firmw in ${FIRMWS} 136${_firmw:C/\:.*$/.fwo/}: ${_firmw:C/\:.*$//} 137 @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} 138.if !exists(${.CURDIR}/${_firmw:C/\:.*$//}) 139 ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//} 140 ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} ${_firmw:C/\:.*$//} 141 rm -f ${_firmw:C/\:.*$//} 142.else 143 ${LD} -b binary ${LDFLAGS} -r -d -o ${.TARGET} ${_firmw:C/\:.*$//} 144.endif 145 146OBJS+= ${_firmw:C/\:.*$/.fwo/} 147.endfor 148.endif 149 |
|
122OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 123 124.if !defined(PROG) 125PROG= ${KMOD}.ko 126.endif 127 128.if !defined(DEBUG_FLAGS) 129FULLPROG= ${PROG} --- 279 unchanged lines hidden --- | 150OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 151 152.if !defined(PROG) 153PROG= ${KMOD}.ko 154.endif 155 156.if !defined(DEBUG_FLAGS) 157FULLPROG= ${PROG} --- 279 unchanged lines hidden --- |