Hello guys wanted to ask a question. I have created shared library and I use InstallDev to put shared lib and header to staging dir. But if I use that library as dependency in other package, that package deletes library files from staging dir. Why?
If it needs to be accessible to the build system (as in, multiple packages need access to it), look at just creating a package in which you can then call
DEPENDS against. That way, the build system can clean up after itself and it adds modularization to your project. You can then update the shared library independent of the packages that use it (or vice versa).
Edit: I realize I didn't provide an answer to your question, mostly because I am unsure as to whether
staging_dir gets cleaned between builds. In lieu of that, I offered how I'd handle the situation. I'm sure someone will post the mechanism for you.
staging dir is a temporary directory, stuff inside can be deleted or re-generated from source package downloads
The "best" way is to just make a OpenWrt package for your shared library, so it will be handled properly
But I create shared library own package and i marked it in other program package Makefile DEPENDS. But somehow, sometimes when i try to compile, header file is copied to staging dir