3 ms·
Sorry here's what a build file looks like, which should hopefully clarify: https://github.com/jart/cosmopolitan/blob/master/libc/mem/mem.mk https://github.com/j
by jart 6y ago
Sorry here's what a build file looks like, which should hopefully clarify: https://github.com/jart/cosmopolitan/blob/master/libc/mem/mem.mk https://github.com/jart/cosmopolitan/blob/master/libc/mem/me... As you can see, it's just vanilla make. The package program is just a helper that checks to make sure DIRECTDEPS variables are correct. That's the part Google said was tricky back in 2006. Have you ever seen people talk online about how it's super difficult to have a single makefile build multiple library files? Particularly static ones? Like the pitfalls of making sure the linker arguments are the correct order, or removing a dependency from one will break all the others that needed it transitively? This is how it can be done. I found out it just requires following a highly specific convention, where it's a little toilsome to type, but so rewarding once it's done. It also means I don't need to ask users to install a cutting edge build system to build my code, since I've just seen too much drama in that space.