openframeworks / openframeworks/openFrameworks
Problem with makefiles and local addons dependencies
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
When I use local addons in a project, and when one of the local addon has dependent addons, the makefile seems to append unrelated paths to the dependency paths. For example, I'm using ofxHTTP, which uses a number of dependent addons, and one of them is ofxSSLManager. Here's a snippet of output from make using the MAKEFILE_DEBUG flag:
---OF_PROJECT_DEPENDENCY_FILES---
...
/home/pi/of91a6/addons/obj/linuxarmv6l/Debug/ofxSSLManager/./src/Global/FileLoader.d
/home/pi/of91a6/addons/obj/linuxarmv6l/Debug/ofxSSLManager/./src/Guido/GuidoHelper.d
/home/pi/of91a6/addons/obj/linuxarmv6l/Debug/ofxSSLManager/./src/Guido/GmnSvgStrOps.d
...
The parts after ./ are some of my source files that are completely unrelated to the addon. It does that for every addon that is a dependent of a local addon. The makefile seems to assume they are in the default addons folder, even though they are added to the local addons folder (specified in addons.make using relative paths). Top level addons seem to be fine.
If I put the addons in the normal OF_ROOT/addons directory, then it seems to be working fine. I'm trying to compile the project under Raspbian using the default Makefile.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the build on Raspbian with local addon paths in addons.make and MAKEFILE_DEBUG enabled, using the default Makefile. Trace how dependency paths are assembled for dependent addons and verify that the generated paths point to the dependent addon sources rather than unrelated files; a successful corrected build is the completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, raspberry-pi
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100