From 8aa28e667783bfb4bca0e286cf3f8d87015deb00 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 7 Aug 2009 14:54:02 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3013 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/MEAM/Install.csh | 8 ++++++++ src/Makefile | 3 ++- src/Makefile.package | 6 ++++++ src/POEMS/Install.csh | 8 ++++++++ src/REAX/Install.csh | 8 ++++++++ src/style_meam.h | 20 ++++++++++++++++++++ src/style_poems.h | 20 ++++++++++++++++++++ 7 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 src/Makefile.package diff --git a/src/MEAM/Install.csh b/src/MEAM/Install.csh index 5f6b5116de..348181756f 100644 --- a/src/MEAM/Install.csh +++ b/src/MEAM/Install.csh @@ -1,4 +1,5 @@ # Install/unInstall package classes in LAMMPS +# edit Makefile.package to include/exclude MEAM library if ($1 == 1) then @@ -8,6 +9,11 @@ if ($1 == 1) then cp pair_meam.h .. + sed -i 's/\S*meam //' ../Makefile.package + sed -i 's|^PKGINC =\s*|&-I../../lib/meam |' ../Makefile.package + sed -i 's|^PKGPATH =\s*|&-L../../lib/meam |' ../Makefile.package + sed -i 's|^PKGLIB =\s*|&-lmeam |' ../Makefile.package + else if ($1 == 0) then rm ../style_meam.h @@ -17,4 +23,6 @@ else if ($1 == 0) then rm ../pair_meam.h + sed -i 's/\S*meam //' ../Makefile.package + endif diff --git a/src/Makefile b/src/Makefile index db7af5f8a6..29dcf7d4a4 100755 --- a/src/Makefile +++ b/src/Makefile @@ -63,6 +63,7 @@ help: @if [ ! -d Obj_$@ ]; then mkdir Obj_$@; fi @cp -p $(SRC) $(INC) Obj_$@ @cp MAKE/Makefile.$@ Obj_$@/Makefile + @cp Makefile.package Obj_$@ @cd Obj_$@; \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "EXE = ../$(EXE)" ../$(EXE) @if [ -d Obj_$@ ]; then cd Obj_$@; rm -f $(SRC) $(INC) Makefile*; fi @@ -170,4 +171,4 @@ package-update: package-overwrite: @for p in $(PACKAGEUC); do csh -f Package.csh $$p overwrite; done @echo '' - @for p in $(PACKUSERUC); do csh -f Package.csh $$p overwrite; done + @for p in $(PACKUSERUC); do csh -f Package.csh $$p overwrite diff --git a/src/Makefile.package b/src/Makefile.package new file mode 100644 index 0000000000..6d29e45742 --- /dev/null +++ b/src/Makefile.package @@ -0,0 +1,6 @@ +# Settings for libraries used by specific LAMMPS packages +# this file is auto-edited when those packages are included/excluded + +PKGINC = -I../../lib/poems -I../../lib/meam -I../../lib/reax +PKGPATH = -L../../lib/poems -L../../lib/meam -L../../lib/reax +PKGLIB = -lpoems -lmeam -lreax diff --git a/src/POEMS/Install.csh b/src/POEMS/Install.csh index 8e9577def7..78fb0131d7 100644 --- a/src/POEMS/Install.csh +++ b/src/POEMS/Install.csh @@ -1,4 +1,5 @@ # Install/unInstall package classes in LAMMPS +# edit Makefile.package to include/exclude POEMS library if ($1 == 1) then @@ -8,6 +9,11 @@ if ($1 == 1) then cp fix_poems.h .. + sed -i 's/\S*poems //' ../Makefile.package + sed -i 's|^PKGINC =\s*|&-I../../lib/poems |' ../Makefile.package + sed -i 's|^PKGPATH =\s*|&-L../../lib/poems |' ../Makefile.package + sed -i 's|^PKGLIB =\s*|&-lpoems |' ../Makefile.package + else if ($1 == 0) then rm ../style_poems.h @@ -17,4 +23,6 @@ else if ($1 == 0) then rm ../fix_poems.h + sed -i 's/\S*poems //' ../Makefile.package + endif diff --git a/src/REAX/Install.csh b/src/REAX/Install.csh index e4d2b3399e..c33b8bf482 100644 --- a/src/REAX/Install.csh +++ b/src/REAX/Install.csh @@ -1,4 +1,5 @@ # Install/unInstall package classes in LAMMPS +# edit Makefile.package to include/exclude REAX library if ($1 == 1) then @@ -12,6 +13,11 @@ if ($1 == 1) then cp fix_reax_bonds.h .. cp fix_reax_bonds.cpp .. + sed -i 's/\S*reax //' ../Makefile.package + sed -i 's|^PKGINC =\s*|&-I../../lib/reax |' ../Makefile.package + sed -i 's|^PKGPATH =\s*|&-L../../lib/reax |' ../Makefile.package + sed -i 's|^PKGLIB =\s*|&-lreax |' ../Makefile.package + else if ($1 == 0) then rm ../style_reax.h @@ -25,4 +31,6 @@ else if ($1 == 0) then rm ../fix_reax_bonds.h rm ../fix_reax_bonds.cpp + sed -i 's/\S*reax //' ../Makefile.package + endif diff --git a/src/style_meam.h b/src/style_meam.h index e69de29bb2..221a363f11 100644 --- a/src/style_meam.h +++ b/src/style_meam.h @@ -0,0 +1,20 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PairInclude +#include "pair_meam.h" +#endif + +#ifdef PairClass +PairStyle(meam,PairMEAM) +#endif diff --git a/src/style_poems.h b/src/style_poems.h index e69de29bb2..0434d02bf8 100644 --- a/src/style_poems.h +++ b/src/style_poems.h @@ -0,0 +1,20 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FixInclude +#include "fix_poems.h" +#endif + +#ifdef FixClass +FixStyle(poems,FixPOEMS) +#endif