Commit 7b18682d authored by Ron Rahaman's avatar Ron Rahaman
Browse files

Separated driver from libs

parent 6a7128ae
......@@ -9,64 +9,69 @@ includedir = @builddir@/include
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ @DEFS@ \
-I$(builddir) -I$(includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt \
-I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl
-I$(builddir) -I$(includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt \
-I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@) \
-I$(builddir) -I$(includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt \
-I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl
-I$(builddir) -I$(includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt \
-I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl
FLIBS = @FLIBS@
# == Nek-only compilers and flags ==================================================================
nek_debug_flags = @nek_debug_flags@
nek_opt_flags = @nek_opt_flags@
nek_real8_flags = @nek_real8_flags@
jl_prefix = @jl_prefix@
# == FORTRAN objects ===============================================================================
nek_drive_obj = $(addprefix $(objdir)/, drive.o)
nek_core_f_obj = $(addprefix $(objdir)/, \
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 navier0.o \
navier2.o navier3.o navier4.o prepost.o speclib.o map2.o turb.o mvmesh.o ic.o \
ssolv.o planx.o mxm_wrapper.o hmholtz.o gfdm_par.o gfdm_op.o gfdm_solve.o \
subs1.o subs2.o genbox.o gmres.o hsmg.o convect.o induct.o perturb.o navier5.o \
navier6.o navier7.o navier8.o fast3d.o fasts.o calcz.o 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 @CASENAME@.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 navier0.o \
navier2.o navier3.o navier4.o prepost.o speclib.o map2.o turb.o mvmesh.o ic.o \
ssolv.o planx.o mxm_wrapper.o hmholtz.o gfdm_par.o gfdm_op.o gfdm_solve.o \
subs1.o subs2.o genbox.o gmres.o hsmg.o convect.o induct.o perturb.o navier5.o \
navier6.o navier7.o navier8.o fast3d.o fasts.o calcz.o 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 @CASENAME@.o)
nek_math_obj = $(addprefix $(objdir)/, math.o)
nek_blas_obj = $(addprefix $(objdir)/, @nek_blas_obj@) # blas.o | null
nek_cmt_obj = $(addprefix $(objdir)/, @nek_cmt_obj@) # drive1_cmt.o ... | cmt_dummy.o
nek_lapack_obj = $(addprefix $(objdir)/, @nek_lapack_obj@) # dsygv.o ssygv.o | null
nek_mpi_obj = $(addprefix $(objdir)/, @nek_mpi_obj@) # comm_mpi.o | comm_mpi.o mpi_dummy.o
nek_mxm_obj = $(addprefix $(objdir)/, @nek_mxm_obj@) # mxm_std.o | mxm_std.o mxm_bgq.o
nek_neknek_obj = $(addprefix $(objdir)/, @nek_neknek_obj@) # singlmesh.o | multimesh.o
nek_blas_obj = $(addprefix $(objdir)/, @nek_blas_obj@) # blas.o | null
nek_cmt_obj = $(addprefix $(objdir)/, @nek_cmt_obj@) # drive1_cmt.o ... | cmt_dummy.o
nek_lapack_obj = $(addprefix $(objdir)/, @nek_lapack_obj@) # dsygv.o ssygv.o | null
nek_mpi_obj = $(addprefix $(objdir)/, @nek_mpi_obj@) # byte_mpi.o comm_mpi.o | byte_mpi.o comm_mpi.o mpi_dummy.o
nek_mxm_obj = $(addprefix $(objdir)/, @nek_mxm_obj@) # mxm_std.o | mxm_std.o mxm_bgq.o
nek_neknek_obj = $(addprefix $(objdir)/, @nek_neknek_obj@) # singlmesh.o | multimesh.o
nek_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)
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 = $(addprefix $(objdir)/, \
byte.o chelpers.o nek_comm.o finiparser.o iniparser.o dictionary.o)
byte.o chelpers.o nek_comm.o finiparser.o iniparser.o dictionary.o)
jl_prefix = @jl_prefix@
jl_core_obj = $(addprefix $(objdir)/, $(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 = $(addprefix $(objdir)/, $(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 = $(addprefix $(objdir)/, $(patsubst %, $(jl_prefix)%, @jl_cgs_obj@))
jl_core_obj = $(addprefix $(objdir)/$(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 = $(addprefix $(objdir)/$(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 = $(addprefix $(objdir)/$(jl_prefix), @jl_cgs_obj@)
nek_c_obj = $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
nek_clib_obj = $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
# == Rules =========================================================================================
nek5000: $(nek_f_obj) $(nek_c_obj) mpiheader
$(F77) -o $@ $(nek_f_obj) $(nek_c_obj) $(LDFLAGS) $(LIBS) $(FLIBS)
nek5000: $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj)
$(F77) -o $@ $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj) $(LDFLAGS) $(LIBS) $(FLIBS)
@size nek5000
$(nek_core_f_obj) $(nek_cmt_obj) $(nek_mpi_obj) $(nek_neknek_obj): $(objdir)/%.o: %.f SIZE mpiheader | $(objdir)
$(nek_drive_obj) $(nek_core_f_obj) $(nek_cmt_obj): $(objdir)/%.o: %.f SIZE | $(objdir)
$(F77) -c $(FFLAGS) $(nek_opt_flags) $(nek_debug_flags) $(nek_real8_flags) $< -o $@
$(nek_mpi_obj) $(nek_neknek_obj): $(objdir)/%.o: %.f SIZE mpiheader | $(objdir)
$(F77) -c $(FFLAGS) $(nek_opt_flags) $(nek_debug_flags) $(nek_real8_flags) $< -o $@
$(nek_math_obj) $(nek_mxm_obj): $(objdir)/%.o : %.f SIZE | $(objdir)
......@@ -83,15 +88,15 @@ $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj): $(objdir)/$(jl_prefix)%.o: %.c |
mpiheader: | $(includedir)
ifneq ($(findstring mpi_dummy.o, $(nek_mpi_obj)),)
cp @srcdir@/Nek5000/core/mpi_dummy.h $(includedir)/mpif.h
cp $(srcdir)/Nek5000/core/mpi_dummy.h $(includedir)/mpif.h
else
rm -rf @srcdir@/Nek5000/core/mpif.h $(includedir)/mpif.h
rm -rf $(srcdir)/Nek5000/core/mpif.h $(includedir)/mpif.h
endif
$(objdir) $(includedir):
mkdir -p $@
clean:
rm -rf nek5000 $(nek_f_obj) $(nek_c_obj) @srcdir@/Nek5000/core/mpif.h $(includedir)/mpif.h
rm -rf nek5000 $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj) $(srcdir)/Nek5000/core/mpif.h $(includedir)/mpif.h
.PHONY: mpiheader clean
......@@ -170,9 +170,9 @@ fi
# See if MPI is enabled
if test "x$mpi" = "xyes"; then
AC_DEFINE([MPI], 1, [If MPI is enabled])
nek_mpi_obj="comm_mpi.o"
nek_mpi_obj="byte_mpi.o comm_mpi.o"
else
nek_mpi_obj="comm_mpi.o mpi_dummy.o"
nek_mpi_obj="byte_mpi.o comm_mpi.o mpi_dummy.o"
fi
AC_SUBST([nek_mpi], [$mpi])
AC_SUBST([nek_mpi_obj])
......
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