2010-05-19 22:52:50 +08:00
|
|
|
# serial = RedHat Linux box, g++4, gfortran, no MPI, no FFTs
|
2006-09-28 03:51:33 +08:00
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
2009-09-28 23:26:47 +08:00
|
|
|
# ---------------------------------------------------------------------
|
2009-10-30 05:32:55 +08:00
|
|
|
# compiler/linker settings
|
|
|
|
# generally no need to edit this section
|
|
|
|
# unless additional compiler/linker flags or libraries needed for your machine
|
|
|
|
|
2010-10-19 08:28:25 +08:00
|
|
|
CC = g++4
|
|
|
|
CCFLAGS = -O
|
2009-10-30 05:32:55 +08:00
|
|
|
DEPFLAGS = -M
|
2010-10-19 08:28:25 +08:00
|
|
|
LINK = g++4
|
|
|
|
LINKFLAGS = -O
|
2009-10-30 05:32:55 +08:00
|
|
|
LIB =
|
|
|
|
ARCHIVE = ar
|
|
|
|
ARFLAGS = -rc
|
|
|
|
SIZE = size
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
# LAMMPS-specific settings
|
2009-09-28 23:26:47 +08:00
|
|
|
# edit as needed for your machine
|
|
|
|
|
2009-10-30 04:52:39 +08:00
|
|
|
# LAMMPS ifdef options, see doc/Section_start.html
|
2009-09-28 23:26:47 +08:00
|
|
|
|
2009-10-30 04:52:39 +08:00
|
|
|
LMP_INC = -DLAMMPS_GZIP
|
2009-09-28 23:26:47 +08:00
|
|
|
|
2009-10-30 04:52:39 +08:00
|
|
|
# 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
|
2009-09-28 23:26:47 +08:00
|
|
|
|
2009-10-30 04:52:39 +08:00
|
|
|
MPI_INC = -I../STUBS
|
2010-07-13 22:00:15 +08:00
|
|
|
MPI_PATH =
|
|
|
|
MPI_LIB = ../STUBS/libmpi.a
|
2009-10-30 04:52:39 +08:00
|
|
|
|
|
|
|
# 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 =
|
|
|
|
|
2011-03-26 01:34:03 +08:00
|
|
|
# JPEG library, only needed if -DLAMMPS_JPEG listed with LMP_INC
|
|
|
|
# INC = path for jpeglib.h
|
|
|
|
# PATH = path for JPEG library
|
|
|
|
# LIB = name of JPEG library
|
|
|
|
|
|
|
|
JPG_INC =
|
|
|
|
JPG_PATH =
|
|
|
|
JPG_LIB =
|
|
|
|
|
2009-10-30 04:52:39 +08:00
|
|
|
# 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
|
2011-06-14 06:18:02 +08:00
|
|
|
# SYSINC = settings to compile with
|
|
|
|
# SYSLIB = libraries to link with
|
|
|
|
# SYSPATH = paths to libraries
|
|
|
|
|
|
|
|
gpu_SYSINC =
|
|
|
|
meam_SYSINC =
|
|
|
|
reax_SYSINC =
|
|
|
|
user-atc_SYSINC =
|
|
|
|
user-awpmd_SYSINC =
|
2009-10-30 04:52:39 +08:00
|
|
|
|
2011-05-02 23:02:58 +08:00
|
|
|
gpu_SYSLIB = -lcudart -lcuda
|
2010-05-19 22:52:50 +08:00
|
|
|
meam_SYSLIB = -lgfortran
|
|
|
|
reax_SYSLIB = -lgfortran
|
2009-10-30 04:52:39 +08:00
|
|
|
user-atc_SYSLIB = -lblas -llapack
|
2011-06-14 06:18:02 +08:00
|
|
|
user-awpmd_SYSLIB = -lblas -llapack
|
2009-09-28 23:26:47 +08:00
|
|
|
|
2009-10-30 04:52:39 +08:00
|
|
|
gpu_SYSPATH = -L/usr/local/cuda/lib64
|
2010-05-19 22:52:50 +08:00
|
|
|
meam_SYSPATH =
|
|
|
|
reax_SYSPATH =
|
2009-10-30 04:52:39 +08:00
|
|
|
user-atc_SYSPATH =
|
2011-06-14 06:18:02 +08:00
|
|
|
user-awpmd_SYSPATH =
|
2009-10-30 04:52:39 +08:00
|
|
|
|
2009-09-28 23:26:47 +08:00
|
|
|
# ---------------------------------------------------------------------
|
2009-10-30 04:52:39 +08:00
|
|
|
# build rules and dependencies
|
|
|
|
# no need to edit this section
|
2009-09-28 23:26:47 +08:00
|
|
|
|
2009-10-30 05:21:58 +08:00
|
|
|
include Makefile.package
|
|
|
|
|
2011-06-14 06:18:02 +08:00
|
|
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) ${PKG_SYSINC)
|
2011-03-26 01:34:03 +08:00
|
|
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
|
|
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
2009-10-30 05:21:58 +08:00
|
|
|
|
2006-09-28 03:51:33 +08:00
|
|
|
# Link target
|
|
|
|
|
|
|
|
$(EXE): $(OBJ)
|
2009-10-30 05:21:58 +08:00
|
|
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
2006-09-28 03:51:33 +08:00
|
|
|
$(SIZE) $(EXE)
|
|
|
|
|
|
|
|
# Library target
|
|
|
|
|
|
|
|
lib: $(OBJ)
|
|
|
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
|
|
|
|
|
|
|
# Compilation rules
|
|
|
|
|
|
|
|
%.o:%.cpp
|
2009-10-30 05:21:58 +08:00
|
|
|
$(CC) $(CCFLAGS) $(EXTRA_INC) -c $<
|
2006-09-28 03:51:33 +08:00
|
|
|
|
|
|
|
%.d:%.cpp
|
2009-10-30 05:21:58 +08:00
|
|
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
2006-09-28 03:51:33 +08:00
|
|
|
|
|
|
|
# Individual dependencies
|
|
|
|
|
|
|
|
DEPENDS = $(OBJ:.o=.d)
|
|
|
|
include $(DEPENDS)
|