-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
63 lines (52 loc) · 1.38 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
all:
@cmake --build build/debug
.PHONY: all
release:
@cmake --build build/release
.PHONY: release
windows:
@cmake --build build/win-release
.PHONY: windows
clean:
@cmake --build build/debug --target clean
@cmake --build build/release --target clean
@cmake --build build/win-release --target clean
.PHONY: clean
test:
@cmake --build build/debug --target test
.PHONY: test
run: $(all)
@LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./build/debug/breakhack
.PHONY: run
playtest: $(all)
@LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./build/release/breakhack
.PHONY: playtest
lint:
@cmake --build build/debug --target lint
.PHONY: lint
package:
@cmake --build build/release --target package
@cmake --build build/win-release --target package
.PHONY: package
install:
@cmake --build build/release --target install
.PHONY: install
setup:
@mkdir -p build/debug
@mkdir -p build/release
@mkdir -p build/win-release
@cmake -B build/debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -GNinja
@cmake -B build/release -DCMAKE_BUILD_TYPE=Release -GNinja
@cmake -B build/win-release \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=build_deps/toolchains/mingw-w64-i686.cmake \
-DSDL2MIXER_VENDORED=ON \
-DSDL2TTF_VENDORED=ON \
-GNinja
@ln -fs build/debug/compile_commands.json
@echo "Setup complete"
.PHONY: setup
teardown:
@rm -rf build
@rm -f compile_commands.json
.PHONY: teardown