4
1
mirror of https://github.com/pfloos/quack synced 2024-11-07 22:53:59 +01:00
quack/src/eDFT/Makefile

46 lines
962 B
Makefile
Raw Normal View History

2019-03-13 11:07:31 +01:00
IDIR =../../include
BDIR =../../bin
ODIR = obj
2019-07-09 16:17:10 +02:00
OODIR = ../IntPak/obj
2019-03-13 11:07:31 +01:00
SDIR =.
2020-04-06 19:40:42 +02:00
FC = gfortran -I$(IDIR)
2019-03-13 11:07:31 +01:00
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
2019-07-09 16:17:10 +02:00
FFLAGS = -O3
endif
2020-03-27 09:04:56 +01:00
##ifeq ($(PROFIL),1)
## FC += -p -fno-inline
##endif
2019-03-13 11:07:31 +01:00
2020-03-27 09:04:56 +01:00
LIBS = ../../lib/*.a
LIBS += -lblas -llapack -lc++
2019-03-13 11:07:31 +01:00
SRCF90 = $(wildcard *.f90)
2020-03-14 23:00:44 +01:00
SRC = $(wildcard *.F)
2019-03-13 11:07:31 +01:00
2020-03-14 23:00:44 +01:00
OBJ = $(patsubst %.f90,$(ODIR)/%.o,$(SRCF90)) $(patsubst %.F,$(ODIR)/%.o,$(SRC))
2019-03-13 11:07:31 +01:00
2020-03-21 16:31:39 +01:00
$(BDIR)/eDFT: $(OBJ)
$(FC) -o $@ $^ $(FFLAGS) $(LIBS)
2020-03-27 10:14:38 +01:00
numgrid.mod $(ODIR)/numgrid.o: numgrid.f90
$(FC) -c -o $(ODIR)/numgrid.o $< $(FFLAGS)
2019-03-13 11:07:31 +01:00
2020-03-21 16:31:39 +01:00
$(ODIR)/%.o: %.f90 numgrid.mod
2019-03-13 11:07:31 +01:00
$(FC) -c -o $@ $< $(FFLAGS)
2020-03-21 16:31:39 +01:00
$(ODIR)/%.o: %.F numgrid.mod
$(FC) -c -o $@ $< $(FFLAGS)
2019-03-13 11:07:31 +01:00
debug:
2019-03-19 11:33:49 +01:00
DEBUG=1 make $(BDIR)/eDFT
2019-07-09 16:17:10 +02:00
profil:
PROFIL=1 make $(BDIR)/eDFT
2019-03-13 11:07:31 +01:00
clean:
2020-03-21 16:31:39 +01:00
rm -f $(ODIR)/*.o $(BDIR)/eDFT $(BDIR)/debug numgrid.mod