Makefile: remove redundancies

This commit is contained in:
Albert S. 2020-04-07 21:33:26 +02:00
부모 c507c200a6
커밋 f73dd3b295

파일 보기

@ -3,6 +3,7 @@
CXXFLAGS=-std=c++17 -O0 -g -no-pie -pipe -MMD -Wall -Wextra CXXFLAGS=-std=c++17 -O0 -g -no-pie -pipe -MMD -Wall -Wextra
RELEASE_CXXFLAGS=-std=c++17 -O3 -pipe -MMD -Wall -Wextra RELEASE_CXXFLAGS=-std=c++17 -O3 -pipe -MMD -Wall -Wextra
LDFLAGS=-lsqlite3 -lpthread -lcrypto -lstdc++fs -lseccomp LDFLAGS=-lsqlite3 -lpthread -lcrypto -lstdc++fs -lseccomp
INCLUDEFLAGS=-I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -I submodules/qssb.h
CXX=g++ CXX=g++
@ -43,7 +44,7 @@ GTEST_OBJECTS=$(filter-out qswiki.o, $(WIKIOBJECTS))
release: CXXFLAGS=$(RELEASE_CXXFLAGS) release: CXXFLAGS=$(RELEASE_CXXFLAGS)
release: qswiki release: qswiki
qswiki: $(WIKIOBJECTS) qswiki: $(WIKIOBJECTS)
$(CXX) $(WIKIOBJECTS) ${LDFLAGS} -I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -o qswiki $(CXX) $(WIKIOBJECTS) ${LDFLAGS} ${INCLUDEFLAGS} -o qswiki
test: $(TESTOBJECTS) test: $(TESTOBJECTS)
$(CXX) $(TESTOBJECTS) ${LDFLAGS} -o test $(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) $(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 %.o:%.cpp
$(CXX) ${CXXFLAGS} ${LDFLAGS} -I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -c -o $@ $< $(CXX) ${CXXFLAGS} ${LDFLAGS} ${INCLUDEFLAGS} -c -o $@ $<
clean: clean:
rm -f $(OBJECTS) $(DEPENDS) rm -f $(OBJECTS) $(DEPENDS)