Allow custom flags (#141)

Signed-off-by: Thomas Rohloff <v10lator@myway.de>
This commit is contained in:
V10lator 2025-03-18 19:55:15 +01:00 committed by GitHub
parent 6994a3cac9
commit bd576e3c5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,10 @@
CC := gcc
CXX := g++
AR := ar
CC := gcc
CXX := g++
AR := ar
DIST_CFLAGS := $(CFLAGS)
DIST_CXXFLAGS := $(CXXFLAGS)
COMMONFLAGS = -fsanitize=address
CFLAGS = -fPIC $(COMMONFLAGS) -I./pclsync -I/usr/include
ifneq (,$(filter clang%,$(CC)))
@ -41,6 +45,11 @@ else
$(error Invalid BUILD. Use 'debug' or 'release')
endif
CFLAGS += $(DIST_CFLAGS)
CXXFLAGS += $(DIST_CXXFLAGS)
LIBLDFLAGS += $(LDFLAGS)
EXECLDFLAGS += $(LDFLAGS)
ifeq ($(SCAN), 1)
CC := scan-build -o scanresults $(CC)
CXX := scan-build -o scanresults $(CXX)