summaryrefslogtreecommitdiffhomepage
path: root/plugins/fcgi
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/fcgi')
-rw-r--r--plugins/fcgi/Makefile68
1 files changed, 11 insertions, 57 deletions
diff --git a/plugins/fcgi/Makefile b/plugins/fcgi/Makefile
index 8937689..d3b8ed1 100644
--- a/plugins/fcgi/Makefile
+++ b/plugins/fcgi/Makefile
@@ -1,34 +1,12 @@
-DISTROS=debian10
-VERSION=$(shell dpkg-parsechangelog --show-field Version)
-PROJECTNAME=fcgi
-
-CXX=clang++-10
-
-ifeq ($(shell which $(CXX)),)
-CXX=clang++
-endif
+include ../../common.mk
-ifeq ($(shell which $(CXX)),)
-CXX=g++-9
-endif
-
-ifeq ($(CXXFLAGS),)
-#CXXFLAGS=-O2 -DNDEBUG
-CXXFLAGS=-O0 -g -D_DEBUG
-endif
-# -fprofile-instr-generate -fcoverage-mapping
-# gcc:--coverage
+PROJECTNAME=fcgi
-CXXFLAGS+= -Wall -I.
+CXXFLAGS+= -fvisibility=hidden -fPIC
-CXXFLAGS+= -pthread -fvisibility=hidden -fPIC
-ifeq ($(CXX),clang++-10)
-CXXFLAGS+=-std=c++20 #-stdlib=libc++
-else
-CXXFLAGS+=-std=c++17
-endif
+CXXFLAGS+= -I../..
-LIBS=\
+LDLIBS=\
-lboost_context \
-lboost_coroutine \
-lboost_program_options \
@@ -40,19 +18,7 @@ LIBS=\
-lssl -lcrypto \
-ldl
-ifeq ($(CXX),clang++-10)
-LIBS+= \
--fuse-ld=lld-10 \
--lstdc++
-#-lc++ \
-#-lc++abi
-#-lc++fs
-#-lstdc++fs
-else
-LIBS+= \
--lstdc++ \
--lstdc++fs
-endif
+LDFLAGS+=-L../../libcommon
PROGSRC=\
fcgi.cpp \
@@ -66,6 +32,9 @@ all: $(PROJECTNAME).so
$(PROJECTNAME).so: $(SRC:.cpp=.o)
$(CXX) $(CXXFLAGS) $^ -shared $(LIBS) -o $@
+../../libcommon/libcommon.a:
+ cd ../.. && $(MAKE) libcommon/libcommon.a
+
%.d: %.cpp
$(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
@@ -81,27 +50,12 @@ install:
cp $(PROJECTNAME).so $(DESTDIR)/usr/lib/webserver/plugins
# misc ---------------------------------------------------
-deb:
- # build binary deb package
- dpkg-buildpackage -us -uc -rfakeroot
-
-deb-src:
- dpkg-source -b .
-
-$(DISTROS): deb-src
- sudo pbuilder build --basetgz /var/cache/pbuilder/$@.tgz --buildresult result/$@ ../webserver_$(VERSION).dsc ; \
debs: $(DISTROS)
clean:
+ -rm -f *.o *.so *.d
-zip: clean
- -rm -f ../$(PROJECTNAME).zip
- zip -r ../$(PROJECTNAME).zip *
- ls -l ../$(PROJECTNAME).zip
-
-
-
-.PHONY: clean all zip install deb deb-src debs all $(DISTROS)
+.PHONY: clean install all
-include $(wildcard $(SRC:.cpp=.d))