

# Need to be cautious about agressive optimization flags
# such as FFLAGS2 below which is used for casco2.
#They are machine dependent.  On sgi's have found need to 
#compile everything on the machine that it will run on. 
# 

# emerald
#  FFLAGS = -O2 -g 
#  FFLAGS2 = -O2 -g   
#  f77 = f77

#fury g77
#   FFLAGS =  -g  -fno-automatic 
#  FFLAGS =  -g 
#  FFLAGS2 = $(FFLAGS)
#   f77 = g77 
#   mathlib = -lcpml

#fury fort 
#   FFLAGS =  -O -static  
#   mathlib = -lcxml


# beacon and medulla 
#    FFLAGS2 = -O3 -n32 -mips4 -static  
#    FFLAGS  = -O3 -n32 -mips4 
#    f77 = f77
#     f77=g77
#     FFLAGS=-O2

    f77 = ifc
    FFLAGS =  -w -cm -O3 -xW -wp_ipo

Fcasco = BuildWrho3.f EMATpreMULT.f FEMPAKA.f adjust_soln.f \
bcs_saco_moody.f casco1_fixsubs.f casco4c.f casco2_sprspak.f \
casco_input.f convergence2.f dbc_best_to_dbc.f domega_write.f \
elevationm4.f elevations4.f get_Wrho.f \
get_bcstime.f get_errvar.f get_friction1.f get_nsteps.f get_sacotime.f \
getdata_moody4.f getvelobs.f getelevobs.f getobs_8c.f getobs_4c.f indexx.f  \
initial_conditions.f lin_frict.f \
measure_func.f misc.f moody_run.f newnorms.f numbers.f outputm2.f \
outputs2.f reorderinbe.f rms.f saco_basis.f saco_run3.f \
set_times.f start_subs.f startup.f station_calc2.f stationaryc3.f \
statistics.f stepsize5.f sup_norm.f time_basis.f time_manip.f \
trial_bcs.f ts1_write.f vertgrids2.f verticalm4.f \
verticals5.f write_cbc.f write_uverror.f trial_bcs_cgm.f casco_info.f \
saco_basis_elev.f write_eerror.f write_error.f error_to_best.f directioncgm.f \
trial_bcs_cgm_W.f write_lcc.f get_timeseries.f timeseries_offset.f

Ocasco = $(Fcasco:.f=.o)

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

casco4c: $(Ocasco) 
	$(f77) $(FFLAGS) -o $@ $(Ocasco) $(mathlib)


