# seaborg = NERSC IBM machine, mpCC, native MPI, FFTW

SHELL = /bin/sh
.SUFFIXES: .cpp .u
.IGNORE:

# System-specific settings

CC =		mpCC_r
CCFLAGS =	-O2 -qnoipa -I/usr/common/usg/fftw/2.1.5/include -DFFT_FFTW  
DEPFLAGS =	-M
LINK =		mpCC_r
LINKFLAGS =	-O -L/usr/lib -L/usr/common/usg/fftw/2.1.5/lib
USRLIB =	-lfftw -lfftw_mpi
SYSLIB =	-lm
SIZE =		size

# Link rule

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

# --------- old section -------------

# Compilation rules

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

# Individual dependencies

#$(OBJ):	     $(INC)

# --------- new section -------------

# Compilation rules

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

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

# Individual dependencies

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

