4
1
mirror of https://github.com/pfloos/quack synced 2024-06-23 21:52:20 +02:00
quack/src/utils/Makefile

38 lines
798 B
Makefile
Raw Normal View History

2019-03-31 22:28:59 +02:00
IDIR =../../include
BDIR =../../bin
LDIR =../../lib
ODIR = obj
OODIR = ../IntPak/obj
SDIR =.
FC = gfortran -I$(IDIR)
2019-07-09 16:17:10 +02:00
AR = libtool
2019-03-31 22:28:59 +02: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-05-07 22:55:36 +02:00
FFLAGS = -Wall -Wno-unused -Wno-unused-dummy-argument -O3
2019-03-31 22:28:59 +02:00
endif
LIBS = ../../lib/*.a
2019-10-30 10:31:05 +01:00
LIBS += -lblas -llapack
2019-03-31 22:28:59 +02: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)
$(LDIR)/utils.a: $(OBJ)
2019-07-09 16:17:10 +02:00
$(AR) -static -o $@ $^
2019-03-31 22:28:59 +02:00
debug:
DEBUG=1 make $(LDIR)/utils.a
clean:
rm -f $(ODIR)/*.o $(LDIR)/utils.a