include ../../common.mk PROJECTNAME=statistics CXXFLAGS+= -fvisibility=hidden -fPIC CXXFLAGS+= -I../.. LDLIBS=\ -lcommon \ -lboost_context \ -lboost_coroutine \ -lboost_program_options \ -lboost_system \ -lboost_thread \ -lboost_filesystem \ -lboost_regex \ -lpthread \ -lssl -lcrypto \ -ldl LDFLAGS+=-L../../libcommon PROGSRC=\ statistics.cpp SRC=$(PROGSRC) all: $(PROJECTNAME).so $(PROJECTNAME).so: ../../libcommon/libcommon.a $(SRC:.cpp=.o) $(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@ ../../libcommon/libcommon.a: cd ../.. && $(MAKE) libcommon/libcommon.a %.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))