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

Makefiles issues #101

Open arturoc opened 11 years ago

arturoc commented 11 years ago

i've merged develop from the main repo and noticed that all the config.make in android examples had been deleted. please when doing modification to the examples remember to not touch android since the system is slightly different

also i've noticed that the Makefile in the examples includes config.make condiftionally, i think it's a good idea but the config.make should be in every example just to show what's the syntax

apart from that i've just had to add some variables to the makefiles and realized that there's still lot's of common parts that can be refactored: every linux system uses the same libraries so probably there's a way of unifying most of the contents of the per-platform files in one and then exclude things per architecture or something like that

perhaps we can have a folder structure like:

linux |_linux64 |_linux |_linuxarmv6 ...

where linux contains the common parts and the subfolders add or exclude whatever is specific to that architecture

bakercp commented 11 years ago

First, apologies for deleting the config.make files in the android examples. I wasn't being careful. Second, on further though I think I agree with having config.make in the examples. I was trying to strike a balance between minimal # of files to compile a program and thinking that we would have one single example that shows how to do custom configurations via config.make, etc.

I certainly agree with the need further refactoring on the linux side. It would be great. I would propose waiting until we get the makefile system running on osx and win, and the new addons.make / system libs integration in order to evaluate the best way to do the next round of refactoring.

arturoc commented 11 years ago

no worries, just telling because it has happened to me when doing stuff on the examples using scripts.

and yes i think it's good to have the check but having the config.make there makes it easier to setup in case you want to add additional libraries, search paths...

i'll take a look at the addons thing this week

kalwalt commented 11 years ago

i'm not sure if this is the right place but i notice that when i add some PROJECT_LDFLAGS or PROJECT_CFLAGS in config.make they didn't work. I tried the ofxArtoolkitPlus addon one hour ago and the only way to link the shared lib was to copy it in /usr/lib and adding

PROJECT_LDFLAGS = -rdynamic -lARToolKitPlus

In linux64 instead i have used :

PROJECT_LDFLAGS = -rdynamic $(OF_ROOT)/addons/ofxARToolKitPlus/libs/ARToolKitPlus/lib/linux64

i have had a similar issue settings ofxKinect adddon https://github.com/openFrameworks-RaspberryPi/openFrameworks/issues/93

@arturoc @bakercp Does it regular in your opinion?

bakercp commented 11 years ago

Hey @kalwalt I'm assuming you're using (https://github.com/fishkingsin/ofxARtoolkitPlus) -- it looks like that uses a shared lib (rather than static). Currently the makefiles aren't working correctly with addon's shared libs. We need to fix this and are planning to soon. Basically, the big project is to allow addons.make / and addons in general to be able to specify to the user / makefile system to use system libs (including shared libs), rather than requiring each addon and the core libs to compile and distribute libs for each and every platform, especially when (at least on the linux side) most of those libs are available via package managers. Anyway, good example / observation and it's on the todo list!

kalwalt commented 11 years ago

Hey @kalwalt I'm assuming you're using (https://github.com/fishkingsin/ofxARtoolkitPlus) -- it looks like that uses a shared lib (rather than static).

yes exactly . it is a bit tricky to link them with the config. Anyway the addon works with video grabber but issue with video Player. ( i will report also this , don't know if this is related to others encountered).