#!Makefile
include ../Mkinclude

SRC	= \
	  max_min.f90 analy.f90 algebra.f90 alge_solv.f90 file_operate.f90 \
	  statistics.f90 \
	  phys_const.f90 math_const.f90 thermo_const.f90 thermo_function.f90 \
	  special_function.f90 poly_function.f90 geometry.f90 \
	  trajectory.f90 typhoon_analy.f90
OBJ	= \
	  max_min.o analy.o algebra.o alge_solv.o file_operate.o \
	  statistics.o \
	  phys_const.o math_const.o thermo_const.o thermo_function.o \
	  special_function.o poly_function.o geometry.o \
	  trajectory.o typhoon_analy.o
MOD	= \
	  max_min.mod analy.mod algebra.mod alge_solv.mod file_operate.mod \
	  statistics.mod \
	  phys_const.mod math_const.mod thermo_const.mod thermo_function.mod \
	  special_function.mod poly_function.mod geometry.mod \
	  trajectory.mod typhoon_analy.mod
TARGET	= libstpk_f90.a


all: $(TARGET)
$(TARGET): $(OBJ)
	$(AR) r $@ $(OBJ)
	cp $@ $(LIBDIR)/
	cp $(MOD) $(INCDIR)/

# pattern rule
$(OBJ): %.o: %.f90
	$(FC) ${FFLAGS} -c $< -L${LDFLAGS} -l${LFLAGS}

clean:
	rm -rf *.o *.a *.mod
