mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@811 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
9c079d7964
commit
df79e958b6
20
src/Makefile
20
src/Makefile
|
@ -11,18 +11,21 @@ SRC = $(wildcard *.cpp)
|
|||
INC = $(wildcard *.h)
|
||||
OBJ = $(SRC:.cpp=.o)
|
||||
|
||||
# Package variables
|
||||
|
||||
PACKAGE = asphere class2 colloid dipole dpd granular \
|
||||
kspace manybody meam molecule opt poems xtc
|
||||
PACKUC = $(shell perl -e 'printf("%s", uc("$(PACKAGE)"));')
|
||||
YESDIR = $(shell perl -e 'printf("%s", uc("$(@:yes-%=%)"));')
|
||||
NODIR = $(shell perl -e 'printf("%s", uc("$(@:no-%=%)"));')
|
||||
|
||||
# Targets
|
||||
# List of all targets
|
||||
|
||||
help:
|
||||
@echo ''
|
||||
@echo 'make clean-all delete all object files'
|
||||
@echo 'make clean-machine delete object files for one machine'
|
||||
@echo 'make tar lmp_src.tar.gz of src dir and packages'
|
||||
@echo 'make makelib update Makefile.lib for library build'
|
||||
@echo 'make makelist update Makefile.list used by old makes'
|
||||
@echo ''
|
||||
|
@ -41,6 +44,8 @@ help:
|
|||
for file in $$files; do head -1 $$file; done
|
||||
@echo ''
|
||||
|
||||
# Build the code
|
||||
|
||||
.DEFAULT:
|
||||
@test -f MAKE/Makefile.$@
|
||||
@if [ ! -d Obj_$@ ]; then mkdir Obj_$@; fi
|
||||
|
@ -50,6 +55,8 @@ help:
|
|||
$(MAKE) "OBJ = $(OBJ)" "INC = $(INC)" "EXE = ../$(EXE)" ../$(EXE)
|
||||
@if [ -d Obj_$@ ]; then cd Obj_$@; rm $(SRC) $(INC) Makefile*; fi
|
||||
|
||||
# Remove machine-specific object files
|
||||
|
||||
clean:
|
||||
@echo 'make clean-all delete all object files'
|
||||
@echo 'make clean-machine delete object files for one machine'
|
||||
|
@ -60,6 +67,17 @@ clean-all:
|
|||
clean-%:
|
||||
rm -r Obj_$(@:clean-%=%)
|
||||
|
||||
# Create a tarball of src dir and packages
|
||||
|
||||
tar:
|
||||
@cd STUBS; make clean
|
||||
@cd ..; tar cvf src/$(ROOT)_src.tar \
|
||||
src/MAKE src/Make* src/Package.csh src/STUBS src/*.cpp src/*.h \
|
||||
$(patsubst %,src/%,$(PACKUC))
|
||||
@gzip $(ROOT)_src.tar
|
||||
@cd STUBS; make
|
||||
@echo "Created $(ROOT)_src.tar.gz"
|
||||
|
||||
# Update Makefile.lib and Makefile.list
|
||||
|
||||
makelib:
|
||||
|
|
|
@ -63,8 +63,10 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||
int index;
|
||||
int iarg = 4;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"x") == 0 || strcmp(arg[iarg],"y") == 0 ||
|
||||
if (strcmp(arg[iarg],"x") == 0 ||
|
||||
strcmp(arg[iarg],"y") == 0 ||
|
||||
strcmp(arg[iarg],"z") == 0) {
|
||||
|
||||
if (strcmp(arg[iarg],"x") == 0) index = 0;
|
||||
else if (strcmp(arg[iarg],"y") == 0) index = 1;
|
||||
else if (strcmp(arg[iarg],"z") == 0) index = 2;
|
||||
|
@ -106,9 +108,11 @@ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||
set[index].style = VOLUME;
|
||||
iarg += 2;
|
||||
} else error->all("Illegal fix deform command");
|
||||
|
||||
} else if (strcmp(arg[iarg],"xy") == 0 ||
|
||||
strcmp(arg[iarg],"xz") == 0 ||
|
||||
strcmp(arg[iarg],"yz") == 0) {
|
||||
|
||||
} else if (strcmp(arg[iarg],"xy") == 0 || strcmp(arg[iarg],"xz") == 0 ||
|
||||
strcmp(arg[iarg],"yz") == 0) {
|
||||
if (triclinic == 0)
|
||||
error->all("Fix deform tilt factors require triclinic box");
|
||||
if (strcmp(arg[iarg],"xy") == 0) index = 5;
|
||||
|
|
Loading…
Reference in New Issue