Something went wrong. Try again.
javascript for 🐜's, a tiny runtime with big ambitions antjs.org
Something went wrong. Try again.
Shell
12345678910111213141516171819202122232425262728293031323334#!/bin/bashset -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"DIST_DIR="$SCRIPT_DIR/dist"SOURCE="$SCRIPT_DIR/../examples/embed/embed.c"OUTPUT="$SCRIPT_DIR/dist/embed"
if [ ! -f "$DIST_DIR/libant.a" ]; then echo "Error: libant.a not found in $DIST_DIR" echo "Run ./build.sh first" exit 1fi
case "$(uname -s)" in Darwin) LIBS="-framework Security -framework CoreFoundation -lpthread" ;; Linux) LIBS="-lpthread -ldl -lm" ;; MINGW*|MSYS*|CYGWIN*|Windows_NT) LIBS="-lws2_32 -lrpcrt4 -lsecur32 -lntdll -lcrypt32 -luserenv" ;; *) LIBS="-lpthread" ;;esac
CC="${CC:-clang}"
echo "Compiling embed example..."$CC "$SOURCE" -I"$DIST_DIR" "$DIST_DIR/libant.a" $LIBS -o "$OUTPUT"echo "Done: $OUTPUT"