-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
executable file
·108 lines (96 loc) · 3.06 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
SRCS = \
srcs/GF2toolkit_4RussianMult10bit.cc \
srcs/GF2toolkit_4RussianMult11bit.cc \
srcs/GF2toolkit_4RussianMult2bit.cc \
srcs/GF2toolkit_4RussianMult3bit.cc \
srcs/GF2toolkit_4RussianMult4bit.cc \
srcs/GF2toolkit_4RussianMult5bit.cc \
srcs/GF2toolkit_4RussianMult6bit.cc \
srcs/GF2toolkit_4RussianMult7bit.cc \
srcs/GF2toolkit_4RussianMult8bit.cc \
srcs/GF2toolkit_4RussianMult9bit.cc \
srcs/GF2toolkit_4RussianMultClasses.cc \
srcs/GF2toolkit_4RussianMultReduced.cc \
srcs/GF2toolkit_4RussianMultReducedShift.cc \
srcs/GF2toolkit_4RussianTables.cc \
srcs/GF2toolkit_CompactColumn.cc \
srcs/GF2toolkit_InvertBlock.cc \
srcs/GF2toolkit_LU.cc \
srcs/GF2toolkit_LUcompute.cc \
srcs/GF2toolkit_LUcomputeRecurr.cc \
srcs/GF2toolkit_LUextract.cc \
srcs/GF2toolkit_Matrix.cc \
srcs/GF2toolkit_MatrixLinvApply.cc \
srcs/GF2toolkit_MatrixLower.cc \
srcs/GF2toolkit_MatrixMult.cc \
srcs/GF2toolkit_MatrixUinvApply.cc \
srcs/GF2toolkit_Strassen.cc \
srcs/GF2toolkit_m4ri.cc \
srcs/GF2toolkit_popCount.cc \
srcs/Random.cc \
srcs/TimeMeter.cc
OBJS = $(SRCS:.cc=.o)
DEPS = \
srcs/GF2toolkit_4Russian.hh \
srcs/GF2toolkit_4RussianMacros.hh \
srcs/GF2toolkit_InvertBlock.hh \
srcs/GF2toolkit_LU.hh \
srcs/GF2toolkit_Matrix.hh \
srcs/GF2toolkit_MatrixLower.hh \
srcs/GF2toolkit_MatrixMult.hh \
srcs/GF2toolkit_Strassen.hh \
srcs/GF2toolkit_common.hh \
srcs/GF2toolkit_m4ri.hh \
srcs/GF2toolkit_popCounts.hh \
srcs/Random.hh \
srcs/TimeMeter.hh
#
# SELECT COMPILERS AND FLAGS
#
#CC = llvm-gcc
#CXX = llvm-g++
#CC = clang
#CXX = clang++
CC = gcc
CXX = g++
INC = -Isrcs -I/usr/local/include -Isubmodules/m4ri
CFLAGS = -Wall -O2 -funroll-loops -msse3 -msse2 -msse -mmmx -m64 -fPIC
LIBS = -L. -lGF2toolkit submodules/m4ri/.libs/libm4ri.a
#AR = ar rcs
AR = libtool -static -o
all: libGF2toolkit.a
$(CXX) $(CFLAGS) $(INC) -o test_n1 tests/test_n1_BitsOP.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n2 tests/test_n2_PopCount.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n3 tests/test_n3_baseOP.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n4 tests/test_n4_MatrixMatrixMult.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n4b tests/test_n4_testLib.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n5 tests/test_n5_timeMatrixMult.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n6 tests/test_n6_MatrixLower.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n7 tests/test_n7_InvertBlock.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n8 tests/test_n8_timeLinv.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n9 tests/test_n9_LUdecomposition.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o test_n10 tests/test_n10_RankComputationTimeComparison.cc $(LIBS)
$(CXX) $(CFLAGS) $(INC) -o testRankComputation tests/testRankComputation.cc $(LIBS)
run:
./test_n1
./test_n2
./test_n3
./test_n4
./test_n4b
./test_n5
./test_n6
./test_n7
./test_n8
./test_n9
./test_n10
./testRankComputation
srcs/%.o: srcs/%.cc $(DEPS)
$(CXX) $(CFLAGS) $(INC) -c $< -o $@
srcs/%.o: srcs/%.c $(DEPS)
$(CC) $(CFLAGS) $(INC) -c $< -o $@
libGF2toolkit.a: $(OBJS)
$(AR) libGF2toolkit.a $(OBJS)
doc:
doxygen
clean:
rm -f libGF2toolkit.a srcs/*.o test_n*