Switch on operating system to choose different things
Once in a while you need to define variables different based on the OS that’s running make.
One can use uname -s and switch on the output to differeniate e.g. Linux and Darwin (macOS).
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
DYLIB_SUFFIX = .so
endif
ifeq ($(UNAME_S),Darwin)
DYLIB_SUFFIX = .dylib
endif