Makefile: remove redundancies

Cette révision appartient à :
Albert S. 2020-04-07 21:33:26 +02:00
Parent 21eba8ab69
révision b44ca5bd79

Voir le fichier

@ -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)