fix compilation on windows

This commit is contained in:
p2r3
2025-09-13 14:09:13 +03:00
parent 8d75d0a75f
commit 2a9e443a8d
3 changed files with 12 additions and 37 deletions

View File

@@ -1,11 +1,18 @@
#!/usr/bin/env bash
# Check for registries before attempting to compile, prevents confusion
if [ ! -f "include/registries.h" ]; then
echo "Error: 'include/registries.h' is missing."
echo "Please follow the 'Compilation' section of the README to generate it."
exit 1
fi
rm bareiron
gcc src/*.c -O3 -Iinclude -o bareiron
./bareiron
# Figure out executable suffix (for MSYS compilation)
case "$OSTYPE" in
msys*|cygwin*|win32*) exe=".exe" ;;
*) exe="" ;;
esac
rm -f "bareiron$exe"
gcc src/*.c -O3 -Iinclude -o "bareiron$exe"
"./bareiron$exe"