Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 19 Jul 2002 22:06:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 19 Jul 2002 22:06:42 -0400 Received: from chaos.physics.uiowa.edu ([128.255.34.189]:21888 "EHLO chaos.physics.uiowa.edu") by vger.kernel.org with ESMTP id ; Fri, 19 Jul 2002 22:06:41 -0400 Date: Fri, 19 Jul 2002 21:09:43 -0500 (CDT) From: Kai Germaschewski X-X-Sender: kai@chaos.physics.uiowa.edu To: John Levon cc: linux-kernel@vger.kernel.org Subject: Re: kbuild - building a module/target from multiple directories In-Reply-To: <20020720015215.GA43258@compsoc.man.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1471 Lines: 36 On Sat, 20 Jul 2002, John Levon wrote: > On Fri, Jul 19, 2002 at 08:23:36PM -0500, Kai Germaschewski wrote: > > > > With kbuild in 2.5, how do I specify that a module/target is to be built of > > > object files and sub-directories ? > > > > Short answer: Don't. > > Why not ? Simply because kbuild can't handle it nicely ? Well, if you see the parts of your project as really separate, it probably makes sense to do the modularization also at the module level, i.e. have your project use some number of modules which can be split into subdirs without problems. If it's all logically only one thing (as linking it all into just one module implies), then why not put it into just one directory - maybe using some prefix to the filenames to distinguish separate entities (e.g. lowlevel ll_* highlevel hl_*). drivers/net has 145 .c files, I doubt you'll have more than that ;) I made kbuild handle this case (in the way above) for XFS, but in a way it's against the normal way how the source is organized in the kernel tree, and I don't see a good reason to change that. Dirs are used as higher level containers, like "fs" all file system-specific things and then fs/{ext2,nfs,...} with one file system per dir. --Kai - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/