blob: 0621e4b0c3a18b90a968bb31c4ccd548e5b3dc22 (
plain)
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
|
include ../../common.mk
PROJECTNAME=statistics
CXXFLAGS+= -fvisibility=hidden -fPIC
CXXFLAGS+= -I../..
LDLIBS=\
-lreichwein \
-lboost_context \
-lboost_coroutine \
-lboost_program_options \
-lboost_system \
-lboost_thread \
-lboost_filesystem \
-lboost_regex \
-lpthread \
-lssl -lcrypto \
-ldl
PROGSRC=\
statistics.cpp
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
$(PROJECTNAME).so: $(SRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@
%.d: %.cpp
$(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
$(CXX) $(CXXFLAGS) -c $< -o $@
install:
mkdir -p $(DESTDIR)/usr/lib/webserver/plugins
cp $(PROJECTNAME).so $(DESTDIR)/usr/lib/webserver/plugins
# misc ---------------------------------------------------
clean:
-rm -f *.o *.so *.d
.PHONY: clean all install
-include $(wildcard $(SRC:.cpp=.d))
|