# ----------------------------------------------------------------
# environment
CC		= 
FC		= gfortran

# ----------------------------------------------------------------
# options

CFLAGS		= 
FFLAGS		= -Ofast -fopenmp

# ----------------------------------------------------------------
# sources and objects

C_SRC		=
F_SRC		= mat-mat.f

C_OBJ		= $(C_SRC:.c=)
F_OBJ		= $(F_SRC:.f=)

# ----------------------------------------------------------------
# executables

EXEC		= $(F_OBJ) 

all:		$(EXEC)

$(F_OBJ):	$(F_SRC)
	$(FC) -o $@ $(FFLAGS) $(F_SRC)


# ----------------------------------------------------------------
# rules

.c.:
	$(CC) -o $* $(CFLAGS) -c $<

.f.:
	$(FC) -o $* $(FFLAGS) -c $<

# ----------------------------------------------------------------
# clean up

clean:
	/bin/rm -f $(EXEC) $(F_SRC:.f=.o)

# ----------------------------------------------------------------
# End of Makefile
