From f2a83a10412a57554f42ca1b06b01eae957be273 Mon Sep 17 00:00:00 2001
From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa>
Date: Wed, 29 Jan 2014 16:50:12 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11378
 f3b2605a-c512-4ea7-a41b-209d697bcdaa

---
 src/MAKE/Makefile.mingw32-cross     | 117 ++++++++++++++++++++++++++++
 src/MAKE/Makefile.mingw32-cross-mpi | 117 ++++++++++++++++++++++++++++
 src/MAKE/Makefile.mingw64-cross     | 117 ++++++++++++++++++++++++++++
 src/MAKE/Makefile.mingw64-cross-mpi | 117 ++++++++++++++++++++++++++++
 4 files changed, 468 insertions(+)
 create mode 100644 src/MAKE/Makefile.mingw32-cross
 create mode 100644 src/MAKE/Makefile.mingw32-cross-mpi
 create mode 100644 src/MAKE/Makefile.mingw64-cross
 create mode 100644 src/MAKE/Makefile.mingw64-cross-mpi

diff --git a/src/MAKE/Makefile.mingw32-cross b/src/MAKE/Makefile.mingw32-cross
new file mode 100644
index 0000000000..54459aee14
--- /dev/null
+++ b/src/MAKE/Makefile.mingw32-cross
@@ -0,0 +1,117 @@
+# mingw32-cross = Windows 32-bit, cross-compiled on Fedora 18, gcc-4.7.1, MinGW, internal FFT, no MPI, OpenMP
+
+SHELL = /bin/sh
+
+# ---------------------------------------------------------------------
+# compiler/linker settings
+# specify flags and libraries needed for your compiler
+
+CC =		i686-w64-mingw32-g++
+CCFLAGS =	-O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp	\
+		-ffast-math -fstrict-aliasing -Wall -W -Wno-uninitialized
+
+SHFLAGS =	# -fPIC (not needed on windows, all code is PIC)
+DEPFLAGS =	-M
+
+LINK =		i686-w64-mingw32-g++
+LINKFLAGS =	-O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp
+LIB =           -lwsock32 -static-libgcc
+SIZE =		i686-w64-mingw32-size
+
+ARCHIVE =	i686-w64-mingw32-ar
+ARFLAGS =	-rc
+SHLIBFLAGS =	-shared
+
+# name of object file subdir for libraries in lib with leading '/'
+LIBOBJDIR = 	/Obj_mingw32
+
+# ---------------------------------------------------------------------
+# LAMMPS-specific settings
+# specify settings for LAMMPS features you will use
+# if you change any -D setting, do full re-compile after "make clean"
+
+# LAMMPS ifdef settings, OPTIONAL
+# see possible settings in doc/Section_start.html#2_2 (step 4)
+
+LMP_INC =	-DLAMMPS_SMALLSMALL -DLAMMPS_JPEG -DLAMMPS_XDR #-DLAMMPS_GZIP -DMALLOC_MEMALIGN=64
+
+# MPI library, REQUIRED
+# see discussion in doc/Section_start.html#2_2 (step 5)
+# can point to dummy MPI library in src/STUBS as in Makefile.serial
+# INC = path for mpi.h, MPI compiler settings
+# PATH = path for MPI library
+# LIB = name of MPI library
+
+MPI_INC =       -I../STUBS
+MPI_PATH =      -L../STUBS
+MPI_LIB =	-lmpi_mingw32
+
+# FFT library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 6)
+# can be left blank to use provided KISS FFT library
+# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
+# PATH = path for FFT library
+# LIB = name of FFT library
+
+FFT_INC =
+FFT_PATH = 
+FFT_LIB =
+
+# JPEG and/or PNG library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 7)
+# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
+# INC = path(s) for jpeglib.h and/or png.h
+# PATH = path(s) for JPEG library and/or PNG library
+# LIB = name(s) of JPEG library and/or PNG library
+
+JPG_INC =       
+JPG_PATH = 	
+JPG_LIB =	-ljpeg
+
+# ---------------------------------------------------------------------
+# build rules and dependencies
+# no need to edit this section
+
+include	Makefile.package.settings
+include	Makefile.package
+
+EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
+EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
+EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
+
+# Path to src files
+
+vpath %.cpp ..
+vpath %.h ..
+
+# Link target
+
+$(EXE):	$(OBJ)
+	$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
+	$(SIZE) $(EXE)
+
+# Library targets
+
+lib:	$(OBJ)
+	$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
+
+shlib:	$(OBJ)
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
+        $(OBJ) $(EXTRA_LIB) $(LIB)
+
+# Compilation rules
+
+%.o:%.cpp
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
+
+%.d:%.cpp
+	$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
+
+# Individual dependencies
+
+DEPENDS = $(OBJ:.o=.d)
+sinclude $(DEPENDS)
+
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/src/MAKE/Makefile.mingw32-cross-mpi b/src/MAKE/Makefile.mingw32-cross-mpi
new file mode 100644
index 0000000000..432c1b1d1f
--- /dev/null
+++ b/src/MAKE/Makefile.mingw32-cross-mpi
@@ -0,0 +1,117 @@
+# mingw32-cross-mpi = Windows 32-bit, cross-compiled on Fedora 18, gcc-4.7.1, MinGW, internal FFT, MPICH2, OpenMP
+
+SHELL = /bin/sh
+
+# ---------------------------------------------------------------------
+# compiler/linker settings
+# specify flags and libraries needed for your compiler
+
+CC =		i686-w64-mingw32-g++
+CCFLAGS =	-O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp	\
+		-ffast-math -fstrict-aliasing -Wall -W -Wno-uninitialized
+
+SHFLAGS =	# -fPIC (not needed on windows, all code is PIC)
+DEPFLAGS =	-M
+
+LINK =		i686-w64-mingw32-g++
+LINKFLAGS =	-O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp
+LIB =           -lwsock32 -static-libgcc
+SIZE =		i686-w64-mingw32-size
+
+ARCHIVE =	i686-w64-mingw32-ar
+ARFLAGS =	-rc
+SHLIBFLAGS =	-shared
+
+# name of object file subdir for libraries in lib with leading '/'
+LIBOBJDIR = 	/Obj_mingw32-mpi
+
+# ---------------------------------------------------------------------
+# LAMMPS-specific settings
+# specify settings for LAMMPS features you will use
+# if you change any -D setting, do full re-compile after "make clean"
+
+# LAMMPS ifdef settings, OPTIONAL
+# see possible settings in doc/Section_start.html#2_2 (step 4)
+
+LMP_INC =	-DLAMMPS_SMALLSMALL -DLAMMPS_JPEG -DLAMMPS_XDR #-DLAMMPS_GZIP -DMALLOC_MEMALIGN=64
+
+# MPI library, REQUIRED
+# see discussion in doc/Section_start.html#2_2 (step 5)
+# can point to dummy MPI library in src/STUBS as in Makefile.serial
+# INC = path for mpi.h, MPI compiler settings
+# PATH = path for MPI library
+# LIB = name of MPI library
+
+MPI_INC =       -I../../tools/mingw-cross/mpich2-win32/include
+MPI_PATH =      -L../../tools/mingw-cross/mpich2-win32/lib
+MPI_LIB =	-lmpi
+
+# FFT library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 6)
+# can be left blank to use provided KISS FFT library
+# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
+# PATH = path for FFT library
+# LIB = name of FFT library
+
+FFT_INC =
+FFT_PATH = 
+FFT_LIB =
+
+# JPEG and/or PNG library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 7)
+# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
+# INC = path(s) for jpeglib.h and/or png.h
+# PATH = path(s) for JPEG library and/or PNG library
+# LIB = name(s) of JPEG library and/or PNG library
+
+JPG_INC =       
+JPG_PATH = 	
+JPG_LIB =	-ljpeg
+
+# ---------------------------------------------------------------------
+# build rules and dependencies
+# no need to edit this section
+
+include	Makefile.package.settings
+include	Makefile.package
+
+EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
+EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
+EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
+
+# Path to src files
+
+vpath %.cpp ..
+vpath %.h ..
+
+# Link target
+
+$(EXE):	$(OBJ)
+	$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
+	$(SIZE) $(EXE)
+
+# Library targets
+
+lib:	$(OBJ)
+	$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
+
+shlib:	$(OBJ)
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
+        $(OBJ) $(EXTRA_LIB) $(LIB)
+
+# Compilation rules
+
+%.o:%.cpp
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
+
+%.d:%.cpp
+	$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
+
+# Individual dependencies
+
+DEPENDS = $(OBJ:.o=.d)
+sinclude $(DEPENDS)
+
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/src/MAKE/Makefile.mingw64-cross b/src/MAKE/Makefile.mingw64-cross
new file mode 100644
index 0000000000..8cfa6c486b
--- /dev/null
+++ b/src/MAKE/Makefile.mingw64-cross
@@ -0,0 +1,117 @@
+# mingw64-cross = Windows 64-bit, cross-compiled on Fedora 18, gcc-4.7.1, MinGW, internal FFT, no MPI, OpenMP
+
+SHELL = /bin/sh
+
+# ---------------------------------------------------------------------
+# compiler/linker settings
+# specify flags and libraries needed for your compiler
+
+CC =		x86_64-w64-mingw32-g++
+CCFLAGS =	-O3 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp	\
+		-ffast-math -fstrict-aliasing -Wall -W -Wno-uninitialized
+
+SHFLAGS =	# -fPIC (not needed on windows, all code is PIC)
+DEPFLAGS =	-M
+
+LINK =		x86_64-w64-mingw32-g++
+LINKFLAGS =	-O2 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp
+LIB =           -lwsock32 -static-libgcc
+SIZE =		x86_64-w64-mingw32-size
+
+ARCHIVE =	x86_64-w64-mingw32-ar
+ARFLAGS =	-rc
+SHLIBFLAGS =	-shared
+
+# name of object file subdir for libraries in lib with leading '/'
+LIBOBJDIR = 	/Obj_mingw64
+
+# ---------------------------------------------------------------------
+# LAMMPS-specific settings
+# specify settings for LAMMPS features you will use
+# if you change any -D setting, do full re-compile after "make clean"
+
+# LAMMPS ifdef settings, OPTIONAL
+# see possible settings in doc/Section_start.html#2_2 (step 4)
+
+LMP_INC =	-DLAMMPS_SMALLBIG -DLAMMPS_JPEG -DLAMMPS_XDR #-DLAMMPS_GZIP -DMALLOC_MEMALIGN=64
+
+# MPI library, REQUIRED
+# see discussion in doc/Section_start.html#2_2 (step 5)
+# can point to dummy MPI library in src/STUBS as in Makefile.serial
+# INC = path for mpi.h, MPI compiler settings
+# PATH = path for MPI library
+# LIB = name of MPI library
+
+MPI_INC =       -I../STUBS
+MPI_PATH =      -L../STUBS
+MPI_LIB =	-lmpi_mingw64
+
+# FFT library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 6)
+# can be left blank to use provided KISS FFT library
+# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
+# PATH = path for FFT library
+# LIB = name of FFT library
+
+FFT_INC =
+FFT_PATH = 
+FFT_LIB =
+
+# JPEG and/or PNG library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 7)
+# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
+# INC = path(s) for jpeglib.h and/or png.h
+# PATH = path(s) for JPEG library and/or PNG library
+# LIB = name(s) of JPEG library and/or PNG library
+
+JPG_INC =       
+JPG_PATH = 	
+JPG_LIB =	-ljpeg
+
+# ---------------------------------------------------------------------
+# build rules and dependencies
+# no need to edit this section
+
+include	Makefile.package.settings
+include	Makefile.package
+
+EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
+EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
+EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
+
+# Path to src files
+
+vpath %.cpp ..
+vpath %.h ..
+
+# Link target
+
+$(EXE):	$(OBJ)
+	$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
+	$(SIZE) $(EXE)
+
+# Library targets
+
+lib:	$(OBJ)
+	$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
+
+shlib:	$(OBJ)
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
+        $(OBJ) $(EXTRA_LIB) $(LIB)
+
+# Compilation rules
+
+%.o:%.cpp
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
+
+%.d:%.cpp
+	$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
+
+# Individual dependencies
+
+DEPENDS = $(OBJ:.o=.d)
+sinclude $(DEPENDS)
+
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/src/MAKE/Makefile.mingw64-cross-mpi b/src/MAKE/Makefile.mingw64-cross-mpi
new file mode 100644
index 0000000000..69ed1a6480
--- /dev/null
+++ b/src/MAKE/Makefile.mingw64-cross-mpi
@@ -0,0 +1,117 @@
+# mingw64-cross-mpi = Windows 64-bit, cross-compiled on Fedora 18, gcc-4.7.1, MinGW, internal FFT, MPICH2, OpenMP
+
+SHELL = /bin/sh
+
+# ---------------------------------------------------------------------
+# compiler/linker settings
+# specify flags and libraries needed for your compiler
+
+CC =		x86_64-w64-mingw32-g++
+CCFLAGS =	-O3 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp	\
+		-ffast-math -fstrict-aliasing -Wall -W -Wno-uninitialized
+
+SHFLAGS =	# -fPIC (not needed on windows, all code is PIC)
+DEPFLAGS =	-M
+
+LINK =		x86_64-w64-mingw32-g++
+LINKFLAGS =	-O2 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp
+LIB =           -lwsock32 -static-libgcc
+SIZE =		x86_64-w64-mingw32-size
+
+ARCHIVE =	x86_64-w64-mingw32-ar
+ARFLAGS =	-rc
+SHLIBFLAGS =	-shared
+
+# name of object file subdir for libraries in lib with leading '/'
+LIBOBJDIR = 	/Obj_mingw64-mpi
+
+# ---------------------------------------------------------------------
+# LAMMPS-specific settings
+# specify settings for LAMMPS features you will use
+# if you change any -D setting, do full re-compile after "make clean"
+
+# LAMMPS ifdef settings, OPTIONAL
+# see possible settings in doc/Section_start.html#2_2 (step 4)
+
+LMP_INC =	-DLAMMPS_SMALLBIG -DLAMMPS_JPEG -DLAMMPS_XDR #-DLAMMPS_GZIP -DMALLOC_MEMALIGN=64
+
+# MPI library, REQUIRED
+# see discussion in doc/Section_start.html#2_2 (step 5)
+# can point to dummy MPI library in src/STUBS as in Makefile.serial
+# INC = path for mpi.h, MPI compiler settings
+# PATH = path for MPI library
+# LIB = name of MPI library
+
+MPI_INC =       -I../../tools/mingw-cross/mpich2-win64/include
+MPI_PATH =      -L../../tools/mingw-cross/mpich2-win64/lib
+MPI_LIB =	-lmpi
+
+# FFT library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 6)
+# can be left blank to use provided KISS FFT library
+# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
+# PATH = path for FFT library
+# LIB = name of FFT library
+
+FFT_INC =
+FFT_PATH = 
+FFT_LIB =
+
+# JPEG and/or PNG library, OPTIONAL
+# see discussion in doc/Section_start.html#2_2 (step 7)
+# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
+# INC = path(s) for jpeglib.h and/or png.h
+# PATH = path(s) for JPEG library and/or PNG library
+# LIB = name(s) of JPEG library and/or PNG library
+
+JPG_INC =       
+JPG_PATH = 	
+JPG_LIB =	-ljpeg
+
+# ---------------------------------------------------------------------
+# build rules and dependencies
+# no need to edit this section
+
+include	Makefile.package.settings
+include	Makefile.package
+
+EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
+EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
+EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
+
+# Path to src files
+
+vpath %.cpp ..
+vpath %.h ..
+
+# Link target
+
+$(EXE):	$(OBJ)
+	$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
+	$(SIZE) $(EXE)
+
+# Library targets
+
+lib:	$(OBJ)
+	$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
+
+shlib:	$(OBJ)
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
+        $(OBJ) $(EXTRA_LIB) $(LIB)
+
+# Compilation rules
+
+%.o:%.cpp
+	$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
+
+%.d:%.cpp
+	$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
+
+# Individual dependencies
+
+DEPENDS = $(OBJ:.o=.d)
+sinclude $(DEPENDS)
+
+# Local Variables:
+# mode: makefile
+# End:
-- 
GitLab