Licensing

Everyone's favourite topic...

Anyway, many of you have probably read up about the various licenses used for open source code so you could unleash your code on the world. I need some advice, because I don't really understand all this licensing stuff, it's pretty new to me.

Let's say I was writing a be-all and end-all hello world program; consisting of hello.c and hello.h; and I wanted to GPL the hello.c file and X11 (BSD) license the .h file. Is that legal?

Then say I wrote a build script and some other tools; but I wanted them to be public domain. Is it still legal internationally?

If no to any of those questions, what can I do about it? I really don't want GPL'd header files, but I do want GPL'd source code... or should I just BSD the whole thing?
... I decided to forget it and just use the FreeBSD license for everything from now on.
I really don't want GPL'd header files, but I do want GPL'd source code...
wat
How does that make any sense? You want to allow someone to modify only the headers and make them closed source, for example?

The smallest unit that makes sense to license are individual sources and their headers, if they have any. For example, you might be writing a GPL'd archiver with a new compression algorithm, but want to leave the algorithm itself in the public domain. Then the linked archiver as a whole is GPL'd, but the algorithm alone can be reused elsewhere without restrictions.
Above that, it's also possible to link module A and module B if they have different licences. A "module" can be a program or a library (static or dynamic). The resulting licensing depends on how the modules depend on each other. If A cannot work without B (e.g. a GUI app might require a DLL to load) and B is GPL'd, then A is also GPL'd. If A can run without B, even if it can't do anything useful (e.g. a video player doesn't require codecs to load, but it may require them to load a video), then A and B may have different licences.
I wrote:
I decided to forget it and just use the FreeBSD license for everything from now on.
Topic archived. No new replies allowed.