Confine .o files to single build directory?

I have several openFrameworks apps that are each compiled with different CFLAGS and LDFLAGS. If I compile OneApplication, and then compile AnotherApplication it seems to trigger a full recompile of all the oF libs.

My theory is that if I can convince the build process to put all the compiled products in the application directory, rather than littered variously through the openframeworks root, I can trade disk space for quick compiles.

This may not be the right solution. If it is, I don’t know how to pull it off. Any thoughts?

It looks like it’s actually the addons to which this problem applies, not to the core libraries themselves. Addon object files are built in each addon’s respective tree.

Looking in, it looks like a this behavior hinges on the presence or absence of PROJECT_ADDON_PATHS. The Makefile rules associated with that variable appear to generate all addon object files in $(PROJECT_ADDONS_OBJ_PATH).

I’ve tried setting PROJECT_ADDON_PATHS in my project’s config.make, but the object files are still being generated in the addon subtree. Halp! My make-fu is weak.

that is the expected behaviour, if you change the compile flags then the files need to be recompiled in order for those flags to have any effect. for example if you use -O2 instead of -O3 and recompile it needs to recompile all those files. arguably we could apply those flags only to the project files and have the addons code always use the default ones but i think it’s safer this way