Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Dec 1999 19:32:48 -0500 (EST)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        freebsd-questions@freebsd.org
Subject:   Compile the sample KLD code
Message-ID:  <Pine.GSO.3.96.991212192154.18468A-100000@sol.cs.binghamton.edu>

next in thread | raw e-mail | index | archive | help

I try to compile the sample KLD code at 
/usr/src/share/examples/kld/cdev/module in the following way:  

# mkdir /usr/kld
# cp /usr/src/share/examples/kld/cdev/module/* /usr/kld
# cd /usr/kld
# make
Warning: Object directory not changed from original /usr/kld
cc -O -pipe  -DKERNEL -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit
-Wne
sted-externs -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith
-Winline
-Wuninitialized -Wformat -Wunused  -fformat-extensions -ansi -DKLD_MODULE
-nostd
inc -I-  -I/usr/kld -I/usr/kld/@ -c cdev.c
cdev.c:68: sys/param.h: No such file or directory
cdev.c:69: sys/systm.h: No such file or directory
cdev.c:70: sys/ioccom.h: No such file or directory
In file included from cdev.c:71:
/usr/kld/cdev.h:73: sys/conf.h: No such file or directory   

[snip]

If I compile under /usr/src/share/examples/kld/cdev/module, then it works.

Can anyone explain why I can not copy the files to another directory and
compile the KLD at that place?  I notice that if I compile under
/usr/src/share/examples/kld/cdev/module, the link @ created pointed to
/usr/include.  Otherwise, it points to /!  Is there any document on those
make file templates <.bsd.kmod.mk>?

Any help is appreciated.

-Zhihui



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.991212192154.18468A-100000>