I'm not sure where you got $(CSRC,.c=.o,F,<$(BUILDDIR))
; there's nothing even remotely like that syntax in GNU make.
The statement $(CSRC:.c=.o)
replaces all the .c
suffixes with .o
, but that doesn't help you because you also want to replace the directory.
You should use the $(patsubst ...)
function:
OSRC = $(patsubst $(SRCDIR)%.c,$(BUILDDIR)%.o,$(CSRC))