############################################################################### # # Makefile # # You are welcome to use this code for your own research but please # properly cite and attibute: # # Author: # Cameron Bracken, cameron.bracken@gmail.com # # Citation: # C. Bracken, K. Holman, B. Rajagopalan, H. Moradkhani, A Bayesian # hierarchical approach to multivariate nonstationary hydrologic frequency # analysis, Water Resources Research, 2017, Under Review. # # This is the top level Makefile that builds the sampler executable and links # the and model code. # # It is set up to use the BLAS/LAPACK functions provided in the Mac Accelerate # framework. To use this you need to install Xcode and then gcc. I use the gcc # that is part of the homebrew package manager, but you may be able to use the # apple gcc as well. # # You should also be able to use the Intel Fortran compiler ifort and the mkl # library, if you manage to get a license. # # On linux it should be fairly easy to link BLAS/LAPACK, but YMMV. # # Windows... I recommend using a linux virtual machine. # ############################################################################### FLAGS=-O2 SRC=src LIBS=-framework Accelerate FC=gfortran all: mods fit_model mods: (cd $(SRC); make all) fit_model: mods fit_model.f90 $(FC) $(FLAGS) $(LIBS) fit_model.f90 -o fit_model $(SRC)/*.o -I$(SRC) clean: rm -rf $(SRC)/*.o $(SRC)/*.mod fit_model