forked from vitillo/yampl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
87 lines (73 loc) · 1.84 KB
/
Makefile.in
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
CXX = @CXX@
CC=@CC@
CXXFLAGS = -O2 -g -Wall -Iinclude -fPIC -Izeromq/include
LDFLAGS = -shared -lpthread -lrt -luuid
SOURCES = $(wildcard src/pipe/*.cpp) \
$(wildcard src/shm/*.cpp) \
$(wildcard src/zeromq/*.cpp) \
$(wildcard src/*.cpp)
OBJECTS = $(SOURCES:.cpp=.o)
DEPS = $(SOURCES:.cpp=.d)
LIBYAMPL = libyampl.so
LIBZMQ = ./zeromq/src/.libs/libzmq.a
EXAMPLES = examples
TESTS = tests
PREFIX = @prefix@
TAGS = tags
all: $(LIBZMQ) $(LIBYAMPL) $(EXAMPLES) $(TESTS) $(TAGS)
$(TAGS):
ctags -R ./
$(LIBZMQ):
+cd zeromq && CXX=${CXX} CC=${CC} ./configure --with-pic && make
-include $(DEPS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -MT $@ -MMD -c $< -o $@
$(LIBYAMPL): $(OBJECTS) $(LIBZMQ)
$(CXX) $(LDFLAGS) $(OBJECTS) $(LIBZMQ) -o $(LIBYAMPL)
.PHONY: $(EXAMPLES)
$(EXAMPLES): $(LIBYAMPL)
+$(MAKE) -C $@
.PHONY: $(TESTS)
$(TESTS): $(LIBYAMPL)
+$(MAKE) -C $@
install: all
mkdir -p $(PREFIX)/{lib/pkgconfig,include}
cp $(LIBYAMPL) $(PREFIX)/lib
cp yampl.pc $(PREFIX)/lib/pkgconfig/
cp -R ./include/yampl $(PREFIX)/include/
uninstall:
rm -rf $(PREFIX)/lib/$(LIBYAMPL)
check:
./examples/benchmarks/benchmark
@echo
./examples/benchmarks/benchmark -y
@echo
./examples/benchmarks/benchmark -y -m 32 -n 128 -s 250000
@echo
./examples/benchmarks/benchmark -i pipe
@echo
./examples/benchmarks/benchmark -i pipe -y
@echo
./examples/benchmarks/benchmark -i pipe -m 32 -n 128 -s 250000
@echo
./examples/benchmarks/benchmark -i shm
@echo
./examples/benchmarks/benchmark -i shm -y
@echo
./examples/benchmarks/benchmark -i shm -m 32 -n 128 -s 250000
@echo
./examples/benchmarks/benchmark -c THREAD
@echo
./examples/benchmarks/benchmark -c DISTRIBUTED
@echo
./tests/size
@echo
./tests/calls
@echo
./tests/dest
.PHONY: clean
clean:
$(MAKE) -C $(EXAMPLES) clean
$(MAKE) -C $(TESTS) clean
$(MAKE) -C zeromq clean
rm -rf $(LIBYAMPL) $(OBJECTS) $(DEPS) tags