bakercp/openFrameworks — pull request #2 by arturoc (2012-11-29 10:15:25+00:00)
Title: makefile refactoring

ithis makes the PR against a clean pull from this branch, i've lost my commits but they are in the previous branch if we want to keep track.

i've joined all the config files in config.make since i found it quite hard to follow the logic with so many files. The naming was also confusing since core files were also used by projects.

Now both the core and projects makefile include config.make for configuration.

Then there's specific rules for each platform as before and rules for compiling that can be overridden by each specific platform optionally:

OF/project/Makefile -> core entry point
OF/project/makefileCommon/config.make -> common core/projects config
OF/project/makefileCommon/compile.core.make
OF/project/makefileCommon/compile.project.make
OF/project/makefileCommon/Makefile.examples -> projects entry point

OF/project/platform/config.variant.make -> same as before, removed redundancy in name
OF/project/platform/compile.core.make -> optional specific compiling for this platform
OF/project/platform/compile.project.make -> optional specific compiling for this platform

project/config.make
project/Makefile
project/addons.make

I've also renamed the makefiles to have a capital M since that's more standard, we actually changed that some versions ago.

for projects i have renamed the config.make and simplified the Makefile so they are compatible with the previous system

I've alse moved things that are not common from config.make to their respective makefile, so the makefile for the core takes care of creating the source list for the core and that doesn't happen for the project makefile and the project makefile creates the list of libraries

i'm also having trouble with some addons, seems to be related with the order in which system and core/project/addons libraries are included when linking

There's also now rules to have dependencies from projects to the OF library so if the OF library gets recompiled the project gets relinked and if any of the files in the core gets modified the library is recompiled before linking the project