-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
77 lines (53 loc) · 1.87 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
.POSIX:
.SUFFIXES:
.SUFFIXES: .o .cpp
CXX = g++
CXXFLAGS = -std=c++11
LDLIBS = -lpthread
.cpp.o:
$(CXX) $(CXXFLAGS) -c $<
BIN = test-2 test-3 test-5 interfaz test-ejs
OBJ = ConcurrentHashMap.o
#ConcurrentHashMap.o: ConcurrentHashMap.hpp
all: $(BIN)
$(BIN): ListaAtomica.hpp
test-ejs: $(OBJ) test-ejs.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ test-ejs.cpp $(OBJ) $(LDLIBS)
test-1: $(OBJ) test-1.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ test-1.cpp $(OBJ) $(LDLIBS)
test-1-run: test-1
awk -f corpus.awk corpus | sort >corpus-post
./test-1 | sort | diff -u - corpus-post
rm -f corpus-post
test-2: $(OBJ) test-2.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ test-2.cpp $(OBJ) $(LDLIBS)
test-2-run: test-2
awk -f corpus.awk corpus | sort >corpus-post
./test-2 | sort | diff -u - corpus-post
rm -f corpus-post
test-3: $(OBJ) test-3.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ test-3.cpp $(OBJ) $(LDLIBS)
test-3-run: test-3
awk -f corpus.awk corpus | sort >corpus-post
for i in 0 1 2 3 4; do sed -n "$$((i * 500 + 1)),$$(((i + 1) * 500))p" corpus >corpus-"$$i"; done
for i in 0 1 2 3 4; do ./test-3 $$((i + 1)) | sort | diff -u - corpus-post; done
rm -f corpus-post corpus-[0-4]
test-5: $(OBJ) test-5.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ test-5.cpp $(OBJ) $(LDLIBS)
test-5-run: test-5
awk -f corpus.awk corpus | sort -nk 2 | tail -n 1 >corpus-max
cat corpus-max
for i in 0 1 2 3 4; do sed -n "$$((i * 500 + 1)),$$(((i + 1) * 500))p" corpus >corpus-"$$i"; done
for i in 0 1 2 3 4; do for j in 0 1 2 3 4; do \
./test-5 $$((i + 1)) $$((j + 1)) | diff -u - corpus-max; \
done; done
rm -f corpus-max corpus-[0-4]
interfaz: $(OBJ) interfaz.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ interfaz.cpp $(OBJ) $(LDLIBS)
interfaz-run: interfaz
awk -f corpus.awk corpus | sort >corpus-post
./interfaz | sort | diff -u - corpus-post
rm -f corpus-post
clean:
rm -f $(BIN) $(OBJ)
rm -f corpus-*