Compare commits

...
4 Commits
Author SHA1 Message Date
wullie 5ba1129ca4 Delete buildSoLib 2026-10-26 19:18:02 +00:00
wullie cd0adcb7e7 Delete directory 'build' 2026-10-26 19:17:53 +00:00
wullie ff0f2cd7a0 Update .gitignore 2026-10-26 19:17:34 +00:00
wullie 9e4eb91044 Update .gitignore 2026-10-26 19:17:15 +00:00
17 changed files with 1 additions and 73 deletions

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
bin/ bin/
build/ build/
buildSoLib
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
-73
View File
@@ -1,73 +0,0 @@
#!/bin/bash
set -e
CC="gcc"
CFLAGS="-DWRATHINT -I./include -fPIC"
OBJ_BUILD="build/"
BIN_DIR="bin/"
HED_DIR="include"
build() {
echo "Building stdWullie..."
# Find all C source files
mapfile -t SRC < <(find src -type f -name '*.c')
# Compile each source file
OBJ=()
for src in "${SRC[@]}"; do
obj="${src%.c}.o"
echo "Compiling $src -> $obj"
"$CC" $CFLAGS -c "$src" -o "$obj"
OBJ+=("$obj")
done
# Create output directories
mkdir "$OBJ_BUILD"
mkdir "$BIN_DIR"
# Link shared library
echo "Linking libstdWullie.so..."
"$CC" -nostdlib -shared -o libstdWullie.so \
-fno-stack-protector \
"${OBJ[@]}"
# Move object files
mv "${OBJ[@]}" "$OBJ_BUILD"
# Move library
mv libstdWullie.so "$BIN_DIR"
# Copy header
cp "$HED_DIR/stdWullie.h" "$BIN_DIR"
# Copy header directory
cp -r "$HED_DIR/stdWullie/" "$BIN_DIR"
echo "Build complete."
}
clean() {
echo "Cleaning..."
rm -rf "$OBJ_BUILD" "$BIN_DIR"
build
}
case "${1:-build}" in
build|stdWullie)
build
;;
clean)
clean
;;
*)
echo "Usage: $0 {build|stdWullie|clean}"
exit 1
;;
esac