Skip to content

Improve build for Linux using Makefile #43

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

duhow
Copy link

@duhow duhow commented Apr 19, 2025

While there is already cmake and also several make-linux.sh scripts, it should be best to use a Makefile, autoconf or another solution to allow user to customize the builds if needed, rather than defining hard-coded checks.

Changes:

  • Migrate make-linux.sh to Makefile
  • Define script make-macos.sh as executable in repo

@duhow
Copy link
Author

duhow commented Jul 18, 2025

@8bitbubsy any chance to review this PR? 🙇🏻

@8bitbubsy
Copy link
Owner

8bitbubsy commented Jul 19, 2025

So here's the honest reason for why I didn't give this PR attention (I usually give at least a reply, but I guess I forgot): I'm not comfortable with the whole Linux build files thing as it's impossible to satisfy all people. It just won't happen, there will always be new complaints about the make files/scripts at one point. cmake was supposed to be the absolute best and most versatile option (I thought?), but I guess it's not? These files are almost like holy ground, I'm not comfortable touching them too much, especially because I'm not a Linux guy myself and I have gotten so many complaints about the make solution for the tracker clones over the years.

PS: why delete the existing .sh file? I'm sure it still works for most people. Marking it as executable in the repo is a good idea though, I didn't know it was possible! 👍

EDIT: Hmm, is it not possible to mark a file as executable with the GitHub Desktop client on Windows? How would I do this?

@siborg
Copy link

siborg commented Jul 19, 2025 via email

@duhow
Copy link
Author

duhow commented Jul 20, 2025

@8bitbubsy thanks for your feedback!

Regarding the choice between make or scripts, for Linux users is very common to use make or cmake, as long as it is explained in the documentation with the required dependencies, there shouldn't be any other concern, plus the Makefile allows to customize the build options if needed, such as performing cross-compile (eg. build the program for ARM in x86 systems).
CMake integrates more options that allow you to check for package dependencies and further customize the builds with its syntax, I am not that familiar with creating the file, so I went straight for the Makefile as a simple solution.

The outcome of this PR is to keep the same behavior of building in Linux but using a more common tool 👍🏻 - it can even be used for Mac, but I don't have Mac devices around to further test this, and running GitHub Actions to playaround with this may take me a while longer than expected.

I'm not a Windows user since years, there are security permissions to modify the attributes of files to mark them as system, hidden or read-only, GPT says to do:

git update-index --chmod=+x file.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants