Commit cad011e7 authored by Ron Rahaman's avatar Ron Rahaman
Browse files

Attempt make target for Nek5000 in Makefile.nek.in

parent 839068e6
......@@ -13,12 +13,12 @@ F77 = @F77@
FFLAGS = @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@)
FLIBS = @FLIBS@
CASENAME = @CASENAME@
CASENAME = @CASENAME@
nek_debug_flags = @nek_debug_flags@
nek_opt_flags = @nek_opt_flags@
nek_real8_flags = @nek_real8_flags@
# == Nek objects =========================================================
# == FORTRAN objects ==========================================================
nek_core_f_obj = drive.o drive1.o drive2.o \
plan4.o bdry.o coef.o conduct.o connect1.o connect2.o \
dssum.o edgec.o eigsolv.o gauss.o genxyz.o navier1.o makeq.o \
......@@ -31,11 +31,10 @@ byte_mpi.o postpro.o \
cvode_driver.o \
vprops.o qthermal.o cvode_aux.o makeq_aux.o \
papi.o nek_in_situ.o \
readat_new.o
nek_math_f_obj = math.o
nek_core_c_obj = byte.o chelpers.o nek_comm.o finiparser.o iniparser.o dictionary.o
readat_new.o \
@CASENAME@.o
nek_math_obj = math.o
nek_blas_obj = @nek_blas_obj@ # blas.o | null
nek_cmt_obj = @nek_cmt_obj@ # drive1_cmt.o drive2_cmt.o ... | cmt_dummy.o
nek_lapack_obj = @nek_lapack_obj@ # dsygv.o ssygv.o | null
......@@ -43,31 +42,47 @@ nek_mpi_obj = @nek_mpi_obj@ # comm_mpi.o | comm_mpi.o mpi_dummy.o
nek_mxm_obj = @nek_mxm_obj@ # mxm_std.o | mxm_std.o mxm_bgq.o
nek_neknek_obj = @nek_neknek_obj@ # singlmesh.o | multimesh.o
f_obj = $(nek_core_f_obj) $(nek_math_obj) $(nek_blas_obj) $(nek_cmt_obj) \
$(nek_lapack_obj) $(nek_mpi_obj) $(nek_mxm_obj) $(nek_neknek_obj)
# == JL objects ===============================================================
nek_core_c_obj = byte.o chelpers.o nek_comm.o finiparser.o iniparser.o dictionary.o
jl_prefix = @jl_prefix@
jl_core_obj = $(patsubst %, $(jl_prefix)%, gs.o sort.o sarray_transfer.o sarray_sort.o gs_local.o crystal.o comm.o tensor.o fail.o fcrystal.o)
jl_interp_obj = $(patsubst %, $(jl_prefix)%, findpts.o findpts_local.o obbox.o poly.o lob_bnd.o findpts_el_3.o findpts_el_2.o)
jl_cgs_obj = $(patsubst %, $(jl_prefix)%, @jl_cgs_obj@)
c_obj = $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
# == Rules ====================================================================
# A set of rules each for:
# * nek_core_f_obj + nek_cmt_obj + nek_mpi_obj + nek_neknek_obj
# * nek_math_f_obj + nek_mxm_obj
# * nek_math_obj + nek_mxm_obj
# * nek_parfile_f_obj: same as nek_core_f_obj but also requires PARDICT
# * nek_in_situ.o: same as nek_core_f_obj but also requires VISIT_IFLAGS
# * nek_core_c_obj + jl_core_obj + jl_interp_obj + jl_cgs_obj
# * nek_blas_obj + nek_lapack_obj
# TODO:
# * Write dependencies for common block files (esp. SIZE!)
$(nek_core_f_obj) $(nek_cmt_obj) $(nek_mpi_obj) $(nek_neknek_obj): %.o: %.f
nek5000: $(f_obj) $(c_obj) mpiheader
$(F77) -o $@ $(f_obj) $(c_obj) $(LDFLAGS) $(LIBS) $(FLIBS)
$(nek_core_f_obj) $(nek_cmt_obj) $(nek_mpi_obj) $(nek_neknek_obj): %.o: %.f SIZE mpiheader
$(F77) -c $(FFLAGS) $(nek_opt_flags) $(nek_debug_flags) $(nek_real8_flags) $< -o $@
$(nek_math_f_obj) $(nek_mxm_obj): %.o : %.f
$(nek_math_obj) $(nek_mxm_obj): %.o : %.f SIZE
$(F77) -c $(FFLAGS) -O3 $(nek_debug_flags) $(nek_real8_flags) $< -o $@
$(nek_blas_obj) $(nek_lapack_obj): %.o: %.f
$(nek_blas_obj) $(nek_lapack_obj): %.o: %.f SIZE
$(F77) -c $(FFLAGS) -O0 $(nek_debug_flags) $< -o $@
$(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj): %.o: %.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(nek_opt_flags) $(nek_debug_flags) $< -o $@
mpiheader:
cp @srcdir@/Nek5000/core/mpi_dummy.h @srcdir@/Nek5000/core/mpif.h
clean:
rf -rf $(f_obj) $(c_obj) @srcdir@/Nek5000/core/mpif.h
.PHONY: mpiheader clean
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment