-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (39 loc) · 1.9 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
CC = g++
CPPFLAGS = -pthread -I./src
LIBS = -lboost_program_options -lboost_system -lyaml-cpp -lcrypt -lcrypto -lcurl -lssl
BINDIR = bin
EVENTFLOW_BINARY = eventflow
EVENTFLOWCTL_BINARY = eventflowctl
OBJECTS = $(BINDIR)/Main.o $(BINDIR)/SystemContext.o $(BINDIR)/AccessList.o $(BINDIR)/Topic.o $(BINDIR)/AuthenticationData.o $(BINDIR)/ClientAuthData.o
CROW = $(BINDIR)/crow_all.h.gch
PUBSINK = $(BINDIR)/publish_to_topic_sink.h.gch
all: release
debug: CPPFLAGS += -g
debug: $(BINDIR) $(BINDIR)/$(EVENTFLOW_BINARY) $(BINDIR)/$(EVENTFLOWCTL_BINARY)
release: CPPFLAGS += -O3
release: $(BINDIR) $(BINDIR)/$(EVENTFLOW_BINARY) $(BINDIR)/$(EVENTFLOWCTL_BINARY)
$(BINDIR)/$(EVENTFLOWCTL_BINARY): src/ClientInfoMgmt.cpp $(BINDIR)/AuthenticationData.o $(BINDIR)/ClientAuthData.o
$(CC) $(CPPFLAGS) src/ClientInfoMgmt.cpp $(BINDIR)/AuthenticationData.o $(BINDIR)/ClientAuthData.o -lboost_program_options -lcrypt -o $@
$(BINDIR)/AuthenticationData.o: src/AuthenticationData.cpp src/AuthenticationData.h
$(CC) -c $(CPPFLAGS) src/AuthenticationData.cpp -o $@
$(BINDIR)/ClientAuthData.o: src/ClientAuthData.cpp src/ClientAuthData.h
$(CC) -c $(CPPFLAGS) src/ClientAuthData.cpp -o $@
$(BINDIR)/$(EVENTFLOW_BINARY): $(OBJECTS)
$(CC) $(CPPFLAGS) $(OBJECTS) $(LIBS) -o $@
$(BINDIR)/Main.o: src/Main.cpp src/SystemContext.h
$(CC) -c $(CPPFLAGS) src/Main.cpp -o $@
$(BINDIR)/SystemContext.o: src/SystemContext.cpp src/SystemContext.h $(CROW)
$(CC) -c $(CPPFLAGS) -I./$(BINDIR) src/SystemContext.cpp -o $@
$(BINDIR)/AccessList.o: src/AccessList.cpp
$(CC) -c $(CPPFLAGS) src/AccessList.cpp -o $@
$(BINDIR)/Topic.o: src/Topic.cpp src/Topic.h src/Client.h
$(CC) -c $(CPPFLAGS) src/Topic.cpp -o $@
$(PUBSINK): src/publish_to_topic_sink.h
$(CC) -w -c $(CPPFLAGS) src/publish_to_topic_sink.h -o $@
$(CROW): src/crow_all.h
$(CC) -w -c $(CPPFLAGS) src/crow_all.h -o $@
$(BINDIR):
mkdir -p $(BINDIR)
.PHONY: clean
clean:
rm -rf $(BINDIR) $(LOGDIR)