mirror of https://github.com/lammps/lammps.git
94 lines
2.3 KiB
Makefile
94 lines
2.3 KiB
Makefile
# qed = CSRI cluster, mpiCC, MPICH, no FFTs
|
|
|
|
SHELL = /bin/sh
|
|
|
|
# ---------------------------------------------------------------------
|
|
# system-specific settings
|
|
# specify settings for LAMMPS features you will use
|
|
|
|
# LAMMPS ifdef options, see doc/Section_start.html
|
|
|
|
LMP_INC = -DLAMMPS_GZIP
|
|
|
|
# MPI library, can be src/STUBS dummy lib
|
|
# INC = path for mpi.h, MPI compiler settings
|
|
# PATH = path for MPI library
|
|
# LIB = name of MPI library
|
|
|
|
MPI_INC = -I/usr/local/mpich-1.2.6-eth/include
|
|
MPI_PATH = -L/usr/local/mpich-1.2.6-eth/lib
|
|
MPI_LIB = -lmpich
|
|
|
|
# FFT library, can be -DFFT_NONE if not using PPPM from KSPACE package
|
|
# INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings
|
|
# PATH = path for FFT library
|
|
# LIB = name of FFT library
|
|
|
|
FFT_INC = -DFFT_NONE
|
|
FFT_PATH =
|
|
FFT_LIB =
|
|
|
|
# additional system libraries needed by LAMMPS package libraries
|
|
# these settings are IGNORED if the corresponding LAMMPS package
|
|
# (e.g. gpu, meam) is NOT included in the LAMMPS build
|
|
# SYSLIB = names of libraries
|
|
# SYSPATH = paths of libraries
|
|
|
|
gpu_SYSLIB = -lcudart
|
|
meam_SYSLIB = -lifcore -lsvml -lompstub -limf
|
|
reax_SYSLIB = -lifcore -lsvml -lompstub -limf
|
|
user-atc_SYSLIB = -lblas -llapack
|
|
|
|
gpu_SYSPATH = -L/usr/local/cuda/lib64
|
|
meam_SYSPATH = -L/opt/intel/fce/10.0.023/lib
|
|
reax_SYSPATH = -L/opt/intel/fce/10.0.023/lib
|
|
user-atc_SYSPATH =
|
|
|
|
# ---------------------------------------------------------------------
|
|
# compiler/linker settings
|
|
# specify flags and libraries needed for your compiler
|
|
|
|
include Makefile.package
|
|
|
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC)
|
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(PKG_SYSPATH)
|
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(PKG_SYSLIB)
|
|
|
|
CC = mpiCC
|
|
CCFLAGS = -O $(EXTRA_INC)
|
|
DEPFLAGS = -M
|
|
LINK = mpiCC
|
|
LINKFLAGS = -O $(EXTRA_PATH)
|
|
LIB = $(EXTRA_LIB)
|
|
ARCHIVE = ar
|
|
ARFLAGS = -rc
|
|
SIZE = size
|
|
|
|
# ---------------------------------------------------------------------
|
|
# build rules and dependencies
|
|
# no need to edit this section
|
|
|
|
# Link target
|
|
|
|
$(EXE): $(OBJ)
|
|
$(LINK) $(LINKFLAGS) $(OBJ) $(LIB) -o $(EXE)
|
|
$(SIZE) $(EXE)
|
|
|
|
# Library target
|
|
|
|
lib: $(OBJ)
|
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
|
|
|
# Compilation rules
|
|
|
|
%.o:%.cpp
|
|
$(CC) $(CCFLAGS) -c $<
|
|
|
|
%.d:%.cpp
|
|
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
|
|
|
|
# Individual dependencies
|
|
|
|
DEPENDS = $(OBJ:.o=.d)
|
|
include $(DEPENDS)
|