summaryrefslogtreecommitdiffhomepage
path: root/plugins
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-16 13:28:52 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-16 13:28:52 +0200
commit6b2a9dabbfad4d64268967a32dff0f1dc55763de (patch)
treeb3a1f68d8b44090b98ac3bdcf1c8423ebc08c846 /plugins
parent83b25165218281c2a2e98b5e72a0375a7e6a71ca (diff)
Makefile cleanup, included missing files
Diffstat (limited to 'plugins')
-rw-r--r--plugins/cgi/Makefile23
-rw-r--r--plugins/fcgi/Makefile23
-rw-r--r--plugins/redirect/Makefile27
-rw-r--r--plugins/static-files/Makefile23
-rw-r--r--plugins/statistics/Makefile27
-rw-r--r--plugins/webbox/Makefile27
-rw-r--r--plugins/weblog/Makefile20
7 files changed, 19 insertions, 151 deletions
diff --git a/plugins/cgi/Makefile b/plugins/cgi/Makefile
index a4fdb15..2d86c50 100644
--- a/plugins/cgi/Makefile
+++ b/plugins/cgi/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lcommon \
-lboost_context \
@@ -62,33 +60,18 @@ LDFLAGS=-L../../libcommon
PROGSRC=\
cgi.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: ../../libcommon/libcommon.a $(SRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
# dependencies
@@ -112,8 +95,6 @@ $(DISTROS): deb-src
debs: $(DISTROS)
clean:
- -rm -f test-$(PROJECTNAME) $(PROJECTNAME)
- -find . -name '*.o' -o -name '*.so' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
zip: clean
-rm -f ../$(PROJECTNAME).zip
diff --git a/plugins/fcgi/Makefile b/plugins/fcgi/Makefile
index 0cafe54..8937689 100644
--- a/plugins/fcgi/Makefile
+++ b/plugins/fcgi/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lboost_context \
-lboost_coroutine \
@@ -61,33 +59,18 @@ PROGSRC=\
fcgiid.cpp \
socket.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: $(SRC:.cpp=.o)
$(CXX) $(CXXFLAGS) $^ -shared $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
# dependencies
@@ -111,8 +94,6 @@ $(DISTROS): deb-src
debs: $(DISTROS)
clean:
- -rm -f test-$(PROJECTNAME) $(PROJECTNAME)
- -find . -name '*.o' -o -name '*.so' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
zip: clean
-rm -f ../$(PROJECTNAME).zip
diff --git a/plugins/redirect/Makefile b/plugins/redirect/Makefile
index 99aedb1..77b496b 100644
--- a/plugins/redirect/Makefile
+++ b/plugins/redirect/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lboost_context \
-lboost_coroutine \
@@ -59,37 +57,18 @@ endif
PROGSRC=\
redirect.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: $(SRC:.cpp=.o)
$(CXX) $(CXXFLAGS) $^ -shared $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-# dependencies
-
-ADD_DEP=Makefile
+ $(CXX) $(CXXFLAGS) -c $< -o $@
install:
mkdir -p $(DESTDIR)/usr/lib/webserver/plugins
@@ -109,7 +88,7 @@ $(DISTROS): deb-src
debs: $(DISTROS)
clean:
- -rm -f test-$(PROJECTNAME) $(PROJECTNAME)
+ -rm -f $(PROJECTNAME)
-find . -name '*.o' -o -name '*.so' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
zip: clean
diff --git a/plugins/static-files/Makefile b/plugins/static-files/Makefile
index 14c6c17..9834e96 100644
--- a/plugins/static-files/Makefile
+++ b/plugins/static-files/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lcommon \
-lboost_context \
@@ -62,33 +60,18 @@ LDFLAGS=-L../../libcommon
PROGSRC=\
static-files.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: ../../libcommon/libcommon.a $(SRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
# dependencies
@@ -112,7 +95,7 @@ $(DISTROS): deb-src
debs: $(DISTROS)
clean:
- -rm -f test-$(PROJECTNAME) $(PROJECTNAME)
+ -rm -f $(PROJECTNAME)
-find . -name '*.o' -o -name '*.so' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
zip: clean
diff --git a/plugins/statistics/Makefile b/plugins/statistics/Makefile
index 3dee26e..2a0d246 100644
--- a/plugins/statistics/Makefile
+++ b/plugins/statistics/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lboost_context \
-lboost_coroutine \
@@ -59,37 +57,18 @@ endif
PROGSRC=\
statistics.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: $(SRC:.cpp=.o)
$(CXX) $(CXXFLAGS) $^ -shared $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-# dependencies
-
-ADD_DEP=Makefile
+ $(CXX) $(CXXFLAGS) -c $< -o $@
install:
mkdir -p $(DESTDIR)/usr/lib/webserver/plugins
@@ -109,7 +88,7 @@ $(DISTROS): deb-src
debs: $(DISTROS)
clean:
- -rm -f test-$(PROJECTNAME) $(PROJECTNAME)
+ -rm -f $(PROJECTNAME)
-find . -name '*.o' -o -name '*.so' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
zip: clean
diff --git a/plugins/webbox/Makefile b/plugins/webbox/Makefile
index 34f253b..861b5d4 100644
--- a/plugins/webbox/Makefile
+++ b/plugins/webbox/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lcommon \
-lboost_context \
@@ -62,37 +60,18 @@ LDFLAGS+=-L../../libcommon
PROGSRC=\
webbox.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: ../../libcommon/libcommon.a $(SRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
-
-# dependencies
-
-ADD_DEP=Makefile
+ $(CXX) $(CXXFLAGS) -c $< -o $@
install:
mkdir -p $(DESTDIR)/usr/lib/webserver/plugins
@@ -120,7 +99,7 @@ $(DISTROS): deb-src
debs: $(DISTROS)
clean:
- -rm -f test-$(PROJECTNAME) $(PROJECTNAME)
+ -rm -f $(PROJECTNAME)
-find . -name '*.o' -o -name '*.so' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
zip: clean
diff --git a/plugins/weblog/Makefile b/plugins/weblog/Makefile
index 466ddbd..a21b464 100644
--- a/plugins/weblog/Makefile
+++ b/plugins/weblog/Makefile
@@ -28,8 +28,6 @@ else
CXXFLAGS+=-std=c++17
endif
-CXXTESTFLAGS=-Igoogletest/include -Igooglemock/include/ -Igoogletest -Igooglemock
-
LIBS=\
-lcommon \
-lboost_context \
@@ -62,33 +60,21 @@ LDFLAGS=-L../../libcommon
PROGSRC=\
weblog.cpp
-TESTSRC=\
- test-webserver.cpp \
- googlemock/src/gmock-all.cpp \
- googletest/src/gtest-all.cpp \
- $(PROGSRC)
-
SRC=$(PROGSRC)
all: $(PROJECTNAME).so
-# testsuite ----------------------------------------------
-test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
- $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
-
$(PROJECTNAME).so: ../../libcommon/libcommon.a $(SRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ -shared $(LDLIBS) $(LIBS) -o $@
-dep: $(TESTSRC:.cpp=.d)
-
%.d: %.cpp
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -MM -MP -MF $@ -c $<
+ $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -c $<
%.o: %.cpp %.d
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
googletest/src/%.o: googletest/src/%.cc
- $(CXX) $(CXXFLAGS) $(CXXTESTFLAGS) -c $< -o $@
+ $(CXX) $(CXXFLAGS) -c $< -o $@
# dependencies