-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
40 lines (30 loc) · 891 Bytes
/
Copy pathmakefile
File metadata and controls
40 lines (30 loc) · 891 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
36
37
38
39
40
# Define the compiler and flags
CC = g++
CFLAGS = -c -std=c++17 -Wall -I"SFML-2.5.1/include"
# Define the linker and flags
LD = g++
LDFLAGS = -L"SFML-2.5.1/lib"
# Define sfml libraries
ifeq ($(DEBUG),1)
LIBS += -lsfml-audio-d -lsfml-graphics-d -lsfml-network-d -lsfml-system-d -lsfml-window-d
else
LIBS += -lsfml-audio -lsfml-graphics -lsfml-network -lsfml-system -lsfml-window
endif
# Define the target and source files
TARGET = turtle_jump
SRCS = main.cpp
# Define the object files
OBJS = $(SRCS:.cpp=.o)
# Set the linker subsystem to Windows (no prompt window opens when running executable)
ifeq ($(OS),Windows_NT)
LDFLAGS += -Wl,--subsystem,windows
endif
all: $(TARGET)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm -f $(OBJS) $(TARGET)
cleano:
rm -f $(OBJS)