2003-01-20 05:58:50 +08:00
|
|
|
# System-dependent Make definitions for Linux PCs, pgi compiler
|
|
|
|
# Edit according to your needs
|
2005-03-09 02:44:10 +08:00
|
|
|
|
|
|
|
.SUFFIXES :
|
|
|
|
.SUFFIXES : .o .c .f .f90
|
|
|
|
|
|
|
|
.f90.o:
|
|
|
|
$(CPP) $(CPPFLAGS) $*.f90 $*.F90
|
|
|
|
$(F90) $(F90FLAGS) -c $*.F90 -o $*.o
|
|
|
|
|
|
|
|
.f.o:
|
2005-03-16 19:45:27 +08:00
|
|
|
$(F77) $(FFLAGS) -c $<
|
2005-03-09 02:44:10 +08:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
|
2003-01-20 05:58:50 +08:00
|
|
|
# we assume that the GNU precompiler is used. The option -traditional
|
|
|
|
# prevent string concatenation '//' from being interpreted as a comment
|
2005-03-09 02:44:10 +08:00
|
|
|
CPP = /lib/cpp -P -traditional
|
|
|
|
|
2003-01-20 05:58:50 +08:00
|
|
|
# Add -DADD_BLAS_ONE_UNDERSCORE if your blas/lapack library names contain
|
|
|
|
# two underscores at the end
|
2003-06-12 15:43:14 +08:00
|
|
|
|
2005-03-09 02:44:10 +08:00
|
|
|
## Use precompiled fftw library (version <= 2.1.5, NOT v.3!)
|
|
|
|
## In this case, specify also how to load the fftw library (FFTW_LIB)
|
|
|
|
## and the path to the fftw.h include file (FFTW_INC_DIR). Example:
|
|
|
|
# FFTW_LIB = -L/usr/local/src/fftw-2.1.3/fftw/.libs -lfftw
|
|
|
|
# FFTW_INC_DIR = /usr/local/src/fftw-2.1.3/fftw
|
|
|
|
# CPPFLAGS = -D__LINUX -D__PGI -D__FFTW -I../include -I$(FFTW_INC_DIR)
|
2003-06-12 15:43:14 +08:00
|
|
|
|
|
|
|
# Use the local copy of fftw
|
2005-03-09 02:44:10 +08:00
|
|
|
CPPFLAGS = -D__LINUX -D__PGI -D__FFTW -D__USE_INTERNAL_FFTW \
|
|
|
|
-I../include -I.
|
2003-06-12 15:43:14 +08:00
|
|
|
|
2003-01-20 05:58:50 +08:00
|
|
|
# Please note: -r8 is necessary for numerical stability ..
|
2005-03-09 02:44:10 +08:00
|
|
|
F90 = pgf90
|
|
|
|
F77 = pgf77
|
|
|
|
CC = pgcc
|
2005-03-16 19:45:27 +08:00
|
|
|
FFLAGS = -fast -r8
|
2005-03-09 02:44:10 +08:00
|
|
|
F90FLAGS = -fast -r8 -I../Modules -I../PW -I../PH
|
|
|
|
CFLAGS = -fast $(CPPFLAGS)
|
|
|
|
|
2003-01-20 05:58:50 +08:00
|
|
|
# this below uses precompiled pgi libraries ( not very efficient but stable )
|
2005-03-09 02:44:10 +08:00
|
|
|
LIBS = -L/usr/local/pgi/linux86/lib/ -llapack -lblas $(FFTW_LIB)
|
|
|
|
|
|
|
|
## For CINECA machines use:
|
|
|
|
# LIBS = -L/usr/local/pgi/linux86/lib/ -llapack -L/cineca/lib/ATLAS \
|
|
|
|
# -lf77blas -latlas $(FFTW_LIB)
|
|
|
|
|
|
|
|
LD = $(F90)
|
|
|
|
LDFLAGS = ../flib/ptools.a ../flib/flib.a ../clib/clib.a $(LIBS) \
|
|
|
|
-I../Modules -I../PW -I../PH
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = ruv
|
|
|
|
RANLIB = echo
|