help:Makefile template for device drivers with multiple
directories
Hans Petter Selasky
hselasky at c2i.net
Thu Jun 8 21:30:19 UTC 2006
On Thursday 08 June 2006 12:13, hongz at promisechina.com wrote:
> Hi guys:
>
>
>
> Need your helps again! The following is a Makefile template for a device
> driver in FreeBSD. But when my driver source codes locate in multiple
> directories (such as under osd/, engine/, and cam/), how to write the
> Makefile? I have tried but still can not get through this, please give me a
> help!
>
Does the following example help?
S= ${.CURDIR}/../..
.PATH: $S/dev/usb $S/dev/usb2 $S/pci
KMOD= usb
SRCS= bus_if.h device_if.h usb_if.h usb_if.c \
vnode_if.h \
opt_usb.h \
hid.c hid.h usbhid.h \
usb_quirks.c ../usb/usb_quirks.h \
usb_ethersubr.c usbdevs.h \
_uhub.c \
_usb.c ../usb2/usb.h \
_usb_requests.c \
_usb_subr.c ../usb2/usb_subr.h \
_usb_transfer.c \
../usb2/usb_port.h
SRCS+= _uhci_pci.c _uhci.c ../usb2/uhci.h
SRCS+= _ohci_pci.c _ohci.c ../usb2/ohci.h
SRCS+= _ehci_pci.c _ehci.c ../usb2/ehci.h
SRCS+= opt_bus.h pci_if.h
.include <bsd.kmod.mk>
--HPS
More information about the freebsd-hackers
mailing list