Skip to content
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

compile for Linux : adjust Makefile #2

Open
tissatussa opened this issue Apr 15, 2021 · 4 comments
Open

compile for Linux : adjust Makefile #2

tissatussa opened this issue Apr 15, 2021 · 4 comments

Comments

@tissatussa
Copy link

hi,
i guess your default is AVX2 processors, but my laptop does not support that.
to compile on Linux (Xubuntu 20.04.2) i had to adjust the makefile by removing the NFLAGS, so the CXXFLAGS code line becomes like this :

CXXFLAGS = $(BFLAGS) $(WFLAGS)

@SamuraiDangyo
Copy link
Owner

Hello!
My bad. I added a comment in Makefile.
Yes,yYou need avx2 for current make.
Your modification works fine.
But I suggest this for older CPUs: NFLAGS = -DUSE_SSE -msse

@tissatussa
Copy link
Author

thanks ! could your code be adjusted to auto-detect the hardware architecture and compile accordingly ? i think some other engines do this, but i'm not sure ..

@SamuraiDangyo
Copy link
Owner

Thanks for the feedback!
I added simple make oldcpu in Makefile
That should work 99%+ of the time if make fails.
For older CPUs g++ is better than clang++ IIRC

@tissatussa
Copy link
Author

tissatussa commented Apr 17, 2021

i also had to change that new MakeFile while default clang++ compiling gives an invalid executable on my Xubuntu 20.04.2, although the compilation was without errors .. using g++ gives me a valid binary .. i think your MakeFile is too simple .. some other engine programmers use some smart hardware detection or they test the made clang binary and when it's invalid they re-compile with g++ .. i guess this is how their "auto script" works .. example is the Halogen engine, see https://github.com/KierenP/Halogen .. thanks anyway for this new v4.1 version despite my bit of handcraft :-)

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

No branches or pull requests

2 participants