include ../../common.mk PROJECTNAME=fcgi 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=\ fastcgiprocess.cpp \ fcgi.cpp \ fcgiid.cpp \ socket.cpp SRC=$(PROGSRC) all: $(PROJECTNAME).so webapp-runner $(PROJECTNAME).so: $(SRC:.cpp=.o) $(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@ webapp-runner: webapp-runner.o fastcgiprocess.o $(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@ %.d: %.cpp $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $< %.o: %.cpp %.d $(CXX) $(CXXFLAGS) -c $< -o $@ # dependencies ADD_DEP=Makefile install: mkdir -p $(DESTDIR)/usr/lib/webserver/plugins cp $(PROJECTNAME).so $(DESTDIR)/usr/lib/webserver/plugins cp webapp-runner $(DESTDIR)/usr/bin # misc --------------------------------------------------- debs: $(DISTROS) clean: -rm -f *.o *.so *.d webapp-runner .PHONY: clean install all -include $(wildcard $(SRC:.cpp=.d))