large scale makefiles

Reading the other blogs, it seems like not that many people have heard of makefiles either.  I guess it’s one of the things that people skip over since it’s not one of the main things you worry about when coding, though it does make your life alot more convenient.

I’ve been wondering how a makefile or makefiles for large scale projects would work.  The makefiles I’ve created so far for the two assignments have been relatively short compared to how big it could be.  However, in both of these makefiles, it seems like both have required me to list essentially every single file that’s required to make the program run, as well as their object files.  This makes sense, since it’s logical for all filles to contribute to program functionality, but one must consider that these have been really small projects.  In a project with less than 10 files or so, the makefile can be very manageable.  Anything more becomes alot less manageable.  For reasonable large scale projects, such as one with 100 files, who can imagine a makefile with over 150 entries?  Even just looking through the makefile would be a pain.  Of course, a potential solution would be to use multiple makefiles, but then if everything is in one directory you wouldn’t be able to differentiate the makefiles.  If there were multiple directories, you would still require one really large makefile that indexed all the other makefiles in other directories.  Editing so many makefiles can still be a really big hassle.

Perhaps it’s time for someone to create a makefile management system.  I haven’t ever heard of a system that manages makefiles, but I think it would be relatively easy to create. The initialization could create makefiles based on existing files in the project, and then provide a gui interface which showed how makefiles linked to each other as well as allowed editing  This could really help out someone with a project of say, 500 files.

Leave a Reply