10
1
mirror of https://github.com/pfloos/quack synced 2024-12-25 22:03:44 +01:00
QuAcK/src/eDFT/Makefile

46 lines
962 B
Makefile

IDIR =../../include
BDIR =../../bin
ODIR = obj
OODIR = ../IntPak/obj
SDIR =.
FC = gfortran -I$(IDIR)
ifeq ($(DEBUG),1)
FFLAGS = -Wall -g -msse4.2 -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant
else
FFLAGS = -O3
endif
##ifeq ($(PROFIL),1)
## FC += -p -fno-inline
##endif
LIBS = ../../lib/*.a
LIBS += -lblas -llapack -lc++
SRCF90 = $(wildcard *.f90)
SRC = $(wildcard *.F)
OBJ = $(patsubst %.f90,$(ODIR)/%.o,$(SRCF90)) $(patsubst %.F,$(ODIR)/%.o,$(SRC))
$(BDIR)/eDFT: $(OBJ)
$(FC) -o $@ $^ $(FFLAGS) $(LIBS)
numgrid.mod $(ODIR)/numgrid.o: numgrid.f90
$(FC) -c -o $(ODIR)/numgrid.o $< $(FFLAGS)
$(ODIR)/%.o: %.f90 numgrid.mod
$(FC) -c -o $@ $< $(FFLAGS)
$(ODIR)/%.o: %.F numgrid.mod
$(FC) -c -o $@ $< $(FFLAGS)
debug:
DEBUG=1 make $(BDIR)/eDFT
profil:
PROFIL=1 make $(BDIR)/eDFT
clean:
rm -f $(ODIR)/*.o $(BDIR)/eDFT $(BDIR)/debug numgrid.mod