GenericMakefile icon indicating copy to clipboard operation
GenericMakefile copied to clipboard

Support for making libraries

Open ghost opened this issue 6 years ago • 1 comments

Hello,

I use your GenercMakefiles in every of my projects as I find them very convenient and easier to use than other Make alternative.

Is it possible to add the option to build .a libraries instead of executables?

Best regards.

ghost avatar Feb 06 '20 15:02 ghost

Hi @marespiaut, glad you have found this to be useful!

I don't have a good setup to test this at the moment, but I believe it should be a fairly simple change to make the file build libraries. Be sure you've set BIN_NAME to library-name.a, then edit line 209 to be $(CMD_PREFIX)ar rcs $@ $^. There a few other things you may want to clean up, for example the symlink created here is pretty pointless with a library.

mbcrawfo avatar Feb 09 '20 22:02 mbcrawfo