ScenarioI plan to share the source code of a larger software that depends on external libraries. The directory structure of the project is as followssrc/    ... my source codeext/    ... external source codeThe external libraries only have few modifications and contain the original license headers. The external libraries have BSD, GPL, LGPL licenses.The entire source code will be shared and additionally provided as pre-compiled binaries for download.QuestionCan I put my code in src/ under a different license than the external packages in ext/? Specifically, I would like to restrict usage to research/academia and prohibit commercial use.
Software license with external libraries
license compatibility;derivative works;linked libraries;software use
It seems you are really asking: Can I restrict users' rights to my larger work (such as commercial use) if it is dependent on BSD, GPL and LGPL open-source libraries?The answer is: if your work is dependent on at least one library under GPL, then I can already tell you that you can't because your larger work is a derivative of the GPL software and, as a derivative, it'll have to be licensed under a compatible license which means you can't restrict the freedom of use.Please refer to the following answer for a great explanation of what a derivative is and why it doesn't matter whether you put your own source code in src/ or in ext/: When is my project a derivative work in an interpreted language?However, if you can argue that your software isn't dependent on the GPL code and you don't distribute it along with your code, then you could create a custom license (open-source is clearly not suitable for your purpose), such as an EULA, for this purpose. This tool may help you get started: http://www.binpress.com/license/generator.