# 
#   makefile for the program     geometry
# 

################################################################
#
#    add the name of  YOUR  compiler/operating system
#    and modify the compiler options FFLAGS  ---   if necessary   
#
################################################################
#ostype = case "`uname -s`" in \
#           (*inux*)  echo Linux   ;; \
#           (*OSF*)   echo OSF1    ;; \
#           (*ygwin*) echo Cygwin  ;; \
#         esac

# force evaluation now
# not available in standard make (under OSF1)
################################################################
#

FC=ifort 

################################################################

RM = rm -f
CP = cp

FFLAGS = -c 
LFLAGS = 

BINDIR = ..
VERS   = _$(OSTYPE)
VERS   = _linux-gnu


.SUFFIXES: .o .f

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

all: geometry

SRC = geometry.f optimize_basis_2d.f optimize_basis_3d.f

geometry: $(SRC)
	$(FC) -O2 -o geometry $(SRC)
	-$(CP) geometry $(BINDIR)/geometry$(VERS)

clean:
	rm -f *.o  *~ work.pc work.pcl geometry $(BINDIR)/geometry$(VERS)

