-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile + proper packaging #117
Conversation
c97ed3d
to
ac94ea9
Compare
@@ -0,0 +1,36 @@ | |||
CFLAGS=-O3 -march=native -mtune=native -Wall -Wextra -pedantic -Ithird_party |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fairly certain -mtune=native
is implied when using -march=native
but at this point, we're splitting hairs.
Thanks for this PR! I believe it's a good idea. I just wanted to give a heads up that I probably wont find the time to test/review it until next year. Likewise with the fixes for OpenBSD. Thanks for your patience and happy holidays :) |
if there is one thing that I need to note it is that after installing
|
CFLAGS=-O3 -march=native -mtune=native -Wall -Wextra -pedantic -Ithird_party | ||
CFLAGS_LIBPNG=`pkg-config --cflags libpng` | ||
LDFLAGS_LIBPNG=`pkg-config --libs libpng` | ||
INSTALL=`which install` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty redundant/boilerplatey. At least change it to "?="
But i really don't know why anyone would have to change install or rm executables.
$(CC) $(CFLAGS) $(CFLAGS_LIBPNG) $(LDFLAGS_LIBPNG) -o qoibench qoibench.c | ||
|
||
qoiconv: | ||
$(CC) $(CFLAGS) $(CFLAGS_LIBPNG) $(LDFLAGS_LIBPNG) -o qoiconv qoiconv.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qoiconv does not use libpng
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
CFLAGS=-O3 -march=native -mtune=native -Wall -Wextra -pedantic -Ithird_party |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps use -I/usr/include/stb
instead of third_party, see #188 for others saying the same.
BTW, I also wrote a Makefile for the normal qoi tools in this repo: https://github.com/amstan/qoi-fpga/blob/fpga/Makefile But a few things in my implementation (like splitting compilation of qoiconv and qoibench into a .o file too) only make sense when you're doing the weird stuff I am. |
Looking at the Another feature that'd be nice to have is a precompiled static and dynamic library which other programs can link. The current While using |
Somebody else is more than welcome to pick this up, but I frankly have neither the time or interest to continue with this. |
I do not know whether this is of interest, but thought I would share it anyway.
third_party
directory containing the appropriate headers from stb. Also adds an acknowledgement file (separate README.md) stating that they are licensed under different terms to the base QOI library (either public domain or MIT).I can only test this on OpenBSD right now, however I did test it with GNU Make (as well as BSD Make) and it is working fine here. There is no reason that this should not work on Linux or Mac provided my memory serves correctly. I cannot test on Mac, but I can probably test on Linux at some point soon.
I will not be offended if you don't want this - I am doing this mainly to make it easier for myself as I am intending to package this for OpenBSD ports, and just thought I would share. :-)