makefile - How can I build include path through my dependencies? -
i have variable, deps
, list of libs, e.g. libs/a libs/b
. have makefile set build in correct order, want set variable include_path
add libs' include directories.
right looks like:
include_path = $(foreach dep,$(deps),-i$(root)/$(dep)/include )
which works.
but have library, libs/c
depends on other two, , app depends on it. write deps = libs/c libs/a libs/b
in makefile include_path
correct there way write deps = libs/c
suffices , include_path
still -i../libs/c/include -i../libs/a/include -i../libs/b/include
?
Comments
Post a Comment