nextvi icon indicating copy to clipboard operation
nextvi copied to clipboard

Implement a Makefile

Open ismaell opened this issue 3 years ago • 6 comments

ismaell avatar Feb 12 '22 21:02 ismaell

Why? No need for make in project like this.

kyx0r avatar Feb 12 '22 23:02 kyx0r

Portable systems are more likely to have a posix compliant shell installed on their system than make. However if you encountered a problem with current build.sh let me know, I'll see what can be fixed.

kyx0r avatar Feb 12 '22 23:02 kyx0r

Well, I thought it might be interesting. Makefiles are better with integration and packaging procedures for distributions. The provided Makefile works fine with all major variants of Make. It's meant as an alternative.

As for portability, an improvement would be to check the flags that the compiler supports before adding them to CFLAGS. It could probably be compiled on non-gcc-like compilers just fine.

BTW, specifying _BSD_SOURCE conditionally is probably not a good idea.

ismaell avatar Feb 13 '22 17:02 ismaell

why isn't -O2 in the cflags? on both this and the build.sh

Un1q32 avatar Dec 27 '22 02:12 Un1q32

why isn't -O2 in the cflags? on both this and the build.sh

From my POV, if it were a sound default, then it would be the compiler's default.

ismaell avatar Jan 13 '23 11:01 ismaell

@ismaell iirc compiler default is to optimize for compile time, to allow for quick testing. Code that's intended to be used for anything besides testing should use -O2

Un1q32 avatar Jan 13 '23 20:01 Un1q32

I'm ok with having this on patches branch. Added now.

kyx0r avatar Jun 27 '24 15:06 kyx0r