diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-10-09 04:44:10 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-10-09 04:44:10 +0000 |
commit | b0c509099cae96ba1b51130777dd23ff98aef03e (patch) | |
tree | d5bd20bfb788b6e32735fc0c39ee8b3af937055a /share/mk | |
parent | d3f2cfb6401288e7d55fdfff8dba0a70966686b5 (diff) |
no more lkm
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/Makefile | 4 | ||||
-rw-r--r-- | share/mk/bsd.README | 27 | ||||
-rw-r--r-- | share/mk/bsd.lkm.mk | 125 |
3 files changed, 3 insertions, 153 deletions
diff --git a/share/mk/Makefile b/share/mk/Makefile index 03aceac8934..c0da9657654 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.12 2011/09/24 07:26:01 espie Exp $ +# $OpenBSD: Makefile,v 1.13 2014/10/09 04:44:09 tedu Exp $ # $NetBSD: Makefile,v 1.12 1995/10/22 00:45:53 christos Exp $ FILES= bsd.README bsd.dep.mk bsd.lib.mk bsd.man.mk bsd.nls.mk \ bsd.obj.mk bsd.own.mk bsd.port.arch.mk bsd.port.mk \ bsd.port.subdir.mk bsd.prog.mk \ - bsd.regress.mk bsd.subdir.mk bsd.sys.mk sys.mk bsd.lkm.mk \ + bsd.regress.mk bsd.subdir.mk bsd.sys.mk sys.mk \ bsd.xconf.mk bsd.xorg.mk NOOBJ= noobj diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 035b55aef13..e7e8565b884 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.README,v 1.56 2014/09/29 19:37:51 gsoares Exp $ +# $OpenBSD: bsd.README,v 1.57 2014/10/09 04:44:09 tedu Exp $ # $NetBSD: bsd.README,v 1.17 1996/04/13 02:08:08 thorpej Exp $ # @(#)bsd.README 5.1 (Berkeley) 5/11/90 @@ -8,7 +8,6 @@ convention, named with the suffix ".mk". bsd.dep.mk - handle Makefile dependencies bsd.lib.mk - support for building libraries -bsd.lkm.mk - building loadable kernel modules bsd.man.mk - installing manual pages and their links bsd.nls.mk - National Language Support bsd.obj.mk - creating 'obj' directories and cleaning up @@ -465,27 +464,3 @@ DIST_OBJS The (sub)set of .o files to include in ${DIST_LIB}. [${OBJS}] DIST_CFLAGS Additional flags for the C compiler and assembler. [-Os] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -The include file <bsd.lkm.mk> has support for building the LKM's. It has -the same seven targets as <bsd.prog.mk>: all, clean, cleandir, depend, -install, and tags. In addition two targets are made available -that is specific to the LKM's: load, unload. - -It sets/uses the following variables (in addition to the <bsd.prog.mk>'s): - -LKM LKM name to build. - -LKMGRP Module group. - -LKMOWN Module owner. - -LKMMODE Module mode. - -POSTINSTALL Program to pass with '-p' flag to the modload. - If not defined, - POSTINSTALL=${LKM}install - is assumed. - -The include file <bsd.lkm.mk> includes the file named "../Makefile.inc" -if it exists, as well as the include file <bsd.man.mk>. diff --git a/share/mk/bsd.lkm.mk b/share/mk/bsd.lkm.mk deleted file mode 100644 index 4f1fc4e7864..00000000000 --- a/share/mk/bsd.lkm.mk +++ /dev/null @@ -1,125 +0,0 @@ -# $OpenBSD: bsd.lkm.mk,v 1.25 2013/10/15 22:40:00 deraadt Exp $ - -.if exists(${.CURDIR}/../Makefile.inc) -.include "${.CURDIR}/../Makefile.inc" -.endif - -.include <bsd.own.mk> - -.SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 - -# XXX In order to at least diminish the brokenness of trusting /sys to point -# to the tree we're actually belonging to we check BSDSRCDIR. On multi-tree -# machines /sys isn't always a link to the correct tree. -.if defined(BSDSRCDIR) -CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I${BSDSRCDIR}/sys -I${BSDSRCDIR}/sys/arch -.else -CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I/sys -I/sys/arch -.endif -.if ${WARNINGS:L} == "yes" -CFLAGS+= ${CDIAGFLAGS} -.endif - -.if ${MACHINE} == "amd64" -CFLAGS+= -mcmodel=kernel -.endif - -CFLAGS+= ${NOPIE_FLAGS} -AFLAGS+= ${NOPIE_FLAGS} -LDFLAGS+= ${NOPIE_LDFLAGS} - -LDFLAGS+= -r -.if defined(LKM) -SRCS?= ${LKM}.c -.if !empty(SRCS:N*.h:N*.sh) -OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/} -.endif -COMBINED?=combined.o -.if !defined(POSTINSTALL) -POSTINSTALL= ${LKM}install -.endif - -.if defined(OBJS) && !empty(OBJS) - -${COMBINED}: ${OBJS} ${DPADD} - ${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} - -.endif # defined(OBJS) && !empty(OBJS) - -.if !defined(MAN) -MAN= ${LKM}.1 -.endif # !defined(MAN) -.endif # defined(LKM) - -.MAIN: all -all: ${COMBINED} _SUBDIRUSE - -.if !target(clean) -clean: _SUBDIRUSE - rm -f a.out [Ee]rrs mklog *.core \ - ${LKM} ${COMBINED} ${OBJS} ${CLEANFILES} -.endif - -cleandir: _SUBDIRUSE clean - -.if !target(install) -.if !target(beforeinstall) -beforeinstall: -.endif -.if !target(afterinstall) -afterinstall: -.endif - -.if !target(realinstall) -realinstall: -.if defined(LKM) - ${INSTALL} ${INSTALL_COPY} -o ${LKMOWN} -g ${LKMGRP} -m ${LKMMODE} \ - ${COMBINED} ${DESTDIR}${LKMDIR}/${LKM}.o -.if exists(${.CURDIR}/${POSTINSTALL}) - ${INSTALL} ${INSTALL_COPY} -o ${LKMOWN} -g ${LKMGRP} -m 555 \ - ${.CURDIR}/${POSTINSTALL} ${DESTDIR}${LKMDIR} -.endif -.endif -.if defined(LINKS) && !empty(LINKS) -. for lnk file in ${LINKS} - @l=${DESTDIR}${LKMDIR}${lnk}; \ - t=${DESTDIR}${LKMDIR}${file}; \ - echo $$t -\> $$l; \ - rm -f $$t; ln $$l $$t -. endfor -.endif -.endif - - -load: ${COMBINED} - if [ -x ${.CURDIR}/${POSTINSTALL} ]; then \ - modload -d -o ${LKM} -e${LKM}_lkmentry \ - -p${.CURDIR}/${POSTINSTALL} ${COMBINED}; \ - else \ - modload -d -o ${LKM} -e${LKM}_lkmentry ${COMBINED}; \ - fi - -unload: - modunload -n ${LKM} - -install: maninstall _SUBDIRUSE - -maninstall: afterinstall -afterinstall: realinstall -realinstall: beforeinstall -.endif - -.if !defined(NOMAN) -.include <bsd.man.mk> -.endif - -.if !defined(NONLS) -.include <bsd.nls.mk> -.endif - -.include <bsd.obj.mk> -.include <bsd.dep.mk> -.include <bsd.subdir.mk> -.include <bsd.sys.mk> - -.PHONY: load unload |