openFrameworks-RaspberryPi / openFrameworks

This repo has migrated into the openFramworks core! Please go to http://github.com/openFrameworks/openFrameworks for the latest!
http://github.com/openFrameworks/openFrameworks
Other
104 stars 11 forks source link

refactor @bakercp Makefiles to simplify and some fixes #55

Closed arturoc closed 11 years ago

arturoc commented 11 years ago

don't merge yet, only for review and so we can discuss the structure better

mainly 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 also want to move things that are not common from config.make to their respective makefile, right now (and with the current system in develop-raspberrypi) the projects makefile is creating the list of core sources and the core makefile is creating the libraries sources, for example, which is not needed

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

bakercp commented 11 years ago

Very cool. I'll check and test soon.

I'm trying to keep the makefile system in it's own branch off the core for the moment -- could you PR against this branch?

https://github.com/bakercp/openFrameworks/tree/feature-cross-platform-makefiles

CB

jvcleave commented 11 years ago

I chatted with @bakercp a bit about this as I was having trouble finding where the proper place to link system libs for a certain project should be done. I was thinking of putting this in a UML style diagram but finding one we could share/cross platform was rough.

However today I took a look at the drawing tool in Google docs and it is quite nice (and shareable/exportable). I think something like this may help organize, discuss and debug. I can take an initial stab at it tonight if you guys think it may help

arturoc commented 11 years ago

@jvcleave yes that would be great we can add it in the tutorials section in the web once it's definitive

@bakercp i'm going to close this and send it to your makefile branch