Support GCC 8.x and support static compile

This commit is contained in:
Nick Peng
2019-06-16 17:17:48 +08:00
parent a09e63d333
commit 3ef325d75d
15 changed files with 124 additions and 64 deletions

View File

@@ -7,7 +7,11 @@ CFLAGS +=-Iinclude
CFLAGS += -DBASE_FILE_NAME=\"$(notdir $<)\"
CXXFLAGS=-O2 -g -Wall -std=c++11
CXXFLAGS +=-Iinclude
LDFLAGS += -lpthread -lssl -lcrypto
ifeq ($(STATIC), yes)
LDFLAGS += -lssl -lcrypto -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -ldl -static
else
LDFLAGS += -lssl -lcrypto -lpthread
endif
.PHONY: all