#!/bin/sh

rm -f *.jnilib
rm -f *.o

_INCLUDES="-I$JAVA_HOME/include -I../src/zlib"

gcc $_OPTS $_INCLUDES  -c ../src/zlib/adler32.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/compress.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/crc32.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/gzio.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/uncompr.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/deflate.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/trees.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/zutil.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/inflate.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/infback.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/inftrees.c
gcc $_OPTS $_INCLUDES  -c ../src/zlib/inffast.c

g++ -O0 -bundle $_INCLUDES -DZLIB -DLOOKUP_OBJ -DUSE_SOCKETS -o libjbossInspector.jnilib ../src/jbossInspector.cc *.o
