#!/bin/bash
# aot-compile

: ${1?"
aot-compile:  Natively-compile a given JAR

  Usage: $0 SRC_JARFILE DEST_SO_NAME BUILD_OPTIONS
    SRC_JARFILE - the jar file we want to process
    DEST_SO_NAME - the destination name of the .so of the compiled JAR
    BUILD_OPTIONS - a list of gcj options
      (outside of -findirect-dispatch -shared -Wl,-Bsymbolic)
"}

/usr/bin/gcj $3 -findirect-dispatch \
  -shared -Wl,-Bsymbolic -o $2 $1
