mirror of https://gitlab.com/QEF/q-e.git
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
# Makefile for library coupling interface
|
|
include ../../make.inc
|
|
|
|
# FLAGS for OpenMPI when QE was compiled with GNU Fortran 4.x
|
|
MPICXX=mpicxx
|
|
MPICXXFLAGS=-DOMPI_SKIP_MPICXX=1 -O2 -Wall -g
|
|
MPILIBS=-lgfortran -lmpi_mpifh -lmpi
|
|
|
|
# location of required libraries
|
|
PWOBJS = ../src/libqecouple.a ../../PW/src/libpw.a
|
|
CPOBJS = ../src/libqecouple.a ../../CPV/src/libcp.a
|
|
QEMODS=../../KS_Solvers/libks_solvers.a ../../dft-d3/libdftd3qe.a $(BASEMODS)
|
|
|
|
TLDEPS=couple
|
|
|
|
|
|
all : tldeps c2pw.x f2pw.x c2cp.x f2cp.x
|
|
|
|
f2pw.x : f2pw.o $(PWOBJS)
|
|
$(LD) $(LDFLAGS) -o $@ $^ $(QEMODS) $(QELIBS)
|
|
|
|
c2pw.x : c2pw.o $(PWOBJS)
|
|
$(MPICXX) $(LDFLAGS) -o $@ $^ $(MPILIBS) $(QEMODS) $(QELIBS)
|
|
|
|
f2cp.x : f2cp.o $(CPOBJS)
|
|
$(LD) $(LDFLAGS) -o $@ $^ $(QEMODS) $(QELIBS)
|
|
|
|
c2cp.x : c2cp.o $(CPOBJS)
|
|
$(MPICXX) $(LDFLAGS) -o $@ $^ $(MPILIBS) $(QEMODS) $(QELIBS)
|
|
|
|
%.o: %.cpp
|
|
$(MPICXX) -I../include -c $(MPICXXFLAGS) $< -o $@
|
|
|
|
tldeps:
|
|
test -n "$(TLDEPS)" && ( cd ../.. ; $(MAKE) $(MFLAGS) $(TLDEPS) || exit 1) || :
|
|
|
|
clean :
|
|
- /bin/rm -f *.x *.o *.a *~ *.F90 *.d *.mod *.i *.L
|
|
|
|
# explicit dependencies
|
|
|
|
f2pw.o: f2pw.f90
|
|
|
|
c2pw.o: c2pw.cpp ../include/libqecouple.h
|
|
|
|
f2cp.o: f2cp.f90
|
|
|
|
c2cp.o: c2cp.cpp ../include/libqecouple.h
|
|
|
|
# DO NOT DELETE
|