#######################################
# Makefile for gclust 
# Naoki Sato, April 2003
#######################################

#####################
## Compiler

# For GNU cc
#CC = gcc

# For Solaris, Silicon Graphics or MacOS X
CC = cc

# For Supernig
#CC = fcc 

# For Alpha
#CC = ccc

# For Itanium2
#CC = ecc
#CC = /opt/intel/compiler70.new/ia64/bin/ecc
#CC = /opt/intel_cc_80/bin/ecc
#CC = icc

#####################
## Compiler options

# For common GCC or MacOS X
#OPTIONS = -O4 -g3 -Wall -ansi -faltivec
# For G5
OPTIONS = -fast 
#OPTIONS = -O4 -g3 -Wall -Wno-uninitialized
#OPTIONS =  -O3 -g
#OPTIONS =  -xT -fast

# For intel compiler for Itanium 2
#OPTIONS = -O3 -g -Wall -mp -tpp2 -mcpu=itanium2

# For Silicon Graphics IRIX
#OPTIONS = -n32 -Ofast -g3 -mips4 -fullwarn -ansi
#OPTIONS = -64 -Ofast -mips4 -g3 -fullwarn -ansi

# For Solaris cc
#OPTIONS = -fast -xO4 

# For Supernig
#OPTIONS = -g -Kfast_GP=2 -KV9
# parallel
#OPTIONS = -g -Kfast_GP=2 -Kparallel -KV9

#####################
RM = rm -f

TARGET = gclust
 
all:	${TARGET}


gclust: main.o anal.o help.o line.o list.o matrix.o node.o print.o stat.o
	${CC} ${OPTIONS} -o gclust main.o anal.o help.o line.o list.o matrix.o node.o print.o stat.o -lm

main.o:	main.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c main.c

anal.o:	anal.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c anal.c

help.o:	help.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c help.c

line.o:	line.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c line.c

list.o:	list.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c list.c

matrix.o:	matrix.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c matrix.c

node.o:	node.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c node.c

print.o:	print.c gclust.h defines.h version.h
	${CC} ${OPTIONS} -c print.c

stat.o:	stat.c gclust.h defines.h t.h normal.h version.h
	${CC} ${OPTIONS} -c stat.c

clean:
	${RM} gclust *.o

##### end of makefile for lsort3 ####
