forked from airaudofacundo/SparseKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 885 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Makefile
COMPILER := ifort
VPATH := $(PWD)/Source
BINDIR := $(PWD)/Bin
LIBDIR := $(PWD)/SparseLibrary-v1.0
LIBOBJECTDIR := /usr/include/mkl/
LIBRARIES := $(LIBDIR)/sparseLib.a
OBJECTDIR := $(LIBDIR)/Objects/
FFLAGS := -Ofast -qopenmp -free -qmkl=parallel -liomp5 -lpthread -ldl -module $(OBJECTDIR) -I$(LIBOBJECTDIR)
FFLAGSDebug := -g -Wall -static -fcheck=all -J$(OBJECTDIR)
OBJECTS := $(BINDIR)/Debugger.o $(BINDIR)/Utilities.o $(BINDIR)/Quicksort.o $(BINDIR)/SparseKit.o
main: $(OBJECTS)
ar rcv $(LIBDIR)/sparseLib.a $(OBJECTS)
test: $(OBJECTS)
$(COMPILER) $(FFLAGS) $^ -L$(LIBDIR) $(LIBRARIES) main.f90 -o main
debug: $(OBJECTS)
$(COMPILER) $(FFLAGSDebug) $(OBJECTS) -o main
$(BINDIR)/%.o : $(VPATH)/%.f90
$(COMPILER) $(FFLAGS) -c $^ -o $@
$(LIBDIR)/%.a : $(BINDIR)/%.o
ar rcv $^
clean:
rm -f $(BINDIR)/*.o $(OBJECTDIR)/*.mod main $(LIBDIR)/*.a