add SSLDBGLVL build option

This commit is contained in:
Levi Neely 2025-03-13 20:16:47 +01:00
parent 31f573cca1
commit bef07b60b3
2 changed files with 4 additions and 2 deletions

View File

@ -22,14 +22,15 @@ CPPOBJ := $(notdir $(CPPSRC:%.cpp=%.o))
DESTDIR := /usr/local DESTDIR := /usr/local
STATIC := 1 STATIC := 1
BUILD := release BUILD := release
SSLDBGLVL := 0
EXECOUT := pcloudcc EXECOUT := pcloudcc
LIBOUT := libpcloudcc_lib.so LIBOUT := libpcloudcc_lib.so
# Build type specific flags # Build type specific flags
ifeq ($(BUILD), debug) ifeq ($(BUILD), debug)
CFLAGS += -g -O0 -DDEBUG -Wall -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE CFLAGS += -g -O0 -DDEBUG -Wall -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE -DPSYNC_SSL_DEBUG_LEVEL=$(SSLDBGLVL)
CXXFLAGS += -g -O0 -DDEBUG -Wall -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE CXXFLAGS += -g -O0 -DDEBUG -Wall -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE -DPSYNC_SSL_DEBUG_LEVEL=$(SSLDBGLVL)
else ifeq ($(BUILD), release) else ifeq ($(BUILD), release)
CFLAGS += -O2 -DNDEBUG -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE CFLAGS += -O2 -DNDEBUG -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE
CXXFLAGS += -O2 -DNDEBUG -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE CXXFLAGS += -O2 -DNDEBUG -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -D_GNU_SOURCE

View File

@ -32,4 +32,5 @@ make STATIC=0 # dynamically link libpcloudcc_lib.so. (default: 1)
make SCAN=1 # run code analysis; recommend CC=clang and CXX=clang++. (default: 0) make SCAN=1 # run code analysis; recommend CC=clang and CXX=clang++. (default: 0)
make CC=clang CXX=clang++ # use clang instead of gcc (default: gcc,g++) make CC=clang CXX=clang++ # use clang instead of gcc (default: gcc,g++)
make DESTDIR=/prefix # installation prefix (default: /usr/local/bin) make DESTDIR=/prefix # installation prefix (default: /usr/local/bin)
make SSLDBGLVL=0 # mbedtls debug level (range: 0-5, default: 0)
``` ```