openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.9k stars 2.55k forks source link

Makefile and ofxaddons.com guide don't agree regarding file structure #896

Closed bilderbuchi closed 11 years ago

bilderbuchi commented 12 years ago

This concerns libraries included in addons in source form. According to this issue reported by @danomatika, the makefile can only compile libraries' source code if they are in an addon's /src folder. This is in contradiction with @obviousjim's guide to addons' folder structure at http://ofxaddons.com/howto.

danomatika commented 12 years ago

This is because the guide was written with OSX in mind. The Linux makefile compiles all the sources in the src directory and header and linking paths are set in config.make. For ofxPd, I simply moved the libpd source folder into src. It makes sense if you day precompiled and linked libs go in libs and raw lib sources go in src. I'd say the ofxaddons description should be changed.

bilderbuchi commented 12 years ago

mirroring from the other issue, I 'd say change the makefile if this entails a feasible effort. sure, this is not a dealbreaker, but at the least, the guide is wrong, at most the make file should be adapted to reflect the cleaner directory structure. Don't you agree it would be cleaner to keep external libs' sources in their separate folder would be much cleaner than dumping them in the addon source folder?

[edited]

danomatika commented 12 years ago

Also another note for those who haven't worked with OF on Linux. The makefile uses the name of its current folder for the name of the binary. So if the example is in an folder named "example" the app is named "example".

danomatika commented 12 years ago

I'm copying this reply here for completeness:

Look at ofxPd. The makefile works recursively through the folders. Of course I didn't dump everything into a flat folder. Libpd has almost a hundred source files.

bilderbuchi commented 12 years ago

I see your point. I think it's a matter of taste, then, where included libs' source files should reside, and I let others decide that. :-)

danomatika commented 12 years ago

Sure. I originally wanted things all in libs, but it seemed easier to modify the structure rather then try to modify the entire Makefile system.

bilderbuchi commented 11 years ago

I think we can close this, now that the new makefile system has landed in develop (which afaik follows the ofxAddonTemplate/ofxaddons.com).