From b44ca5bd7941171c63fd6a0fa75ffa9c9582c0f5 Mon Sep 17 00:00:00 2001 From: Albert S Date: Tue, 7 Apr 2020 21:33:26 +0200 Subject: [PATCH] Makefile: remove redundancies --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2880c21..8828037 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CXXFLAGS=-std=c++17 -O0 -g -no-pie -pipe -MMD -Wall -Wextra RELEASE_CXXFLAGS=-std=c++17 -O3 -pipe -MMD -Wall -Wextra LDFLAGS=-lsqlite3 -lpthread -lcrypto -lstdc++fs -lseccomp +INCLUDEFLAGS=-I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -I submodules/qssb.h CXX=g++ @@ -43,7 +44,7 @@ GTEST_OBJECTS=$(filter-out qswiki.o, $(WIKIOBJECTS)) release: CXXFLAGS=$(RELEASE_CXXFLAGS) release: qswiki qswiki: $(WIKIOBJECTS) - $(CXX) $(WIKIOBJECTS) ${LDFLAGS} -I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -o qswiki + $(CXX) $(WIKIOBJECTS) ${LDFLAGS} ${INCLUDEFLAGS} -o qswiki test: $(TESTOBJECTS) $(CXX) $(TESTOBJECTS) ${LDFLAGS} -o test @@ -52,7 +53,7 @@ gtest: $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS) $(CXX) -o gtest $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS) $(GTEST_CXXFLAGS) $(GTEST_DIR)/src/gtest_main.cc $(GTEST_DIR)/src/gtest-all.cc $(GTEST_LDFLAGS) %.o:%.cpp - $(CXX) ${CXXFLAGS} ${LDFLAGS} -I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -c -o $@ $< + $(CXX) ${CXXFLAGS} ${LDFLAGS} ${INCLUDEFLAGS} -c -o $@ $< clean: rm -f $(OBJECTS) $(DEPENDS)