TABLE OF CONTENTS


tests/Makefile-tests-FreeBS2 [ Make files ]

[ Top ] [ Make files ]

NAME

Makefile-tests-FreeBSD

SYNOPSIS

#$Id: Makefile-FreeBSD 550 2018-04-27 17:08:42Z mexas $

FC=             caf

PURPOSE

Build CGPACK tests on FreeBSD with GCC/OpenCoarrays.

NOTES

Adjust the inlude and link paths as needed, to make sure all *mod files and libraries are available.

AUTHOR

Anton Shterenlikht

COPYRIGHT

See LICENSE

SOURCE

FFLAGS=         -O2 -Wall -fall-intrinsics -fopenmp\
                -fcheck-array-temporaries\
                -I$(MODDIR) -I/usr/local/include\
                -g -fbacktrace -fcheck=bounds #-Werror

casup=          casup
LIBDIR=         $(HOME)/lib
LIB=            $(LIBDIR)/lib$(casup).a
MODDIR=         $(HOME)/include
MOD=            $(MODDIR)/$(casup).mod
LDFLAGS=        -L$(LIBDIR) -l$(casup) -L/usr/local/lib \
                -lnetcdf -lnetcdff
#               -lhdf5_fortran -lhdf5 \
#               -lhdf5hl_fortran -lhdf5_hl \

MODSRC=         testaux.f90
MODMOD=         $(MODSRC:.f90=.mod)
MODOBJ=         $(MODSRC:.f90=.o)
MODSMOD=        $(MODSRC:.f90=.smod)
CLEAN+=         $(MODMOD) $(MODOBJ) $(MODSMOD)

SRC= \
testAAA.f90 testAAB.f90 testAAC.f90 testAAD.f90 testAAE.f90 \
testAAF.f90 testAAG.f90 testAAH.f90 testAAI.f90 testAAJ.f90 \
testAAK.f90 testAAL.f90 testAAM.f90 testAAN.f90 testAAO.f90 \
testAAP.f90 testAAQ.f90 testAAR.f90 testAAS.f90 testAAT.f90 \
testAAU.f90 testAAV.f90 testAAW.f90 testAAX.f90 testAAY.f90 \
testAAZ.f90 \
testABA.f90 testABB.f90 testABC.f90 testABD.f90 testABE.f90 \
testABF.f90 testABG.f90 testABH.f90 testABI.f90 testABJ.f90 \
            testABL.f90 testABM.f90 testABN.f90 testABO.f90 \
testABP.f90 testABQ.f90 testABR.f90 testABS.f90 testABT.f90 \
testABU.f90 testABV.f90 testABW.f90             testABY.f90 \
testABZ.f90 \
testACA.f90 testACB.f90 testACC.f90 testACD.f90 testACE.f90 \
test_hxi.f90 test_hxir.f90
# testACF.f90 # - need to build HDF5 with parallel support
# testABK.f90 testABX.f90 - Cray only
OBJ=            $(SRC:.f90=.o)
EXE=            $(SRC:.f90=.x)
CLEAN+=         $(OBJ) $(EXE)

NEWSRC=         test_hxvn.f90 test_hxvn_co.f90\
test_mpi_hxvn.f90 hxvn_timing.f90\
test_ising.f90 test_ising_col.f90 test_ising_co.f90\
test_ising_perf.f90 test_ising_perf_co.f90\
test_mpi_ising.f90 test_mpi_ising_perf.f90\
future_ca_omp1.f90 future_ca_omp2.f90
NEWOBJ=         $(NEWSRC:.f90=.o)
NEWEXE=         $(NEWSRC:.f90=.nx)
CLEAN+=         $(NEWOBJ) $(NEWEXE)

.SUFFIXES:
.SUFFIXES:      .f90 .o .x .nx .mod

all:            old new

old:            $(EXE)

new:            $(NEWEXE)

# Extra dependencies
$(MODOBJ):      $(MOD)
$(OBJ):         $(MODOBJ) $(MOD)
$(EXE):         $(LIB)

$(NEWOBJ):      $(MOD)
$(NEWEXE):      $(LIB)

.f90.o:
                $(FC) -c $< $(FFLAGS)

.f90.mod:
                $(FC) -c $< $(FFLAGS)

.o.x:
                $(FC) -o $@ $< $(MODOBJ) -fopenmp $(LDFLAGS)

.o.nx:
                $(FC) -o $@ $< -fopenmp $(LDFLAGS)

clean:
                rm -f $(CLEAN)