-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
35 lines (25 loc) · 696 Bytes
/
makefile
File metadata and controls
35 lines (25 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SFML_PATH := D:/SFML-3
CXX := g++
CXXFLAGS := -std=c++17 -Wall -Wextra -MMD -MP -I"$(SFML_PATH)/include"
LDFLAGS := -L"$(SFML_PATH)/lib"
LDLIBS := -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
SRCS := \
main.cpp \
StartScreen.cpp \
GameSFML.cpp \
snake.cpp \
Overlay.cpp
OBJS := $(SRCS:.cpp=.o)
DEPS := $(OBJS:.o=.d)
TARGET := snake.exe
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(LDFLAGS) $^ $(LDLIBS) -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
-include $(DEPS)
.PHONY: run clean
run: $(TARGET)
./$(TARGET)
clean:
del /Q $(OBJS) $(DEPS) $(TARGET) highscores.txt 2>nul