I had an issue building code with the makefile after including <math.h>. I think it's just a mistake in the following lines, I've added $(LIBS) to the end of the second line.
LIBS is already defined as "-lm", which is the extra option I needed to fix the compile error.
Code:
$(TARGET).elf: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
LIBS is already defined as "-lm", which is the extra option I needed to fix the compile error.