I am trying to add multiple external source paths to a project. But so far I have been unable to. When using PROJECT_EXTERNAL_SOURCE_PATHS in the config.make i get an compiler error during make.

If I add:


It works. As does:


But if I try


I will get the error:

*** No rule to make target `obj/linux64/Release/.shared/library2/somefile.o', needed by `bin/emptyExample'.  Stop.

I also tried using $(PROJECT_ROOT)/../shared/library2 but same issue. There is a trailing space on both paths.

Any ideas? Or is there another way to achieve multiple source paths via the make file system?

Many thanks


I don’t think you can do it via the makefile. But you could maybe try it with softlinks to all your dependencies in a single directory?


that should work, seems like a bug in the makefiles, i’ll look into it


i just came across the same issue.
i could not work out how to add multiple paths to PROJECT_EXTERNAL_SOURCE_PATHS. it kept coming up with the same error you were getting @rc1.

so i ended up using only one PROJECT_EXTERNAL_SOURCE_PATHS,
and i added multiple paths to what i wanted to exclude using PROJECT_EXCLUSIONS.

weird that you can add multiple PROJECT_EXCLUSIONS but not PROJECT_EXTERNAL_SOURCE_PATHS…

is that a bug or limitation of the makefile?


Same for me, I’ve met the same problem …


I am running into the same problem now. Does anybody found a fix for this?


Any news about this problem?

Arturo, did you manage to fix the bug in the Makefile?

A workaround maybe?
(apart from adding all sources and use PROJECT_EXCLUSIONS to exclude most of them)

This problem is blocking for me.


Something wrong around these lines?


I also spotted that, and the following in

	ALL_OF_PROJECT_SOURCE_PATHS += $(shell find $(PROJECT_EXTERNAL_SOURCE_PATHS) -mindepth 1 -type d | grep -v "/\.[^\.]")

… but I’m not familiar enough with the Makefile syntax to fix the problem.