# encanto = NM cluster with dual quad-core Xeons, mpicxx, native MPI, 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 -DFFT_FFTW -I/home/jlane/fftw-2.1.5/fftw
DEPFLAGS =	-M
LINK =		mpicxx
LINKFORT =	
LINKGPU =	
LINKFLAGS =	$(PKGPATH) $(LINKFORT) -O -L/home/jlane/fftw-2.1.5/fftw/.libs $(LINKGPU)
USRLIB =	$(PKGLIB) -lstdc++ -lfftw
FORTLIB =	
GPULIB =	
SYSLIB =	$(FORTLIB) -lm $(GPULIB)
SIZE =		size

ARCHIVE =       ar
ARFLAGS =       -rc

# Link rule

$(EXE):	$(OBJ)
	$(LINK) $(LINKFLAGS) $(OBJ) $(USRLIB) $(SYSLIB) -o $(EXE)
	$(SIZE) $(EXE)

# Library target
 
lib:    $(OBJ)
	$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)


# Compilation rules

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

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

# Individual dependencies

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