This repository has been archived by the owner on Mar 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
Makefile
62 lines (51 loc) · 1.66 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
SHELL=/bin/bash
.PHONY: cuberite clang-format client log_render schematic_convert render_view
COMMON_CLIENT_CPP=client/src/block_map.cpp client/src/game_state.cpp client/src/graphics.cpp client/src/packet_writer.cpp client/src/types.cpp client/src/util.cpp client/src/nbt_tag.cpp
COMMON_LOGGING_CPP=logging/src/anvil_reader.cpp logging/src/logging_reader.cpp
COMPILE_FLAGS=-std=c++17 -Wall -Wextra -Werror -O3
LINK_FLAGS=-lglog -lgflags -lz -pthread
BIN=bin/log_render bin/render_view bin/schematic_convert
CUBERITE_MAKEFILE=cuberite/Makefile
all: cuberite client log_render render_view schematic_convert
cuberite:
cd cuberite && \
mkdir -p Release && \
cd Release && \
cmake -DCMAKE_BUILD_TYPE=RELEASE .. && \
make -j`nproc`
client:
cd client && \
cmake . && \
make
log_render:
g++ ${COMPILE_FLAGS} \
${COMMON_CLIENT_CPP} ${COMMON_LOGGING_CPP} logging/src/log_render.cpp \
-o bin/log_render \
${LINK_FLAGS}
render_view:
g++ ${COMPILE_FLAGS} \
${COMMON_CLIENT_CPP} ${COMMON_LOGGING_CPP} logging/src/render_view.cpp \
-o bin/render_view \
${LINK_FLAGS}
schematic_convert:
g++ ${COMPILE_FLAGS} \
${COMMON_CLIENT_CPP} \
schematic_convert/src/schematic_convert.cpp \
-o bin/schematic_convert \
${LINK_FLAGS}
clang-format:
bin/clang-format
.PHONY: clean
clean:
find . -name '*.so' -delete
find . -name 'cmake_install.cmake' -delete
find . -name 'CMakeCache.txt' -delete
if [ -f "$(CUBERITE_MAKEFILE)" ]; then \
cd cuberite && make clean && cd ..; \
fi
rm -rf bin/log_render bin/render_view bin/schematic_convert
rm -rf client/pybind11/CMakeFiles
rm -rf client/pybind11/Makefile
rm -rf client/CMakeFiles
rm -rf client/Makefile
rm -rf cuberite/Release