CC       = bgxlc_r
CPP      = cpp -traditional -E
#CPP      = /opt/ibmcmp/xlf/bg/11.1/exe/cpp -traditional -E 
FC       = /bgsys/drivers/ppcfloor/comm/bin/mpixlf95_r -qstacktemp=1 -qsuffix=f=f90 
LD       = /bgsys/drivers/ppcfloor/comm/bin/mpixlf95_r -qstacktemp=1 
AR       = ar -r
DFLAGS   = -D__FFTW3 -D__parallel -D__SCALAPACK -I/sp/LIB/BGP/fftw-3.1.2/include
CPPFLAGS = -C $(DFLAGS) -P
FCFLAGS  = -qsmp=omp -O2 -qarch=450d  -qtune=450  -I/sp/LIB/BGP/fftw-3.1.2/include
#-qmaxmem=-1  
#-qalias=noaryovrlp  
FCFLAGS_NOOMP  = -O2 -qarch=450d  -qtune=450  -I/sp/LIB/BGP/fftw-3.1.2/include
#-qmaxmem=-1  
#-qalias=noaryovrlp 
LDFLAGS  = $(FCFLAGS) -O2  -qarch=450d -qtune=450  -qnosave  --allow-multiple-definition
LIBS     = -L/sp/LIB/BGP  -L/sp/LIB/BGP/fftw-3.1.2/lib -lmass -lscalapack -lblacsF77init -lblacs -llapack -lesslsmpbg -lfftw3  --allow-multiple-definition 


### To avoid internal compiler errors when using smp ###
dbcsr_work_operations.o: dbcsr_work_operations.F
	$(FC) -c $(FCFLAGS_NOOMP) $<
dbcsr_block_access.o: dbcsr_block_access.F
	$(FC) -c $(FCFLAGS_NOOMP) $<
dbcsr_transformations.o: dbcsr_transformations.F
	$(FC) -c $(FCFLAGS_NOOMP) $<
fft_tools.o: fft_tools.F
	$(FC) -c $(FCFLAGS_NOOMP) $<
realspace_grid_types.o: realspace_grid_types.F
	$(FC) -c $(FCFLAGS_NOOMP) $<
qs_integrate_potential.o: qs_integrate_potential.F
	$(FC) -c $(FCFLAGS_NOOMP) $<
