[BUG] dependent find variable under Linux
Kampouse opened this issue · 2 comments
while trying to build your library the makefile for Linux
was trying to execute find with an absolute path:
https://github.com/W2Codam/MLX42/blob/5b5140f9c8b29381b9bcc84a185bad9e2f072aeb/Makefile_Unix.mk#L26
while this work for cygwin certain linux distribution could have there executable
somewhere else
like Nixos in my case ; this can cause a "file not found"
i made a possible solution to this:
DETECTED_OS := $(shell uname -s)
ifeq ($(DETECTED_OS),Linux)
FIND=find
else
FIND=/usr/bin/find
endif
SHDR = src/mlx_vert.c src/mlx_frag.c
SHDRSRC= shaders/default.frag shaders/default.vert
LIBS = $(shell $(FIND) ./lib -iname "*.c")
SRCS = $(shell $(FIND) ./src -iname "*.c") $(SHDR) $(LIBS)
why:
i was about to package your library in a nix package so it can be deployed easly with certain version
I have never heard of Nixos or any Linux distro where find
is not located at /usr/bin/find
.
I can look into it I suppose.
Sorry but I don't think I will cover some form of niche linux distro that has an issue with having find
somewhere else. I suggest you just fix this on your end instead as this provides no benefit to anybody but users of NixOS :/