-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
93 lines (69 loc) · 1.97 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
ifdef LONG
INTT = -DLONG
endif
CC = g++
CFLAGS = -O2 $(INTT)
LFLAGS =
ifdef OPENMP
PCC = $(CC)
CFLAGS = -fopenmp -O2 -DOPENMP $(INTT)
LFLAGS = -fopenmp
else ifdef CILK
# we should never use old cilk++
# PCC = cilk++
# CFLAGS = -O2 -DCILK -Wno-cilk-for $(INTT)
PCC = $(CC)
CFLAGS = -O2 -fcilkplus -lcilkrts -DCILK
LFLAGS = -O2 -fcilkplus -lcilkrts -DCILK
else ifdef CILKP
PCC = icpc
CFLAGS = -O2 -DCILKP $(INTT)
else
PCC = $(CC)
#CFLAGS = $(INTT)
#CFLAGS = -g
endif
BASIC = parallel.h utils.h
SEQUENCE = sequence.h seq.h $(BASIC)
INTSORT = intSort.h transpose.h
STRINGGEN = $(ITEMGEN) stringGen.h
all: plz77_1 lz77_1 lz77_2 lz77_3
.PHONY: clean
clean:
rm -rf plz77_? lz77_? *~ *.o *.exe suffixArray
ANSV.o: ANSV.cpp ANSV.h
$(PCC) $(CFLAGS) -c $<
rangeMin.o: rangeMin.cpp rangeMin.h
$(PCC) $(CFLAGS) -c $<
suffixArray.o: suffixArray.cpp suffixArray.h merge.h PSRS.h $(INTSORT) $(SEQUENCE)
$(PCC) $(CFLAGS) -c $<
mergeSuffixArrayToTree.o: mergeSuffixArrayToTree.cpp suffixTree.h
$(PCC) $(CFLAGS) -c $<
segmentTree.o: segmentTree.cpp segmentTree.h
$(PCC) $(CFLAGS) -c $<
LZ77_1.o: LZ77_1.cpp test.h
$(PCC) $(CFLAGS) -c $<
lz77_1: LZ77_1.o suffixArray.o rangeMin.o ANSV.o
$(PCC) $(LFLAGS) -o $@ $^
LZ77_2.o: LZ77_2.cpp test.h
$(PCC) $(CFLAGS) -c $<
lz77_2: LZ77_2.o suffixArray.o rangeMin.o
$(PCC) $(LFLAGS) -o $@ $^
LZ77_3.o: LZ77_3.cpp test.h
$(PCC) $(CFLAGS) -c $<
lz77_3: LZ77_3.o rangeMin.o suffixArray.o
$(PCC) $(LFLAGS) -o $@ $^
LPF_LZ.o: LPF_LZ.cpp
$(PCC) $(CFLAGS) -c $<
PLZ77_1.o: PLZ77_1.cpp test.h transpose.h intSort.h sequence.h
$(PCC) $(CFLAGS) -c $<
plz77_1: PLZ77_1.o ANSV.o rangeMin.o suffixArray.o segmentTree.o LPF_LZ.o
$(PCC) $(LFLAGS) -o $@ $^
# PLZ77_2.o: PLZ77_2.cpp test.h
# $(PCC) $(CFLAGS) -c $<
# plz77_2: PLZ77_2.o rangeMin.o suffixArray.o mergeSuffixArrayToTree.o
# $(PCC) $(CFLAGS) -o $@ $^
PLZ77_3.o: PLZ77_3.cpp test.h
$(PCC) $(CFLAGS) -c $<
plz77_3: PLZ77_3.o rangeMin.o suffixArray.o mergeSuffixArrayToTree.o LPF_LZ.o
$(PCC) $(LFLAGS) -o $@ $^