xref: /freebsd/share/examples/kld/cdev/module/Makefile (revision 7f3dea244c40159a41ab22da77a434d7c5b5e85a)
1# 08 Nov 1998
2#
3# Makefile for kld char device driver.
4#
5# 08 Nov 1998 Rajesh Vaidheeswarran
6#
7# Copyright (c) 1998 Rajesh Vaidheeswarran
8# All rights reserved.
9#
10# Redistribution and use in source and binary forms, with or without
11# modification, are permitted provided that the following conditions
12# are met:
13# 1. Redistributions of source code must retain the above copyright
14#    notice, this list of conditions and the following disclaimer.
15# 2. Redistributions in binary form must reproduce the above copyright
16#    notice, this list of conditions and the following disclaimer in the
17#    documentation and/or other materials provided with the distribution.
18# 3. All advertising materials mentioning features or use of this software
19#    must display the following acknowledgement:
20#      This product includes software developed by Rajesh Vaidheeswarran.
21# 4. The name Rajesh Vaidheeswarran may not be used to endorse or promote
22#    products derived from this software without specific prior written
23#    permission.
24#
25# THIS SOFTWARE IS PROVIDED BY RAJESH VAIDHEESWARRAN ``AS IS'' AND ANY
26# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28# ARE DISCLAIMED.  IN NO EVENT SHALL THE RAJESH VAIDHEESWARRAN BE LIABLE
29# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35# SUCH DAMAGE.
36#
37# $FreeBSD$
38#
39# Copyright (c) 1993 Terrence R. Lambert.
40# All rights reserved.
41#
42# Redistribution and use in source and binary forms, with or without
43# modification, are permitted provided that the following conditions
44# are met:
45# 1. Redistributions of source code must retain the above copyright
46#    notice, this list of conditions and the following disclaimer.
47# 2. Redistributions in binary form must reproduce the above copyright
48#    notice, this list of conditions and the following disclaimer in the
49#    documentation and/or other materials provided with the distribution.
50# 3. All advertising materials mentioning features or use of this software
51#    must display the following acknowledgement:
52#      This product includes software developed by Terrence R. Lambert.
53# 4. The name Terrence R. Lambert may not be used to endorse or promote
54#    products derived from this software without specific prior written
55#    permission.
56#
57# THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY
58# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
59# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
60# ARE DISCLAIMED.  IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE
61# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
62# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
63# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
64# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
65# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
66# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
67# SUCH DAMAGE.
68#
69
70BINDIR	= /tmp
71SRCS	= cdev.c cdevmod.c
72KMOD	= cdev
73NOMAN	= t
74KLDMOD	= t
75
76KLDLOAD		= /sbin/kldload
77KLDUNLOAD	= /sbin/kldunload
78
79CLEANFILES+= ${KMOD}
80
81load: /dev/cdev
82	${KLDLOAD} -v ./${KMOD}
83
84unload:
85	rm -f /dev/cdev
86	${KLDUNLOAD} -v -n ${KMOD}
87
88/dev/cdev:
89	mknod /dev/cdev c 32 0
90
91.include <bsd.kmod.mk>
92