clean up makefiles provide "serial" and "mpi" targets for atc and awpmd

This commit is contained in:
Axel Kohlmeyer 2017-07-28 13:36:06 -04:00
parent e7d9aabca6
commit f3850da9fe
14 changed files with 49 additions and 481 deletions

View File

@ -1,3 +1,4 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
@ -5,6 +6,7 @@ SHELL = /bin/sh
EXTRAMAKE = Makefile.lammps.installed
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
@ -47,5 +49,9 @@ DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
.PHONY: clean lib
clean:
-rm *.o *.d *~ $(LIB)
sinclude $(DEPENDS)

View File

@ -1,5 +0,0 @@
# Settings that the LAMMPS build will import when this package library is used
user-atc_SYSINC =
user-atc_SYSLIB = -lblas -llapack
user-atc_SYSPATH =

View File

@ -1,67 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw32/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = i686-w64-mingw32-g++
CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLSMALL -Wno-uninitialized
ARCHIVE = i686-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -1,68 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw32-mpi/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = i686-w64-mingw32-g++
CCFLAGS = -I../../tools/mingw-cross/mpich2-win32/include/ \
-I../../src -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLSMALL -Wno-uninitialized
ARCHIVE = i686-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -1,67 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw64/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = x86_64-w64-mingw32-g++
CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLBIG -Wno-uninitialized
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -1,68 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw64-mpi/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = x86_64-w64-mingw32-g++
CCFLAGS = -I../../tools/mingw-cross/mpich2-win64/include/ \
-I../../src -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLBIG -Wno-uninitialized
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -2,38 +2,54 @@
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.installed
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
LIB = libatc.a
OBJ = $(SRC:.cpp=.o)
default: lib
# ------ SETTINGS ------
.PHONY: clean lib depend
# include any MPI settings needed for the ATC library to build with
# must be the same MPI library that LAMMPS is built with
CC = mpic++
CCFLAGS = -O3 -Wall -g -I../../src -fPIC -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1
CC = mpicxx
CCFLAGS = -O3 -Wall -g -fPIC
CPPFLAGS = -I../../src -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
$(CC) $(CPPFLAGS) $(CCFLAGS) -c $<
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
depend .depend : fastdep.exe $(SRC)
@./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1
fastdep.exe: ../../src/DEPEND/fastdep.c
@cc -O -o $@ $<
# ------ CLEAN ------
clean:
-rm *.o *.d *~ $(LIB)
-rm -f *.o *~ .depend $(LIB) fastdep.exe
sinclude $(DEPENDS)

View File

@ -14,18 +14,20 @@ INC = $(wildcard *.h)
LIB = libatc.a
OBJ = $(SRC:.cpp=.o)
default: lib
# ------ SETTINGS ------
.PHONY: clean lib depend
# include any MPI settings needed for the ATC library to build with
# must be the same MPI library that LAMMPS is built with
CC = g++
CCFLAGS = -O -g -fPIC -I../../src -I../../src/STUBS
CCFLAGS = -O3 -g -fPIC
CPPFLAGS = -I../../src -I../../src/STUBS
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
@ -35,17 +37,19 @@ lib: $(OBJ)
# ------ COMPILE RULES ------
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
$(CC) $(CPPFLAGS) $(CCFLAGS) -c $<
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
depend .depend : fastdep.exe $(SRC)
@./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1
fastdep.exe: ../../src/DEPEND/fastdep.c
@cc -O -o $@ $<
# ------ CLEAN ------
clean:
-rm *.o *.d *~ $(LIB)
-rm -f *.o *~ .depend $(LIB) fastdep.exe
sinclude $(DEPENDS)
sinclude .depend

View File

@ -1,80 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = logexc.cpp wpmd.cpp wpmd_split.cpp
vpath %.cpp ivutils/src
vpath %.cpp systems/interact/TCP
INC = \
cerf.h \
cerf2.h \
cerf_octave.h \
cvector_3.h \
lapack_inter.h \
logexc.h \
pairhash.h \
refobj.h \
tcpdefs.h \
vector_3.h \
wavepacket.h \
wpmd.h \
wpmd_split.h
# ------ DEFINITIONS ------
DIR = Obj_mingw32/
LIB = $(DIR)libawpmd.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = i686-w64-mingw32-g++
CCFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-finline-functions \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include
ARCHIVE = i686-w64-mingw32-ar
ARCHFLAG = -rscv
DEPFLAGS = -M
#LINK =
#LINKFLAGS =
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm *.d *~ $(OBJ) $(LIB)

View File

@ -1,13 +0,0 @@
# -*- makefile -*- wrapper for non-MPI libraries
SHELL=/bin/sh
all:
$(MAKE) $(MFLAGS) mingw32-cross
rm -f Obj_mingw32-mpi
ln -s Obj_mingw32 Obj_mingw32-mpi
clean:
$(MAKE) $(MFLAGS) clean-mingw32-cross
rm -f Obj_mingw32-mpi

View File

@ -1,79 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = logexc.cpp wpmd.cpp wpmd_split.cpp
vpath %.cpp ivutils/src
vpath %.cpp systems/interact/TCP
INC = \
cerf.h \
cerf2.h \
cerf_octave.h \
cvector_3.h \
lapack_inter.h \
logexc.h \
pairhash.h \
refobj.h \
tcpdefs.h \
vector_3.h \
wavepacket.h \
wpmd.h \
wpmd_split.h
# ------ DEFINITIONS ------
DIR = Obj_mingw64/
LIB = $(DIR)libawpmd.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = x86_64-w64-mingw32-g++
CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rscv
DEPFLAGS = -M
#LINK =
#LINKFLAGS =
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm *.d *~ $(OBJ) $(LIB)

View File

@ -1,13 +0,0 @@
# -*- makefile -*- wrapper for non-MPI libraries
SHELL=/bin/sh
all:
$(MAKE) $(MFLAGS) mingw64-cross
rm -f Obj_mingw64-mpi
ln -s Obj_mingw64 Obj_mingw64-mpi
clean:
$(MAKE) $(MFLAGS) clean-mingw64-cross
rm -f Obj_mingw64-mpi

1
lib/h5md/Makefile.mpi Symbolic link
View File

@ -0,0 +1 @@
Makefile.h5cc

1
lib/h5md/Makefile.serial Symbolic link
View File

@ -0,0 +1 @@
Makefile.h5cc