|
|
@ -9,26 +9,17 @@ LDFLAGS ?= ${LD_DEBUG}
|
|
|
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
|
|
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
|
|
|
## custom FDLAGS to work at build-time.
|
|
|
|
## custom FDLAGS to work at build-time.
|
|
|
|
|
|
|
|
|
|
|
|
# detect proper flag for c++11 support by compilers
|
|
|
|
# detect proper flag for c++17 support by compilers
|
|
|
|
CXXVER := $(shell $(CXX) -dumpversion)
|
|
|
|
CXXVER := $(shell $(CXX) -dumpversion)
|
|
|
|
ifeq ($(shell expr match $(CXX) 'clang'),5)
|
|
|
|
ifeq ($(shell expr match $(CXX) 'clang'),5)
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11
|
|
|
|
NEEDED_CXXFLAGS += -std=c++17
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # gcc >= 4.10
|
|
|
|
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11
|
|
|
|
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "4\.[8-9]"),3) # gcc 4.8 - 4.9
|
|
|
|
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1
|
|
|
|
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "[5-7]"),1) # gcc 5 - 7
|
|
|
|
|
|
|
|
NEEDED_CXXFLAGS += -std=c++11
|
|
|
|
|
|
|
|
LDLIBS = -latomic
|
|
|
|
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "[8-9]"),1) # gcc 8 - 9
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "[8-9]"),1) # gcc 8 - 9
|
|
|
|
NEEDED_CXXFLAGS += -std=c++17
|
|
|
|
NEEDED_CXXFLAGS += -std=c++17
|
|
|
|
LDLIBS = -latomic -lstdc++fs
|
|
|
|
LDLIBS = -lstdc++fs
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "1[0-2]"),2) # gcc 10 - 12
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "1[0-2]"),2) # gcc 10 - 12
|
|
|
|
NEEDED_CXXFLAGS += -std=c++17
|
|
|
|
NEEDED_CXXFLAGS += -std=c++17
|
|
|
|
LDLIBS = -latomic
|
|
|
|
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "1[3-9]"),2) # gcc 13+
|
|
|
|
else ifeq ($(shell expr match ${CXXVER} "1[3-9]"),2) # gcc 13+
|
|
|
|
NEEDED_CXXFLAGS += -std=c++20
|
|
|
|
NEEDED_CXXFLAGS += -std=c++20
|
|
|
|
LDLIBS = -latomic
|
|
|
|
|
|
|
|
else # not supported
|
|
|
|
else # not supported
|
|
|
|
$(error Compiler too old)
|
|
|
|
$(error Compiler too old)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
@ -41,7 +32,6 @@ ifeq ($(USE_STATIC),yes)
|
|
|
|
# the shared libraries from the glibc version used for linking
|
|
|
|
# the shared libraries from the glibc version used for linking
|
|
|
|
LIBDIR := /usr/lib/$(SYS)
|
|
|
|
LIBDIR := /usr/lib/$(SYS)
|
|
|
|
LDLIBS += $(LIBDIR)/libboost_system.a
|
|
|
|
LDLIBS += $(LIBDIR)/libboost_system.a
|
|
|
|
LDLIBS += $(LIBDIR)/libboost_filesystem.a
|
|
|
|
|
|
|
|
LDLIBS += $(LIBDIR)/libboost_program_options.a
|
|
|
|
LDLIBS += $(LIBDIR)/libboost_program_options.a
|
|
|
|
LDLIBS += $(LIBDIR)/libssl.a
|
|
|
|
LDLIBS += $(LIBDIR)/libssl.a
|
|
|
|
LDLIBS += $(LIBDIR)/libcrypto.a
|
|
|
|
LDLIBS += $(LIBDIR)/libcrypto.a
|
|
|
@ -51,7 +41,7 @@ ifeq ($(USE_UPNP),yes)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
LDLIBS += -lpthread -ldl
|
|
|
|
LDLIBS += -lpthread -ldl
|
|
|
|
else
|
|
|
|
else
|
|
|
|
LDLIBS += -lcrypto -lssl -lz -lboost_system -lboost_filesystem -lboost_program_options -lpthread
|
|
|
|
LDLIBS += -lcrypto -lssl -lz -lboost_system -lboost_program_options -lpthread -latomic
|
|
|
|
ifeq ($(USE_UPNP),yes)
|
|
|
|
ifeq ($(USE_UPNP),yes)
|
|
|
|
LDLIBS += -lminiupnpc
|
|
|
|
LDLIBS += -lminiupnpc
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|