# This is the makefile for piscal
# name of executable
ALL   = piscal

# compiler options
#FF    = mpif90
FF = gfortran
#FOPTS = -g -C
FOPTS = -g

# Base directory
BASEDIR = ../..

VPATH = $(BASEDIR)/leafres/testarea:\
	$(BASEDIR)/dataassim/math/optimization:\
	$(BASEDIR)/dataassim/math/othersupmath:\
	$(BASEDIR)/dataassim/math/algebra:\
	$(BASEDIR)/dataassim/math/specialfuncs:\
	$(BASEDIR)/dataassim/math/nonlinsystems/

# Define objects

OBJS =	LeafGasPISCAL_single.o adsor.o clustering.o cppowell.o GenericRegres.o lfit.o stomoptimization.o ALightCombinatorial.o commonparameters.o\
	dble_pikaia.o HybridCombinatorial.o powell.o stom_regression.o Anet_Final.o CompassSearch.o extCharToFloatNum.o ilimittypestats.o\
        SetUpLeafGasFit.o bookkeeping.o cpbookkeeping.o Externals_GenericRegres.o ispartnum.o shortestdist.o supmath.o\
        broydn.o cpbroydn.o fixedpoint.o leafanetmodel.o nongradopt.o sigmoid.o surffunc.o charlineparser.o cpCompassSearch.o FreeCombinatorial.o\
	LeafGasFit_Stom.o nonsyssolver.o time_resolution.o CharToNumeric.o cpfixedpoint.o funkmin_cica5.o NumberToChar.o\
        stdmaxmeanmin.o ToLeafGasOptimization.o cica5.o cpnongradopt.o funkmin_stom.o LeafGasPrintToFiles.o odr_leastsquare.o StomatalConductance.o\
	UnivParamsAlloc.o cica_Regression5.o cpnonsyssolver.o funkmin_UnivPhotoFit.o leafunivphotosyn.o odrpack.o stomlfitbasis.o UnivPhotoFit.o\
        fluorescencejmax.o funkmin_flujmax.o pam_parameters.o C4SetUpLeafGasFit.o C4PhotoFit.o funkmin_C4Fit.o c4leafanetmodel.o d1mach.o dnqsol.o\
        ierm1.o derv1.o dnrm2.o ierv1.o ermsg.o erfin.o

$(ALL):	        $(OBJS) 
	        $(FF) $(FOPTS) $(OBJS) -o $@
	
.f.o:	
		$(FF) -c $(FOPTS) $<

depend:
	/usr/bin/X11/makedepend -- $(CFLAGS) -- $(SRCS)

clean:
	rm -f *.o

