# Fortran compiler
FC = ifort

# # Flags for compiler
FCFLAGS = -warn all -O3
#
# # Executable name
EXEC = main_program
#
# # Source files
SRCS = main.f90 neural.f90
#
# # Object files
OBJS = $(SRCS:.f90=.o)
#
# # Dependency files
DEPS = $(SRCS:.f90=.d)
#
# # Rules to create .o files from .f90 files
%.o: %.f90
	$(FC) $(FCFLAGS) -c $< -o $@
#
#     # Rules to create .d files from .f90 files
%.d: %.f90
	$(FC) -MMD -MP -MF $@ -MT $(@:.d=.o) $(FCFLAGS) $<

# Include dependency files
-include $(DEPS)
#
#  # Rule to link object files into executable
$(EXEC): $(OBJS)
	$(FC) $(FCFLAGS) $(OBJS) -o $(EXEC)

# Rule to clean up object files, dependency files, and executable
# clean:
	$(RM) $(OBJS) $(DEPS) $(EXEC)

