-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (50 loc) · 2.52 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
CC=g++ -pthread
BUILD_DIR=build
SRC_DIR=src
COMPILER_FLAGS = -w
LINKER_FLAGS = -lSDL2
OUTPUT_NAME=sins_virtues
all: ${OUTPUT_NAME}
${OUTPUT_NAME}: rm mk ${BUILD_DIR}/VnS.o ${BUILD_DIR}/console_handler.o ${BUILD_DIR}/termcolor.o ${BUILD_DIR}/kbhit.o ${BUILD_DIR}/game.o ${BUILD_DIR}/block.o ${BUILD_DIR}/item.o ${BUILD_DIR}/map.o ${BUILD_DIR}/enemy.o ${BUILD_DIR}/utilities.o ${BUILD_DIR}/player.o ${BUILD_DIR}/dialogs.o ${BUILD_DIR}/status_effect.o ${BUILD_DIR}/commands.o
$(CC) ${BUILD_DIR}/VnS.o ${BUILD_DIR}/console_handler.o ${BUILD_DIR}/termcolor.o ${BUILD_DIR}/item.o ${BUILD_DIR}/enemy.o ${BUILD_DIR}/kbhit.o ${BUILD_DIR}/game.o ${BUILD_DIR}/block.o ${BUILD_DIR}/map.o ${BUILD_DIR}/utilities.o ${BUILD_DIR}/player.o ${BUILD_DIR}/dialogs.o ${BUILD_DIR}/status_effect.o ${BUILD_DIR}/commands.o -o ./${OUTPUT_NAME}
${BUILD_DIR}/VnS.o: ${SRC_DIR}/VnS.cpp
$(CC) -c ${SRC_DIR}/VnS.cpp -o ${BUILD_DIR}/VnS.o
${BUILD_DIR}/console_handler.o: ${SRC_DIR}/console_handler.cpp
$(CC) -c ${SRC_DIR}/console_handler.cpp -o ${BUILD_DIR}/console_handler.o
${BUILD_DIR}/termcolor.o: ${SRC_DIR}/termcolor.cpp
$(CC) -c ${SRC_DIR}/termcolor.cpp -o ${BUILD_DIR}/termcolor.o
${BUILD_DIR}/kbhit.o: ${SRC_DIR}/kbhit.cpp
$(CC) -c ${SRC_DIR}/kbhit.cpp -o ${BUILD_DIR}/kbhit.o
${BUILD_DIR}/game.o: ${SRC_DIR}/game.cpp
$(CC) -c ${SRC_DIR}/game.cpp -o ${BUILD_DIR}/game.o
${BUILD_DIR}/block.o: ${SRC_DIR}/block.cpp
$(CC) -c ${SRC_DIR}/block.cpp -o ${BUILD_DIR}/block.o
${BUILD_DIR}/item.o: ${SRC_DIR}/item.cpp
$(CC) -c ${SRC_DIR}/item.cpp -o ${BUILD_DIR}/item.o
${BUILD_DIR}/map.o: ${SRC_DIR}/map.cpp
$(CC) -c ${SRC_DIR}/map.cpp -o ${BUILD_DIR}/map.o
${BUILD_DIR}/enemy.o: ${SRC_DIR}/enemy.cpp
$(CC) -c ${SRC_DIR}/enemy.cpp -o ${BUILD_DIR}/enemy.o
${BUILD_DIR}/utilities.o: ${SRC_DIR}/utilities.cpp
$(CC) -c ${SRC_DIR}/utilities.cpp -o ${BUILD_DIR}/utilities.o
${BUILD_DIR}/player.o: ${SRC_DIR}/player.cpp
$(CC) -c ${SRC_DIR}/player.cpp -o ${BUILD_DIR}/player.o
${BUILD_DIR}/dialogs.o: ${SRC_DIR}/dialogs.cpp
$(CC) -c ${SRC_DIR}/dialogs.cpp -o ${BUILD_DIR}/dialogs.o
${BUILD_DIR}/status_effect.o: ${SRC_DIR}/status_effect.cpp
$(CC) -c ${SRC_DIR}/status_effect.cpp -o ${BUILD_DIR}/status_effect.o
${BUILD_DIR}/commands.o: ${SRC_DIR}/commands.cpp
$(CC) -c ${SRC_DIR}/commands.cpp -o ${BUILD_DIR}/commands.o
mk:
mkdir ./${BUILD_DIR}
rm:
rm -rf ${BUILD_DIR}/ ./${OUTPUT_NAME}
rename:
$(eval CC = clang++ -std=c++11 -pthread)
mac: rename ${OUTPUT_NAME}
install:
sudo apt update
sudo apt install libsdl2-dev
.PHONY: clean
clean:
rm -rf ${BUILD_DIR}/ ./${OUTPUT_NAME}