-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
35 lines (25 loc) · 784 Bytes
/
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
CXX := g++
CC := g++
CXXFLAGS += -I $(CPPA_PATH) -I. -std=c++11 -g -pthread -MMD -coverage \
-DCPPA_DISABLE_CONTEXT_SWITCHING
LDFLAGS += -L $(CPPA_PATH)/build/lib -lcppa -pthread --coverage
-include *.d
-include tests/*.d
# SRCS := main raft state_machine
# OBJS := $(addsuffix .o,$(SRCS))
# cppa-raft: $(OBJS)
# $(OBS): %.o: %.cpp
TESTS := follower
TEST_PROGS := $(addprefix tests/test_,$(TESTS))
.PHONY: clean
clean:
-rm *.o tests/*.o
-rm cppa-raft $(TEST_PROGS)
.PHONY: tests check
tests: $(TEST_PROGS)
tests: LDFLAGS += -lgtest -lgtest_main
check: tests
$(foreach test,$(TEST_PROGS), \
echo $(test); LD_LIBRARY_PATH=$$CPPA_PATH/build/lib $(test);)
$(TEST_PROGS): tests/%: tests/%.o raft.o
tests/test_main.o $(addsuffix .o,$(TEST_PROGS)): tests/%.o: tests/%.cpp