DEBUG_INFOS build flag to keep the debug informations.

This commit is contained in:
Jean-François DEL NERO
2023-11-04 17:18:27 +01:00
parent 42e5902bd5
commit 0e2e2a7853
+12 -4
View File
@@ -9,13 +9,15 @@ INCLUDES = -I$(BASEDIR)/ -I ../../libhxcfe/sources -I ../sources/win32 -I ../../
DEBUG ?= 0
DEBUG_ASAN ?= 0
DEBUG_INFOS ?= 0
ifeq ($(DEBUG), 1)
CFLAGS=-O0 $(INCLUDES) -Wall -g -DDEBUG
LDFLAGS= -shared
CFLAGS = -O0 $(INCLUDES) -Wall -DDEBUG
LDFLAGS = -shared
DEBUG_INFOS = 1
else
CFLAGS=-O3 $(INCLUDES) -Wall
LDFLAGS= -shared -s
CFLAGS = -O3 $(INCLUDES) -Wall
LDFLAGS = -shared
endif
ifeq ($(DEBUG_ASAN), 1)
@@ -23,6 +25,12 @@ ifeq ($(DEBUG_ASAN), 1)
LDFLAGS += -static-libasan -fsanitize=address
endif
ifeq ($(DEBUG_INFOS), 1)
CFLAGS += -g
else
LDFLAGS += -s
endif
EXEC=libusbhxcfe.so
ifeq ($(TARGET), FreeBSD)