# liberty_poems_meam = HP cluster w/ dual Xeons, mpiCC, native MPI, FFTW, POEMS/MEAM libs

SHELL = /bin/sh
.IGNORE:

# System-specific settings

FFTW =		/apps/libraries/fftw/icc

CC =		mpiCC
CCFLAGS =	-O -DFFT_FFTW -I${FFTW}/fftw -I/home/sjplimp/lammps/lib/poems
DEPFLAGS =	-M
LINK =		mpiCC
LINKFLAGS =	-O -L${FFTW}/fftw/.libs -L/home/sjplimp/lammps/lib/poems \
		-L/home/sjplimp/lammps/lib/meam -L/opt/intel/fc/9.0/lib
USRLIB =	-lfftw -lpoems -lmeam
SYSLIB =	-lstdc++ -lm -lifcore
SIZE =		size

# Link rule

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

# Compilation rules

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

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

# Individual dependencies

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