# power5 = IBM Power5+ machine, mpCC, FFTW

SHELL = /bin/sh
.SUFFIXES: .cpp .u
.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 =		mpCC_r
CCFLAGS =	$(PKGINC) -O3 -qnoipa -qlanglvl=oldmath \
		-I/scr/oppe/LAMMPS/fftw-2.1.5/include -DFFT_FFTW
DEPFLAGS =	-M
LINK =		mpCC_r
LINKFORT =	
LINKGPU =	
LINKFLAGS =	$(PKGPATH) $(LINKFORT) -O -qnoipa -qlanglvl=oldmath -bmaxdata:0x70000000 $(LINKGPU)
USRLIB =	$(PKGLIB) -L/scr/oppe/LAMMPS/fftw-2.1.5/lib -lfftw
FORTLIB =	
GPULIB =	
SYSLIB =	$(FORTLIB) -lm $(GPULIB)
SIZE =		size

# Link target

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

# Compilation rules

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

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