sdlan-lib-rs/Makefile
2025-01-28 15:47:24 +08:00

28 lines
635 B
Makefile

self:
RUSTFLAGS="-L ." cargo build --release
linux:
RUSTFLAGS="-L ." cargo build --release --target x86_64-unknown-linux-musl
aarch64:
RUSTFLAGS="-L ." cargo build --release --target aarch64-unknown-linux-gnu
linux-tun:
RUSTFLAGS="-L ." cargo build --features "tun" --release
win:
cargo build --release
pb:
cargo run --bin build_pb
mv src/pb/_.rs src/pb/message.rs
libtun-so-clang:
cd src/network && clang -fPIC -shared -o libtuntap.so tuntap.c && cd -
libtun-so:
cd src/network && gcc -fPIC -shared -o libtuntap.so tuntap.c && cd -
libtun-a:
cd src/network && gcc -c tuntap.c && ar rcs libtuntap.a tuntap.o && cd -