#! /bin/sh

case "$OSTYPE" in
linux)
  echo "Compiling for Linux"
  g++ -pipe -mcpu=pentiumpro -O3 -finline-limit=65000 -fkeep-inline-functions -finline-functions -ffast-math -fomit-frame-pointer -DNDEBUG  -I. -I../../heaplayers -D_REENTRANT=1 -shared libptmalloc.cpp ptmalloc.c -o libptmalloc.so;;
solaris)
  echo "Compiling for Solaris"
  #CC -xildoff -native -noex -xipo=2 -xO5 -mt -DNDEBUG -I. -I.. -D_REENTRANT=1 -G -PIC libptmalloc.cpp -o libptmalloc.so;;
  gcc -DMALLOC_HOOKS -DUSE_PTHREADS=1 -D_REENTRANT -DUSE_TSD_DATA_HACK -fPIC -pipe -mcpu=ultrasparc -O3 -finline-limit=10000 -fkeep-inline-functions -finline-functions -ffast-math -fomit-frame-pointer -DNDEBUG  -I. -I.. -c ptmalloc.c
  g++ -fPIC -pipe -mcpu=ultrasparc -O3 -finline-limit=10000 -fkeep-inline-functions -finline-functions -ffast-math -fomit-frame-pointer -DNDEBUG  -I. -I.. -I../../heaplayers  -D_REENTRANT -shared libptmalloc.cpp ptmalloc.o -o libptmalloc.so -lpthread;;
*)
  echo "hmmm"
esac



