######################################################################
# Sample makefile for building gsstat.cc on HPUX using the 
# HP aCC Compiler
#
# $Id: makefile.hpux,v 1.1 2007-07-19 04:00:06 normg Exp $
#
# Make sure $GEMSTONE is set correctly.
#
# Make sure $GEMSTONE/lib is in LD_LIBRARY_PATH
#   example: export LD_LIBRARY_PATH=$GEMSTONE/lib:$LD_LIBRARY_PATH
#
# Make sure the environment variable CC references your C++ compiler
#   example: export CC=/opt/aCC/bin/aCC
#
######################################################################

# Use this one if you want to use a debugger with your program
#CCFLAGS = +DD64 -D_REENTRANT -mt -g

# Use this one for fastest performance
CCFLAGS = +DD64 -D_REENTRANT -mt +O2 +Onolimit +W749

LDFLAGS = -L$(GEMSTONE)/lib -v -lgcsi -lpthread

TARGET_DIR = ./hpux

$(TARGET_DIR)/gsstat: $(TARGET_DIR)/gsstat.o
	$(CC) $(CCFLAGS) $(TARGET_DIR)/gsstat.o -o $(TARGET_DIR)/gsstat $(LDFLAGS)

$(TARGET_DIR)/gsstat.o: gsstat.cc
	mkdir -p $(TARGET_DIR) >/dev/null 2>&1
	$(CC) -c $(CCFLAGS) gsstat.cc -o $(TARGET_DIR)/gsstat.o -I$(GEMSTONE)/include
