
# --------------------------------------------------------------
#
#	gmake
#	gmake install	 [to install  it in the correct directory]
#	gmake clean	 [to clean the source directory]
#
#
# --------------------------------------------------------------
#
# System definition (architecture)
#
ARCH := $(shell ./../../../xop_uname)
CPP = cpp


#************ PLATFORM DEPENDET VARIABLES ********************
#
# libraries for sun5 
#
ifeq ($(ARCH),sun5)
FC = f77
FFLAGS =  -Bstatic -O 
endif
#
# libraries for linux 
#
ifeq ($(ARCH),linux)
FC = g77
FFLAGS =  -O 
endif
#
# libraries for sgi (lindsga) 
#
ifeq ($(ARCH),irix)
FC = f77
FFLAGS =  -O 
endif
#
#-------------------------- libraries for darwin
#
ifeq ($(ARCH),darwin)
FC = gfortran
FFLAGS =  
endif
#**********************************************************

.SUFFIXES:
.SUFFIXES: .c .f .F .o .do

all: ws


OBJS = ws.o fk.o fkl.o gy.o k13.o k23.o polint.o qromb8.o trapzd8.o
ws: $(OBJS)
	$(FC) -o $@ $(OBJS) $(FFLAGS)
# 	$(FC) $(FFLAGS) -o $@ $< 

.f.o:
	$(FC) -c $(FFLAGS) $<

#  Clean up
clean:
	$(RM) -rf ws core *~ *.o *.trace

install:
	/bin/cp ws ../../../bin.$(ARCH)/ws
