Makefile that distinguishes between Windows and Unix-like systems
I solved this by looking for an env variable that will only be set on windows. ifdef OS RM = del /Q FixPath = $(subst /,\,$1) else ifeq ($(shell uname), Linux) RM = rm -f FixPath = $1 endif endif clean: $(RM) $(call FixPath,objs/*) Because %OS% is the type of windows, it should be set … Read more