[geeks] UNIX development and makefile discussion
Mouse
mouse at Rodents-Montreal.ORG
Wed Aug 14 09:38:19 CDT 2013
> I'm writing some UNIX code that consists of a dozen or so source
> files for the first time. I am ok with setting up makefiles for
> small projects of a few files in one directory but things are
> starting to get out of hand. [...subdirectories...common code...]
> How do you organize projects that consist of multiple main programs
> and various functional pieces, some shared, some dedicated to a
> specific main program?
Personally, there are two major tacks I might take for this.
One is to put everything in a single directory, with the Makefile set
up to build different programs from their main files and their common
bits.
The other is to build a library separately, then use it with the main
programs.
Which I'd pick depends on things like how useful I expect the common
pieces to be to other programs, how well I can decouple them from the
non-common pieces, how likely it seems that changes to one will be
accompanied by changes to the other....
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
More information about the geeks
mailing list