Commit 54972321 authored by Ron Rahaman's avatar Ron Rahaman

PHONY includedir target in nek.mk

parent c7e64ae0
# == Source and destination directories ============================================================
VPATH := ../../Nek5000/core:../../Nek5000/core/cmt:../../Nek5000/core/3rd_party:../../Nek5000/jl
srcdir := ../..
builddir := .
nek_includedir := ./include
# == Discovered by autoconf script
nek_CFLAGS := -O2 -funroll-loops -fstrict-aliasing -fopenmp -I/home/rahaman/install/mpich-3.2-gnu-5/include -I/home/rahaman/install/cvode-2.9.0-gnu-5/include
nek_INCLUDES := -I$(builddir) -I$(nek_includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt -I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl
nek_CPPFLAGS := -DNDEBUG -DPACKAGE_NAME=\"Nek5000\" -DPACKAGE_TARNAME=\"nek5000\" -DPACKAGE_VERSION=\"16.0.0\" -DPACKAGE_STRING=\"Nek5000\ 16.0.0\" -DPACKAGE_BUGREPORT=\"nek5000-users@lists.mcs.anl.gov\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_INT_P=8 -DSIZEOF_LONG_INT=8 -DF77_FUNC\(name,NAME\)=name\ \#\#\ _ -DF77_FUNC_\(name,NAME\)=name\ \#\#\ _ -DPTRSIZE8=1 -DUNDERSCORE=1 -DMPI=1 -DPREFIX=jl_ -DLONGINT8=1 -DGLOBAL_LONG_LONG=1 -DBLAS_MXM=1 -DNO_LAPACK=1 $(nek_INCLUDES)
nek_LDFLAGS := @LDFLAG@
nek_LIBS := -lz -Wl,-rpath,/opt/moose/tbb/lib -L/opt/moose/tbb/lib -ltbb -ltbbmalloc -L/opt/moose/petsc/mpich_petsc-3.6.4/gcc-opt-superlu/lib -lpetsc -Wl,-rpath,/opt/moose/petsc/mpich_petsc-3.6.4/gcc-opt-superlu/lib -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lsuperlu_dist_4.1 -lHYPRE -L/opt/moose/mpich/mpich-3.2/gcc-opt/lib -L/opt/moose/gcc-5.3.0/lib/gcc/x86_64-unknown-linux-gnu/5.3.0 -L/opt/moose/gcc-5.3.0/lib64 -L/lib/x86_64-linux-gnu -L/opt/moose/gcc-5.3.0/lib -lflapack -lfblas -lparmetis -lmetis -lX11 -lmpifort -lgfortran -lquadmath -lm -lmpicxx -lstdc++ -Wl,-rpath,/opt/moose/gcc-5.3.0/lib/gcc/x86_64-unknown-linux-gnu/5.3.0 -Wl,-rpath,/opt/moose/gcc-5.3.0/lib64 -Wl,-rpath,/lib/x86_64-linux-gnu -Wl,-rpath,/opt/moose/gcc-5.3.0/lib -Wl,-rpath,/opt/moose/mpich/mpich-3.2/gcc-opt/lib -lmpi -lgomp -lgcc_s -lpthread -ldl -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu -Wl,-rpath,/home/rahaman/repos/moon_fresh/moose/scripts/../libmesh/installed/lib -L/home/rahaman/repos/moon_fresh/moose/scripts/../libmesh/installed/lib -lmesh_opt -lmpifort -lmpicxx -lmpi -lsundials_nvecserial -lsundials_nvecparallel -lsundials_fnvecserial -lsundials_fnvecparallel -lsundials_fcvode -lsundials_cvode
nek_FFLAGS := -g -O2 -fopenmp -cpp $(subst -D, -D, -DPACKAGE_NAME=\"Nek5000\" -DPACKAGE_TARNAME=\"nek5000\" -DPACKAGE_VERSION=\"16.0.0\" -DPACKAGE_STRING=\"Nek5000\ 16.0.0\" -DPACKAGE_BUGREPORT=\"nek5000-users@lists.mcs.anl.gov\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_INT_P=8 -DSIZEOF_LONG_INT=8 -DF77_FUNC\(name,NAME\)=name\ \#\#\ _ -DF77_FUNC_\(name,NAME\)=name\ \#\#\ _ -DPTRSIZE8=1 -DUNDERSCORE=1 -DMPI=1 -DPREFIX=jl_ -DLONGINT8=1 -DGLOBAL_LONG_LONG=1 -DBLAS_MXM=1 -DNO_LAPACK=1) $(nek_INCLUDES)
nek_FLIBS := -L/home/rahaman/install/pycharm-community-2016.1.4/lib -L/home/rahaman/install/mpich-3.2-gnu-5/lib -L/home/rahaman/install/cvode-2.9.0-gnu-5/lib -L/home/rahaman/install/clion-2016.2.3/lib -L/opt/moose/tbb/lib -L/opt/moose/petsc/mpich_petsc-3.6.4/gcc-opt-superlu/lib -L/opt/moose/mpich/mpich-3.2/gcc-opt/lib -L/opt/moose/gcc-5.3.0/lib/gcc/x86_64-unknown-linux-gnu/5.3.0 -L/opt/moose/gcc-5.3.0/lib64 -L/lib/x86_64-linux-gnu -L/opt/moose/gcc-5.3.0/lib -L/usr/lib/x86_64-linux-gnu -L/home/rahaman/repos/moon_fresh/moose/scripts/../libmesh/installed/lib -L/opt/moose/gcc-5.3.0/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib64 -L/lib/../lib64 -L. -L/opt/moose/gcc-5.3.0/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../.. -lz -ltbb -ltbbmalloc -lpetsc -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lsuperlu_dist_4.1 -lHYPRE -lflapack -lfblas -lparmetis -lmetis -lX11 -lmpifort -lgfortran -lm -lquadmath -lmpicxx -lstdc++ -lmpi -lgomp -lpthread -ldl -lmesh_opt -lsundials_nvecserial -lsundials_nvecparallel -lsundials_fnvecserial -lsundials_fnvecparallel -lsundials_fcvode -lsundials_cvode
nek_debug_flags := -g
nek_opt_flags := -O2
nek_real8_flags := -fdefault-real-8 -fdefault-double-8
jl_prefix := jl_
# == FORTRAN objects ===============================================================================
nek_core_f_obj := $(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 \
ssolv planx mxm_wrapper hmholtz gfdm_par gfdm_op gfdm_solve \
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 integration_example)
nek_math_obj := $(addsuffix .$(obj-suffix), math)
nek_blas_obj := $(addsuffix .$(obj-suffix), ) # blas.o | null
nek_cmt_obj := $(addsuffix .$(obj-suffix), cmt_dummy) # drive1_cmt.o ... | cmt_dummy.o
nek_lapack_obj := $(addsuffix .$(obj-suffix), ) # dsygv.o ssygv.o | null
nek_mpi_obj := $(addsuffix .$(obj-suffix), byte_mpi comm_mpi) # byte_mpi.o comm_mpi.o | byte_mpi.o comm_mpi.o mpi_dummy.o
nek_mxm_obj := $(addsuffix .$(obj-suffix), mxm_std) # mxm_std.o | mxm_std.o mxm_bgq.o
nek_neknek_obj := $(addsuffix .$(obj-suffix), singlmesh) # 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)
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), sparse_cholesky xxt fcrs)
nek_clib_obj := $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj)
# == MOOSE app flags and objects ==================================================================
# Recursive definition (= rather than :=) is probably the right usage, since they're probably
# defined here after they're referenced by MOOSE makefile
ADDITIONAL_CPPFLAGS = -DNDEBUG # Used by pattern rules in moose/framework/build.mk
# Can't use Nek's DEFS here because the interfere with MOOSE
ADDITIONAL_INCLUDES = $(nek_INCLUDES) # Used by pattern rules in moose/framework/build.mk (through app_INCLUDES)
ADDITIONAL_LIBS = $(nek_LIBS) $(nek_FLIBS) # Used during linking in moose/framework/app.mk
ADDITIONAL_APP_OBJECTS = $(nek_flib_obj) $(nek_clib_obj) # Added to dependencies in moose/framework/app.mk
# == Rules =========================================================================================
$(nek_core_f_obj) $(nek_cmt_obj) $(nek_math_obj) $(nek_mxm_obj): %.$(obj-suffix): %.f SIZE
@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
@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
@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
@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 $@
mpiheader: | $(nek_includedir)
ifneq ($(findstring mpi_dummy.o, $(nek_mpi_obj)),)
cp $(srcdir)/Nek5000/core/mpi_dummy.h $(nek_includedir)/mpif.h
else
rm -rf $(srcdir)/Nek5000/core/mpif.h $(nek_includedir)/mpif.h
endif
$(objdir) $(nek_includedir):
mkdir -p $@
......@@ -93,3 +93,5 @@ endif
$(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