This is my Makefile :
NAME = pong SRCS = src/main.cpp OBJS = $(SRCS:.cpp=.o) CFLAGS += -lsfml-graphics -lsfml-window -lsfml-system -I include/ all
With your rule
$(NAME): $(OBJS)
the dependency on $(OBJS) will run makes implicit ℅.o : ℅.cpp rule first, which in turn uses $CXXFLAGS and thus doesn't see the -I option.
$(OBJS)
make
℅.o : ℅.cpp
$CXXFLAGS
-I
As your rule is written, just omit the dependency on $(OBJS).