2019-03-13 11:07:31 +01:00
|
|
|
IDIR =../../include
|
|
|
|
BDIR =../../bin
|
|
|
|
ODIR = 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 = -Wall -Wno-unused -Wno-unused-dummy-argument -O2
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBS = ~/Dropbox/quack/lib/*.a
|
|
|
|
#LIBS = -lblas -llapack
|
|
|
|
|
|
|
|
SRCF90 = $(wildcard *.f90)
|
|
|
|
|
|
|
|
SRC = $(wildcard *.f)
|
|
|
|
|
|
|
|
OBJ = $(patsubst %.f90,$(ODIR)/%.o,$(SRCF90)) $(patsubst %.f,$(ODIR)/%.o,$(SRC))
|
|
|
|
|
|
|
|
$(ODIR)/%.o: %.f90
|
|
|
|
$(FC) -c -o $@ $< $(FFLAGS)
|
|
|
|
|
|
|
|
$(ODIR)/%.o: %.f
|
|
|
|
$(FC) -c -o $@ $< $(FFLAGS)
|
|
|
|
|
2019-03-19 11:33:49 +01:00
|
|
|
$(BDIR)/eDFT: $(OBJ)
|
2019-03-13 11:07:31 +01:00
|
|
|
$(FC) -o $@ $^ $(FFLAGS) $(LIBS)
|
|
|
|
|
|
|
|
debug:
|
2019-03-19 11:33:49 +01:00
|
|
|
DEBUG=1 make $(BDIR)/eDFT
|
|
|
|
#DEBUG=1 make clean $(BDIR)/eDFT
|
2019-03-13 11:07:31 +01:00
|
|
|
|
|
|
|
clean:
|
2019-03-19 11:33:49 +01:00
|
|
|
rm -f $(ODIR)/*.o $(BDIR)/eDFT $(BDIR)/debug
|