39 lines
964 B
Makefile
Executable File
39 lines
964 B
Makefile
Executable File
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 && cp libtuntap.so ../.. && cd -
|
|
|
|
libtun-so-aarch64:
|
|
cd src/network && aarch64-linux-gnu-gcc -fPIC -shared -o libtuntap.so tuntap.c && cp libtuntap.so ../.. && cd -
|
|
|
|
pack:
|
|
tar -czvf punchnet.tar.gz punchnet punchnet.service libtuntap.so install.sh
|
|
|
|
deb: libtun-so
|
|
RUSTFLAGS="-L ." cargo deb
|
|
|
|
deb-aarch64: libtun-so-aarch64
|
|
RUSTFLAGS="-L ." cargo deb --target aarch64-unknown-linux-gnu
|
|
|