4
1
mirror of https://github.com/pfloos/quack synced 2024-06-26 23:22:20 +02:00
quack/src/IntPak/Makefile

36 lines
802 B
Makefile
Raw Normal View History

2019-02-14 21:19:17 +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
2019-05-08 08:59:26 +02:00
FFLAGS = -Wall -Wno-unused -Wno-unused-dummy-argument -O3
2019-02-14 21:19:17 +01:00
endif
2019-10-30 10:31:05 +01:00
LIBS = ../../lib/*.a
LIBS += -lblas -llapack
2019-02-14 21:19:17 +01:00
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-13 10:10:01 +01:00
$(BDIR)/IntPak: $(OBJ)
2019-02-14 21:19:17 +01:00
$(FC) -o $@ $^ $(FFLAGS) $(LIBS)
debug:
2019-03-13 10:10:01 +01:00
DEBUG=1 make $(BDIR)/IntPak
#DEBUG=1 make clean $(BDIR)/IntPak
2019-02-14 21:19:17 +01:00
clean:
2019-03-13 10:10:01 +01:00
rm -f $(ODIR)/*.o $(BDIR)/IntPak $(BDIR)/debug