]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - Makefile.real
New configure option: --enable-ubsan.
[paraslash.git] / Makefile.real
index c8d30aae7f6d2171e8c45bc037da88512562f92b..e0296b1fe2f1909b785b6a329238e334d456168b 100644 (file)
@@ -20,7 +20,7 @@ uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
 uname_rs := $(shell uname -rs)
 cc_version := $(shell $(CC) --version | head -n 1)
 GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h)
-COPYRIGHT_YEAR := 2018
+COPYRIGHT_YEAR := 2021
 
 ifeq ("$(origin O)", "command line")
        build_dir := $(O)
@@ -112,7 +112,6 @@ CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
 CPPFLAGS += -DLOGLEVELS='$(LOGLEVELS)'
 CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
-CPPFLAGS += -I/usr/local/include
 CPPFLAGS += -I$(lls_suite_dir)
 CPPFLAGS += -I$(yy_build_dir)
 CPPFLAGS += $(lopsub_cppflags)
@@ -130,6 +129,11 @@ STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas
 STRICT_CFLAGS += -Wdeclaration-after-statement
 STRICT_CFLAGS += -Wformat -Wformat-security -Wmissing-format-attribute
 
+ifeq ($(ENABLE_UBSAN), yes)
+       STRICT_CFLAGS += -fsanitize=undefined
+       LDFLAGS += -lubsan
+endif
+
 ifeq ($(uname_s),Linux)
        # these cause warnings on *BSD
        CPPFLAGS += -Wunused-macros
@@ -193,7 +197,7 @@ $(object_dir)/spx%.o: CPPFLAGS += $(speex_cppflags)
 $(object_dir)/flac%.o: CPPFLAGS += $(flac_cppflags)
 
 $(object_dir)/mp3_afh.o: CPPFLAGS += $(id3tag_cppflags)
-$(object_dir)/crypt.o: CPPFLAGS += $(openssl_cppflags)
+$(object_dir)/openssl.o: CPPFLAGS += $(openssl_cppflags)
 $(object_dir)/gcrypt.o: CPPFLAGS += $(gcrypt_cppflags)
 $(object_dir)/ao_write.o: CPPFLAGS += $(ao_cppflags)
 $(object_dir)/alsa%.o: CPPFLAGS += $(alsa_cppflags)