Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2006 19:13:36 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-hackers@freebsd.org
Cc:        hongz@promisechina.com
Subject:   Re: help:Makefile template for device drivers with multiple directories
Message-ID:  <200606081913.37301.hselasky@c2i.net>
In-Reply-To: <1149761572$95415$77000985@hongz@promisechina.com>
References:  <1149761572$95415$77000985@hongz@promisechina.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 08 June 2006 12:13, hongz@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606081913.37301.hselasky>