OP-TEE / optee_os

Trusted side of the TEE
Other
1.61k stars 1.07k forks source link

Including external h files to optee_os build #5740

Closed Nivous closed 1 year ago

Nivous commented 1 year ago

Hi!

I have optee_os as a submodule in my project. I want to be able to include and compile my platform with header files and source files from another submodule in my project. I cannot find a way to do it. When reading the build system, I thought that adding -I${PATH_TO_HEADERS} to core-platform-cppflags would work for the headers. I thought that adding the sources to srcs-y in sub.mk file would work for the sources. I still don't know about the sources, but the headers do not get included. Any suggestions on how to do it?

Thanks a lot, Niv.

jenswi-linaro commented 1 year ago

There's an example in core/drivers/crypto/se050/sub.mk where the plug and trust library is compiled with OP-TEE as an external module.

Nivous commented 1 year ago

Thanks a lot for the reply!

Tried doing it as the makefile you suggested, and now I get other errors but from some reason I get: "No such file or directory" for the included file.

Nivous commented 1 year ago

solved it :)

I transferred the include name from 1 makefile to another and that seems to cause the issue. When adding the "-I${var}" at the "final" make file it worked.

Thanks a lot for the help!