From owner-freebsd-questions Sun Dec 12 17:46: 4 1999 Delivered-To: freebsd-questions@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id C41E014E36 for ; Sun, 12 Dec 1999 17:46:02 -0800 (PST) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (cs1-gw.cs.binghamton.edu [128.226.171.72]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id UAA08238 for ; Sun, 12 Dec 1999 20:46:02 -0500 (EST) Date: Sun, 12 Dec 1999 19:32:48 -0500 (EST) From: Zhihui Zhang To: freebsd-questions@freebsd.org Subject: Compile the sample KLD code Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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