makefile 2.66 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## ============================================================
## INTEL COMPILERS
## ============================================================
#
#CC = mpicc
#CFLAGS = -Wall -g -openmp -I.  -I${MKLROOT}/include
#CFLAGS = -Wall -openmp -I. -I${MKLROOT}/include
#CLFLAGS = -Wall -fopenmp -I. -I${MKLROOT}/include
#
#CLINKER = mpicc
#FLINKER = mpif77
#LDFLAGS = -openmp
#LIBLIST = -L. -lhbio -lclock -lsparsenew -lvector -lm -lc
#LIBLIST = -L. -lhbio -lclock -lvector -lm -lc
#LIBLIST = -L. -lhbio -lclock -lm -lc
#LIBLIST = -L. -lsparse -lvector -lclock -lm -lc
#
##LIBMKL = -L$(MKLROOT)/lib/intel64 $(MKL_FMULTIS_INTEL)
#LIBMKL = -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread

# ============================================================
# GNU COMPILERS
# ============================================================
24
25
26
27
DIR = /home/martini/mam_bicgstab
APP = malleability/build
MAMFLAGS = -I$(DIR)/malleability -L$(DIR)/$(APP) -lmam
#-Wl,-rpath=$(DIR)/$(APP) 
28

29
CC = mpicc
30
CFLAGS = -std=c++11 -mavx -fabi-version=0 -Wall -fopenmp -I. -I${MKLROOT}/include -I${HOME}/libs
31
#CFLAGS = -std=c++11 -Wall -fopenmp -I. -I${MKLROOT}/include -I${HOME}/libs
32
CLFLAGS = -Wall -fopenmp -I. -I${MKLROOT}/include
33
CFLAGS = -Wall -fopenmp -I. -I${HOME}/libs #ADDED BY IKER
34
35
36
37
38
39
40
41
42

CLINKER = mpicxx
LDFLAGS = -fopenmp
LIBLIST = -L. -lhbio -lclock -lsparsenew -lvector -lm -lc
LIBLIST = -L. -lhbio -lclock -lvector -lm -lc
LIBLIST = -L. -lhbio -lclock -lm -lc
LIBLIST = -L. -lsparse -lvector -lclock -lm -lc

LIBMKL = -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread
43
LIBMKL = 
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

# ============================================================

AR = ar
ARFLAGS = ru

RL = ranlib

# ============================================================

OBJS_CLOCK  = reloj.o 
OBJS_VECTOR = ScalarVectors.o
OBJS_SPARSE = hb_io.o SparseProduct.o

OBJS = $(OBJS_CLOCK) $(OBJS_VECTOR) $(OBJS_SPARSE) 

# ============================================================

default: libclock.a libvector.a libsparse.a BiCGStab 

libshared.a : $(OBJS)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

libclock.a : $(OBJS_CLOCK)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

libvector.a : $(OBJS_VECTOR)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

libsparse.a : $(OBJS_SPARSE)
	$(AR) $(ARFLAGS) $@ $?
	$(RL) $(RLFLAGS) $@

80
81
BiCGStab: BiCGStab.o ToolsMPI.o ToolsMAM.o matrix.o mymkl.o
	$(CLINKER) $(LDFLAGS) -o BiCGStab BiCGStab.o ToolsMPI.o ToolsMAM.o matrix.o mymkl.o $(LIBMKL) $(LIBLIST) $(MAMFLAGS) 
82
83
84
85
86

# ============================================================

.c.o:
	echo compiling
87
	$(CC) $(CFLAGS) -c $*.c 
88
89
90
91
92

clean:
	rm -f *.o *.a BiCGStab 

# ============================================================