forked from EXTERNAL/bareiron
support native windows binary compilation
* add winsock2 to globals.c * add winsocket2 compatibility to main function * add winsocket2 to packets.c * and winsocket2 to procedures.c * add winsocket 2 compatibility to tools.c * add winsocket2 to varnum.c * add mingw64 linker options to build.sh * fix build * style nitpicks * remove old_fd * update compilation instructions for windows --------- Co-authored-by: p2r3 <41925384+p2r3@users.noreply.github.com>
This commit is contained in:
11
build.sh
11
build.sh
@@ -13,6 +13,15 @@ case "$OSTYPE" in
|
||||
*) exe="" ;;
|
||||
esac
|
||||
|
||||
# mingw64-specific linker options
|
||||
windows_linker=""
|
||||
unameOut="$(uname -s)"
|
||||
case "$unameOut" in
|
||||
MINGW64_NT*)
|
||||
windows_linker="-static -lws2_32 -pthread"
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -f "bareiron$exe"
|
||||
gcc src/*.c -O3 -Iinclude -o "bareiron$exe"
|
||||
gcc src/*.c -O3 -Iinclude -o "bareiron$exe" $windows_linker
|
||||
"./bareiron$exe"
|
||||
|
Reference in New Issue
Block a user