From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 8 21:30:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF8CA170CA0 for ; Thu, 8 Jun 2006 17:13:40 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from mail44.e.nsc.no (mail44.e.nsc.no [193.213.115.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2218243D77 for ; Thu, 8 Jun 2006 17:13:39 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from Unknown-00-c0-9f-49-78-d8.lan (ti131310a080-10195.bb.online.no [85.165.231.211]) by mail44.nsc.no (8.13.6/8.13.5) with ESMTP id k58HDZum023046; Thu, 8 Jun 2006 19:13:36 +0200 (CEST) From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 8 Jun 2006 19:13:36 +0200 User-Agent: KMail/1.7 References: <1149761572$95415$77000985@hongz@promisechina.com> In-Reply-To: <1149761572$95415$77000985@hongz@promisechina.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606081913.37301.hselasky@c2i.net> Cc: hongz@promisechina.com Subject: Re: help:Makefile template for device drivers with multiple directories X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 21:30:19 -0000 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 --HPS