Commit 8e6dca73 authored by Ron Rahaman's avatar Ron Rahaman
Browse files

nek.mk builds libtool objects in nek_obj/

parent a5b59350
......@@ -2,6 +2,7 @@
VPATH := @srcdir@/Nek5000/core:@srcdir@/Nek5000/core/cmt:@srcdir@/Nek5000/core/3rd_party:@srcdir@/Nek5000/jl
srcdir := @srcdir@
builddir := @builddir@
nek_objdir := @builddir@/nek_obj
nek_includedir := @builddir@/include
# == Discovered by autoconf script
......@@ -20,9 +21,9 @@ nek_real8_flags := @nek_real8_flags@
jl_prefix := @jl_prefix@
# == FORTRAN objects ===============================================================================
nek_drive_obj := $(addsuffix .$(obj-suffix), drive)
nek_drive_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), drive))
nek_core_f_obj := $(addsuffix .$(obj-suffix), \
nek_core_f_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \
drive1 drive2 plan4 bdry coef conduct connect1 connect2 \
dssum edgec eigsolv gauss genxyz navier1 makeq navier0 \
navier2 navier3 navier4 prepost speclib map2 turb mvmesh ic \
......@@ -30,28 +31,28 @@ nek_core_f_obj := $(addsuffix .$(obj-suffix), \
subs1 subs2 genbox gmres hsmg convect induct perturb navier5 \
navier6 navier7 navier8 fast3d fasts calcz postpro \
cvode_driver vprops qthermal cvode_aux makeq_aux papi nek_in_situ \
readat_new @CASENAME@)
readat_new @CASENAME@))
nek_math_obj := $(addsuffix .$(obj-suffix), math)
nek_blas_obj := $(addsuffix .$(obj-suffix), @nek_blas_obj@) # blas.o | null
nek_cmt_obj := $(addsuffix .$(obj-suffix), @nek_cmt_obj@) # drive1_cmt.o ... | cmt_dummy.o
nek_lapack_obj := $(addsuffix .$(obj-suffix), @nek_lapack_obj@) # dsygv.o ssygv.o | null
nek_mpi_obj := $(addsuffix .$(obj-suffix), @nek_mpi_obj@) # byte_mpi.o comm_mpi.o | byte_mpi.o comm_mpi.o mpi_dummy.o
nek_mxm_obj := $(addsuffix .$(obj-suffix), @nek_mxm_obj@) # mxm_std.o | mxm_std.o mxm_bgq.o
nek_neknek_obj := $(addsuffix .$(obj-suffix), @nek_neknek_obj@) # singlmesh.o | multimesh.o
nek_math_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), math))
nek_blas_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_blas_obj@)) # blas.o | null
nek_cmt_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_cmt_obj@)) # drive1_cmt.o ... | cmt_dummy.o
nek_lapack_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_lapack_obj@)) # dsygv.o ssygv.o | null
nek_mpi_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_mpi_obj@)) # byte_mpi.o comm_mpi.o | byte_mpi.o comm_mpi.o mpi_dummy.o
nek_mxm_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_mxm_obj@)) # mxm_std.o | mxm_std.o mxm_bgq.o
nek_neknek_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), @nek_neknek_obj@)) # singlmesh.o | multimesh.o
nek_flib_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)
# == C objects =====================================================================================
nek_core_c_obj := $(addsuffix .$(obj-suffix), \
byte chelpers nek_comm finiparser iniparser dictionary)
nek_core_c_obj := $(addprefix $(nek_objdir)/, $(addsuffix .$(obj-suffix), \
byte chelpers nek_comm finiparser iniparser dictionary))
jl_core_obj := $(patsubst %, $(jl_prefix)%.$(obj-suffix), \
gs sort sarray_transfer sarray_sort gs_local crystal comm tensor fail fcrystal)
jl_interp_obj := $(patsubst %, $(jl_prefix)%.$(obj-suffix), \
findpts findpts_local obbox poly lob_bnd findpts_el_3 findpts_el_2)
jl_cgs_obj := $(patsubst %, $(jl_prefix)%.$(obj-suffix), @jl_cgs_obj@)
jl_core_obj := $(addprefix $(nek_objdir)/, $(patsubst %, $(jl_prefix)%.$(obj-suffix), \
gs sort sarray_transfer sarray_sort gs_local crystal comm tensor fail fcrystal))
jl_interp_obj := $(addprefix $(nek_objdir)/, $(patsubst %, $(jl_prefix)%.$(obj-suffix), \
findpts findpts_local obbox poly lob_bnd findpts_el_3 findpts_el_2))
jl_cgs_obj := $(addprefix $(nek_objdir)/, $(patsubst %, $(jl_prefix)%.$(obj-suffix), @jl_cgs_obj@))
nek_clib_obj := $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
......@@ -72,22 +73,22 @@ nek5000: $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj)
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link --quiet \
$(libmesh_F77) $(libmesh_FFLAGS) -o $@ $^ $(libmesh_LIBS) $(libmesh_LDFLAGS) $(nek_LIBS) $(nek_LDFLAGS) $(nek_FLIBS)
$(nek_drive_obj) $(nek_core_f_obj) $(nek_cmt_obj) $(nek_math_obj) $(nek_mxm_obj): %.$(obj-suffix): %.f SIZE
$(nek_drive_obj) $(nek_core_f_obj) $(nek_cmt_obj) $(nek_math_obj) $(nek_mxm_obj): $(nek_objdir)/%.$(obj-suffix): %.f SIZE | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_mpi_obj) $(nek_neknek_obj): %.$(obj-suffix): %.f SIZE mpiheader
$(nek_mpi_obj) $(nek_neknek_obj): $(nek_objdir)/%.$(obj-suffix): %.f SIZE mpiheader | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_core_c_obj): %.$(obj-suffix): %.c
$(nek_core_c_obj): $(nek_objdir)/%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
$(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj): $(jl_prefix)%.$(obj-suffix): %.c
$(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj): $(nek_objdir)/$(jl_prefix)%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile --quiet \
$(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
......@@ -99,7 +100,7 @@ else
rm -rf $(srcdir)/Nek5000/core/mpif.h $(nek_includedir)/mpif.h
endif
$(objdir) $(nek_includedir):
$(nek_objdir) $(nek_includedir):
mkdir -p $@
PHONY: mpiheader
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