# tbird = Dell cluster with dual 3.6 GHz Xeons, Intel mpicxx, native MPI, FFTW

SHELL = /bin/sh
.IGNORE:

# System-specific settings

# NOTE: you may need to invoke (by typing or in your .cshrc)
#   module load libraries/fftw-2.1.5-openmpi-1.1.2-ofed-intel-9.1
# before building LAMMPS

FFTW =	/apps/x86_64/libraries/fftw/openmpi-1.1.2-ofed-intel-9.1/fftw-2.1.5

CC =		mpicxx
CCFLAGS =	-O -DFFT_FFTW -I${FFTW}/include
DEPFLAGS =	-M
LINK =		mpicxx
LINKFLAGS =	-O -L${FFTW}/lib
USRLIB =	-lfftw -lstdc++
SYSLIB =	-lm
SIZE =		size

# 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)
