# cygwin = Windows Cygwin, mpicxx, FFTW

SHELL = /bin/sh
#.IGNORE:

# System-specific settings

# LINKFORT & FORTLIB settings can be blank if not using LAMMPS Fortran libs
# LINKGPU & GPULIB settings can be blank if not using LAMMPS gpu lib

include		Makefile.package

CC = mpicxx 
CCFLAGS = $(PKGINC) -O -g -I/cygdrive/c/cygwin/fftw/include -DFFT_FFTW -DMPICH_IGNORE_CXX_SEEK
DEPFLAGS = -M
LINK = mpicxx 
LINKFORT =	
LINKGPU =	
LINKFLAGS = $(PKGPATH) $(LINKFORT) -O -g -L/cygdrive/c/cygwin/fftw/lib -L/cygdrive/c/cygwin/mpich2-1.0.4p1/lib $(LINKGPU)
USRLIB = $(PKGLIB) -lfftw -lmpich 
FORTLIB =	
GPULIB =	
SYSLIB = $(FORTLIB) -lm  $(GPULIB)
SIZE = size

# Link rule

$(EXE):	$(OBJ)
	$(LINK) $(LINKFLAGS) $(OBJ) $(USRLIB) $(SYSLIB) -o $(EXE)
	$(SIZE) $(EXE).exe
	mv $(EXE).exe ../lmp

# Compilation rules

%.o:%.cpp
	$(CC) $(CCFLAGS) -c $<

%.d:%.cpp
	$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@

# Individual dependencies

DEPENDS = $(OBJ:.o=.d)
include $(DEPENDS)
