Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Feb 2005 17:00:22 +0000
From:      Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
To:        freebsd-questions@freebsd.org
Subject:   Makefile and directory layout
Message-ID:  <20050216170022.GB93269@dogma.freebsd-uk.eu.org>

next in thread | raw e-mail | index | archive | help

Hi all,

I'm about to port several libraries to *nix because a new customer needs it
to run on an open source OS.  I need some ideas for how to set this up.

It's going to be a binary-only distribution, AFAIK, but I don't know if that
should affect the directory layout.

What I have are a lot of libraries (components, really), and many, but not
all, have nested dependencies.

Am I better off with a flat directory with subdirs for each library and one
big subdir for all include files?  Or, does it make more sense to place
library source directories and header files *within* the directories of
libraries that need them?

So, if libfoo requires libbar and no other library does:

proj/
	Makefile
	include/
		foo.h
		bar.h
	libfoo/
		Makefile
		src/
			foo.c
	libbar/
		Makefile
		src/
			bar.c

**OR**

proj/
	Makefile
	include/
		foo.h
	libfoo/
		Makefile
		include/
			bar.h
		src/
			foo.c
		libbar/
			Makefile
			src/
				bar.c

Is there a better way?  Especially for header files just needed internally 
for the library itself versus headers shared between modules?


Jonathon McKitrick
--
My other computer is your Windows box.



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