Closed krystalgamer closed 3 years ago
Noticed -Bstatic
didn't work as I expected. Due to not having a simple OS detection mechanism I just made the MACBUILD
flag which is used as following make MACBUILD=1
EDIT: This is not used anymore
What's the issue with static compilation for other platforms?
What's the issue with static compilation for other platforms?
Linux/Windows there's no problem but for MacOS you simply can't :/
You get an error related to crt0.o
:
https://stackoverflow.com/questions/5259249/creating-static-mac-os-x-c-build
Either way I just simplified the process so now there's an EXTRA_FLAG
which can be used to pass any extra flags we want. It's only used for the windows build to static link it.
Here's the changes made to the code to allow it compile in other OSes:
Windows
mkdir
with two arguments is deprecated, so a macro was added to swallow the second argumentMacOS
libLZR.c
was includingmalloc.h
which is a deprecated header, it was replaced withstdlib.h
For the automatic builds
-static
flag statically links user libraries which makes distribution much easier, specially for the Windows version.