
EXE =  cat_file graph

all:$(EXE)

cat_file: input.f cat_file.f
	$(COMPILFORTAN) $(FORTANFLAGS) $(INCS) -o $(<D)/$@ $^ $(LIBSFORTRAN)

graph: libUN.f input.f graph.f
	$(COMPILFORTAN) $(FORTANFLAGS) $(INCS) -o $(<D)/$@ $^ $(LIBSFORTRAN)

%.o: %.f
	$(COMPILFORTAN) $(FORTANFLAGS) $(INCS) -module $(<D) -o $@ -c $<

clean:
	@for i in ${EXE}; do \
	  resu=`find . -name "$${i}"`; \
	  if [ "$${resu}" != "" ]; then echo "rm -f $${resu}"; rm -f $${resu}; fi;\
        done; \
	resu=`find . -name "*.o"`; if [ "$${resu}" != "" ]; then echo "rm -f $${resu}"; rm -f $${resu}; fi;\
	resu=`find . -name "*.mod"`; if [ "$${resu}" != "" ]; then echo "rm -f $${resu}"; rm -f $${resu}; fi;\
	resu=`find . -name "*__genmod.f90" -exec rm -rf {} \;`;\
	
	
