# valor = HP cluster with dual Xeons, mpiCC, native MPI, FFTW

SHELL = /bin/sh
.IGNORE:

# System-specific settings

FFTW =		/apps/libraries/fftw-2.1.5

CC =		mpiCC
CCFLAGS =	-O -DFFT_FFTW -I${FFTW}/include
DEPFLAGS =	-M
LINK =		mpiCC
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)

# Compilation rules

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

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

# Individual dependencies

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