#
# Ensure that these libraries are built ONLY when doing a full build,
# AND that they are built and loaded before using the rest of the
-# boilermake framework.
+# boilermake framework, UNLESS we're doing "make clean", in which case
+# don't include the magic libraries.
#
+ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifeq "$(findstring libfreeradius-make,$(MAKECMDGOALS))" ""
_:=$(shell make libfreeradius-make-dlopen.a libfreeradius-make-version.a)
BUILD_DIR:=${top_srcdir}/build
top_builddir:=${top_srcdir}/scripts/build
endif
+endif
#
# Load the huge boilermake framework.
TARGET := libfreeradius-make-dlopen.a
SOURCES := dlopen.c log.c
+#
+# This target is NOT built with static analyzer flags.
+#
+$(TARGET): CFLAGS :=$(filter-out -fsanitize%,$(CFLAGS))
+$(TARGET): LDFLAGS :=$(filter-out -fsanitize%,$(LDFLAGS))
+
#
# If we're building this target, then don't try to use it until we know
# that building the target succeeds.
TARGET := libfreeradius-make-version.a
SOURCES := version.c log.c
+#
+# This target is NOT built with static analyzer flags.
+#
+$(TARGET): CFLAGS :=$(filter-out -fsanitize%,$(CFLAGS))
+$(TARGET): LDFLAGS :=$(filter-out -fsanitize%,$(LDFLAGS))
+
#
# If we're building this target, then don't try to use it until we know
# that building the target succeeds.