#!/bin/sh

rm -f *.so
rm -f *.dll
rm -f *.o

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

cd ./bin

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++ $_INCLUDES -D ZLIB -D LOOKUP_OBJ -D USE_SOCKETS $_OPTS -G -o libjbossInspector.so ../../src/jbossInspector.cc *.o
