-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
48 lines (38 loc) · 1.26 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
debug:
zig build
rm -f ./colorstorm
ln -s ./zig-out/bin/colorstorm .
test:
@for f in $(shell ls -d -1 "${PWD}/src/"*.*); do \
echo "Test: $${f}" && zig test $${f}; \
done
release:
zig build -Drelease-safe=true
release-all:
mkdir -p out
# Windows x86
zig build -Drelease-safe=true -Dtarget=x86_64-windows
mv ./zig-out/bin/colorstorm.exe ./out/
zip -j ./out/colorstorm-windows-x86.zip ./out/colorstorm.exe
# Windows ARM
zig build -Drelease-safe=true -Dtarget=aarch64-windows-gnu
mv ./zig-out/bin/colorstorm.exe ./out/
zip -j ./out/colorstorm-windows-aarch64.zip ./out/colorstorm.exe
# Linux x86
zig build -Drelease-safe=true -Dtarget=x86_64-linux
mv ./zig-out/bin/colorstorm ./out/
zip -j ./out/colorstorm-linux-x86.zip ./out/colorstorm
# Linux ARM
zig build -Drelease-safe=true -Dtarget=arm-linux
mv ./zig-out/bin/colorstorm ./out/
zip -j ./out/colorstorm-linux-arm.zip ./out/colorstorm
# macOS x86
zig build -Drelease-safe=true -Dtarget=x86_64-macos-gnu
mv ./zig-out/bin/colorstorm ./out/
zip -j ./out/colorstorm-macos-x86.zip ./out/colorstorm
# macOS ARM
zig build -Drelease-safe=true -Dtarget=aarch64-macos-gnu
mv ./zig-out/bin/colorstorm ./out/
zip -j ./out/colorstorm-macos-arm.zip ./out/colorstorm
rm ./out/colorstorm
rm ./out/colorstorm.exe