Changes flif and libflif to link from object files #436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The flif binary should not linked against libflif.so because this does not work on some systems
Compiling cpp files to objects avoids compiling them twice
This essentially attempts to redo the functionality of #416 properly. The goal of that PR was to not compile the cpp files twice, once for flif and once for libflif, but by linking flif to libflif, we're taking advantage of gcc's symbol exporting in a way that we really shouldn't. This could break on many systems.
This should redo the functionality, in that we only compile the cpp code to machine code once with gcc, and then we link the object files to libflif and also flif. This also renders #434 unnecessary should it be merged, because flif is linked statically and doesn't depend on libflif.
This also has the added benefit that it is easier to debug flif because it doesn't also rely on the library.
This doesn't change the build code for dflif or libflif_dec.so because those need to be compiled with different CXXFLAGS. This is best fixed by having a proper configure script rather than a separate make target.