PKG_FFLAGS = #-Wall -pedantic #-O3 #-fno-align-commons -ffixed-line-length-none #-std=f95
PKG_FCFLAGS = #-mmacosx-version-min=11.1 #-Wall -pedantic #-O3 #-fno-align-commons -ffixed-line-length-none #-std=f95

all: $(SHLIB)

# need to tell R the order to compile dependent modules
sac_snow_only_tci.o sac_snow_states.o: utilities.o
FA.o: utilities.o
utilities.o: types.o stats.o sorting.o
stats.o: types.o sorting.o
uh2p_get_scale.o: uh_optim.o
# zero_brent.f90 is a bare function (no module), linked into the shared object;
# uh_optim calls it as an external procedure.

# These files use obsolete features and so fail when using the default -std=f95
fka7.o: fka7.f
	$(FC) -c -fPIC -O2 fka7.f
flag7.o: flag7.f
	$(FC) -c -fPIC -O2 flag7.f
pin7.o: pin7.f
	$(FC) -c -fPIC -O2 pin7.f
ex57.o: ex57.f
	$(FC) -c -fPIC -O2 ex57.f
SNDEPTH.o: SNDEPTH.f
	$(FC) -c -fPIC -O2 SNDEPTH.f
exsnow19.o: exsnow19.f
	$(FC) -c -fPIC -O2 exsnow19.f
