-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
60 lines (44 loc) · 1.01 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
CC = g++
FLAGS = -std=c++14 -Wall
SFML = -lsfml-graphics -lsfml-system -lsfml-window
EXEC = main
SOURCES = main.cpp \
Display.cpp \
Piece.cpp \
Board.cpp \
Pieces/Pawn.cpp \
Pieces/Rook.cpp \
Pieces/King.cpp \
Pieces/Queen.cpp \
Pieces/Bishop.cpp \
Pieces/Knight.cpp \
Player.cpp
OBJECTS = $(SOURCES:.cpp=.o)
all : $(OBJECTS)
$(CC) $(OBJECTS) $(FLAGS) $(SFML) -o $(EXEC)
Display.o : Display.cpp
$(CC) $(FLAGS) -c $^
Player.o : Player.cpp
$(CC) $(FLAGS) -c $^
main.o : main.cpp
$(CC) $(FLAGS) -c $^
Piece.o : Piece.cpp
$(CC) $(FLAGS) -c $^
Board.o : Board.cpp
$(CC) $(FLAGS) -c $^
Pawn.o : Pieces/Pawn.cpp
$(CC) $(FLAGS) -c $^ -lm
Rook.o : Pieces/Rook.cpp
$(CC) $(FLAGS) -c $^ -lm
Bishop.o : Pieces/Bishop.cpp
$(CC) $(FLAGS) -c $^ -lm
Knight.o : Pieces/Knight.cpp
$(CC) $(FLAGS) -c $^ -lm
King.o : Pieces/King.cpp
$(CC) $(FLAGS) -c $^ -lm
Queen.o : Pieces/Queen.cpp
$(CC) $(FLAGS) -c $^ -lm
clean:
rm -rf *.o
rm -rf Pieces/*.o
rm $(EXEC)