sdlan-lib-rs/Makefile
2025-02-06 10:13:43 +08:00

28 lines
666 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 --target x86_64-pc-windows-gnu
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 -