#
# General Makefile defintions to allow CMFGEN etc to
# be compiled and linked.
#
# NOTE WELL: 
#      FG are options for f90 files in fixed format
#      FFREE are options for f90 files in free format.
#      FD are options for f90 files in fixed format with debug.
#      FFREED are options for f90 files in free format with debug.
#      The debug commands are generally not defined, and are not used
#         unless you manually edit the Makefiles.
#
# Installation directory for CMFGEN
# Site dependent.

# Define options for the ar command. On UBUNTU systems this might be Uruv

AR_OPTION = ruv

HOST :=$(shell hostname)

INSTALL_DIR=/users/massey/cmfgen/curcmfgfortranC/

#
# These statements should not be altered.
#

LIB_DIR=$(INSTALL_DIR)lib/
MOD_DIR=$(INSTALL_DIR)mod/
EXE_DIR=$(INSTALL_DIR)exe/
  

# For gfortran
F90 = gfortran -fallow-argument-mismatch  -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -O3 -fopenmp -m64 -march=native -mtune=native 
 F90nomp = gfortran -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -O -march=native -mtune=native
 FG  =  -ffixed-line-length-0 -fno-backslash -fd-lines-as-comments -I$(MOD_DIR) -J$(MOD_DIR)
 FD  = -g  -ffixed-line-length-0 -fno-backslash -fbounds-check -fd-lines-as-comments -ffpe-trap=invalid,zero,overflow -I$(MOD_DIR) -J$(MOD_DIR)
 FFREE  = -fno-backslash -I$(MOD_DIR) -J$(MOD_DIR)
 FFRED  = -fno-backslash -g -I$(MOD_DIR) -J$(MOD_DIR)

 BLAS=-lblas
 LAPACK=-llapack

 X11LIB=-L/opt/X11/lib -lX11
 PGLIB= -L/Users/massey/pgplot/cosmos -lpgplot
