aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0b643f2..5cd4949 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ CXXFLAGS = -Wall -Wextra -I$(INCDIR) $(shell sdl2-config --cflags)
LDFLAGS = $(shell sdl2-config --libs) -lSDL2_ttf
SRC = $(shell find $(SRCDIR) -type f -name "*.cpp")
-INC = $(shell find $(INCDIR) -type f -name "*.h" -name "*.hpp")
+INC = $(shell find $(INCDIR) -type f -name "*.h" -o -name "*.hpp")
OBJ = $(SRC:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
all: prebuild $(NAME)
@@ -23,7 +23,7 @@ prebuild:
$(NAME): $(OBJ)
$(CXX) -o $@ $^ $(LDFLAGS)
-$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
+$(OBJDIR)/%.o: $(SRCDIR)/%.cpp $(INC)
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean: