generated from TobiasDeBruijn/BaseBukkitPlugin
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
80 lines (63 loc) · 3.51 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
75
76
77
78
79
80
.PHONY: testjar releasejar
all: releasejar
RUST_SOURCE_FILES := $(shell find lib/src -type f)
REGISTRY=registry.array21.dev
# Release - Linux x86_64 centos7
lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/x86_64-unknown-linux-gnu/release
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-amd64-centos7 release
# Release - Linux aarch64
lib/target/aarch64-unknown-linux-gnu/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/aarch64-unknown-linux-gnu/release
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-aarch64-xenial release
# Release - Linux armhf
lib/target/arm-unknown-linux-gnueabihf/release/libskinfixer.so: ${RUST_SOURCE_FILES}
mkdir -p lib/target/arm-unknown-linux-gnueabihf/release
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-armhf-xenial release
# Release - Windows x86_64
lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll: ${RUST_SOURCE_FILES}
sudo chown ${USER}:${USER} -R lib/
sudo chmod a+rwx -R lib/
mkdir -p lib/target/x86_64-pc-windows-gnu/release
cd lib; \
cargo build --release --target x86_64-pc-windows-gnu
cp lib/target/x86_64-pc-windows-gnu/release/skinfixer.dll lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll
# Release - Darwin x86_64
lib/target/x86_64-apple-darwin/release/libskinfixer.dylib: ${RUST_SOURCE_FILES}
mkdir -p lib/target/x86_64-apple-darwin/release
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-amd64-darwin release
# Release - Darwin aarch64
lib/target/aarch64-apple-darwin/release/libskinfixer.dylib: ${RUST_SOURCE_FILES}
mkdir -p lib/target/aarch64-apple-darwin/release
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-aarch64-darwin release
# Debug - Linux x86_64
lib/target/x86_64-unknown-linux-gnu/debug/libskinfixer.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-amd64-xenial
# Debug - Linux aarch64
lib/target/aarch64-unknown-linux-gnu/debug/libskinfixer.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-aarch64-xenial
# Debug - Linux armhf
lib/target/arm-unknown-linux-gnueabihf/debug/libskinfixer.so: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-armhf-xenial
# Debug - Windows x86_64
lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll: ${RUST_SOURCE_FILES}
sudo chmod -R a+rwx lib/
cd lib; \
cargo build --target x86_64-pc-windows-gnu
cp lib/target/x86_64-pc-windows-gnu/debug/skinfixer.dll lib/target/x86_64-pc-windows-gnu/debug/libskinfixer.dll
# Debug - Darwin x86_64
lib/target/x86_64-apple-darwin/debug/libskinfixer.dylib: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-amd64-darwin
# Debug - Darwin aarch64
lib/target/aarch64-apple-darwin/debug/libskinfixer.dylib: ${RUST_SOURCE_FILES}
docker run -v "${CURDIR}/lib/:/code/" ${REGISTRY}/rust-aarch64-darwin
testjar: lib/target/x86_64-unknown-linux-gnu/debug/libskinfixer.so
chmod +x gradlew;
rm -rf ./build/resources
./gradlew testjar
releasejar: lib/target/x86_64-unknown-linux-gnu/release/libskinfixer.so lib/target/aarch64-unknown-linux-gnu/release/libskinfixer.so lib/target/arm-unknown-linux-gnueabihf/release/libskinfixer.so lib/target/x86_64-pc-windows-gnu/release/libskinfixer.dll lib/target/x86_64-apple-darwin/release/libskinfixer.dylib lib/target/aarch64-apple-darwin/release/libskinfixer.dylib
chmod +x gradlew
rm -rf ./build/resources
./gradlew releasejar
clean:
sudo rm -rf build lib/target