From owner-freebsd-questions@FreeBSD.ORG Thu Jun 8 11:01:16 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C1A916D47B for ; Thu, 8 Jun 2006 09:28:19 +0000 (UTC) (envelope-from hongz@promisechina.com) Received: from mxdxt7.hichina.com (mxdxt7.hichina.com [218.244.143.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CA4243D45 for ; Thu, 8 Jun 2006 09:28:16 +0000 (GMT) (envelope-from hongz@promisechina.com) Received: from 222.128.58.137 (HELO hongzhao) (envelope-from hongz@promisechina.com) by mxdxt7.hichina.com (quarkmail-1.2.1) with ESMTP id S5174549AbWFHJ2C for freebsd-questions@freebsd.org; Thu, 8 Jun 2006 17:28:02 +0800 From: To: Date: Thu, 8 Jun 2006 17:28:10 +0800 MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcaK3du1P4px1shCTPyecPZuUEsadg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 Message-ID: <1149758882$89597$34525373@hongz@promisechina.com> X-Mailman-Approved-At: Thu, 08 Jun 2006 11:55:39 +0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: help:Makefile template about device driver with multiple directories X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 11:01:16 -0000 Hi guys: I have one urgent question to ask, please help me on this! The following is a Makefile template for device driver with all sources codes locating in the same directory. My question is how to write the Makefile when the driver source codes located different directories. For example, my driver source codes maybe include: osd/*.c engine/*.c and cam/*.c. Could someone provide me such a Makefile template? Your help will be highly appreciated! .PATH: . KMOD = shasta SRCS = shasta.c event.c . SRCS += device_if.h bus_if.h pci_if.h SRCS += opt_scsi.h opt_cam.h .... .include Yours, Hong