OP-TEE/optee_os — pull request #85 by jforissier (2014-10-22 17:50:22+00:00)
Title: Add support for per-directory/per-library/per-file includes, and per-lib...

...rary CPP flags

The new variables that can be used in sub.mk are:

1) For includes: incdirs-y, incdirs-lib-y, incdirs--y

For example, suppose core/lib/libfoo/sub.mk contains the following:

# All source files declared in $(srcs-y) in this sub.mk will
# have -Icore/lib/libfoo/include
incdirs-y := include

# All source files for the current library $(libname) will be built
# with -Icore/lib/libfoo/include/baz (even files that are in other
# directories)
incdirs-lib-y := include/baz

# In addition to the above, bar.c will be compiled with
# -Icore/lib/libfoo/include/bar
incdirs-bar.c-y := include/bar

2) For CPP flags: cppflags-lib-y

For example, to add -DLIBFOO to all the source files that belong to the same
library, add this to any of the sub.mk files:

cppflags-lib-y := -DLIBFOO

Signed-off-by: Jerome Forissier