#/ ====================================================================== BEGIN FILE =====
#/ **                                  M A K E F I L E                                  **
#/ =======================================================================================
#/ **                                                                                   **
#/ **  Copyright (c) 2016, Stephen W. Soliday                                           **
#/ **                      stephen.soliday@trncmp.org                                   **
#/ **                      http://research.trncmp.org                                   **
#/ **                                                                                   **
#/ **  -------------------------------------------------------------------------------  **
#/ **                                                                                   **
#/ **  This program is free software: you can redistribute it and/or modify it under    **
#/ **  the terms of the GNU General Public License as published by the Free Software    **
#/ **  Foundation, either version 3 of the License, or (at your option)                 **
#/ **  any later version.                                                               **
#/ **                                                                                   **
#/ **  This program is distributed in the hope that it will be useful, but WITHOUT      **
#/ **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS    **
#/ **  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.   **
#/ **                                                                                   **
#/ **  You should have received a copy of the GNU General Public License along with     **
#/ **  this program. If not, see <http://www.gnu.org/licenses/>.                        **
#/ **                                                                                   **
#/ ----- Modification History ------------------------------------------------------------
#/
##  @file   Makefile
#   @brief  Provides dependency based build environment
#
#   @author Stephen W. Soliday
#   @date   2016-04-20
#/
#/ =======================================================================================

COMP = gfortran -c
LINK = gfortran

WARN = -Wall -pedantic-errors -Wconversion -Wimplicit-interface \
        -Wunused-parameter -Wcharacter-truncation -Wunderflow

FORM = -O3 -march=corei7 -mtune=corei7 -fall-intrinsics \
            -ffast-math -ffree-form -std=f2008ts -frecursive \
            -fopenmp -msse2 -ftree-vectorizer-verbose=0 -fopt-info-optimized

FLAGS = $(WARN) $(FORM) -I/usr/local/include 

FLIBS = -lgomp -lpthread

#/ =======================================================================================

all: test_iris

test_iris: test_iris.o
	$(LINK) -o $@ $^ $(FLIBS)

test_iris.o: test_iris.f08
	$(COMP) -J. -I. $(FLAGS) $< -o $@

clean:
	rm -f test_iris test_iris.o test_iris.mod

fullclean: clean
	rm -f *~

#/ =======================================================================================
#/ **                                  M A K E F I L E                                  **
#/ =========================================================================== END FILE ==
