add build script for static binary

master
BodgeMaster 2025-02-10 14:26:17 +01:00
parent 0c4ef661e2
commit b10a4158fa
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/ethercat /ethercat
/ethercat-static

4
build-static.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -v
rm ethercat-static
gcc -Wall -Wextra -fPIE -pie -static -static-libgcc ethercat.c -o ethercat-static