From f268b30d92b2cf640ddf76ee8b97e94f12e756fd Mon Sep 17 00:00:00 2001 From: "Deomid \"rojer\" Ryabkov" Date: Tue, 21 Jan 2020 14:58:02 +0000 Subject: [PATCH] Fix Ubuntu builds without ASAN Avahi doesn't build statically --- platforms/ubuntu/Makefile.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platforms/ubuntu/Makefile.build b/platforms/ubuntu/Makefile.build index fa2053ae5..383181c07 100644 --- a/platforms/ubuntu/Makefile.build +++ b/platforms/ubuntu/Makefile.build @@ -66,14 +66,17 @@ CC = clang CXX = clang++ C_CXX_FLAGS += -fsanitize=address -fno-omit-frame-pointer LDFLAGS += -fsanitize=address +endif + +ifdef MGOS_HAVE_DNS_SD +LDFLAGS += -lavahi-client -lavahi-common -lstdc++ else LDFLAGS += -static endif CFLAGS = -std=gnu99 $(C_CXX_FLAGS) $(APP_CFLAGS) CXXFLAGS = -std=gnu++11 -fno-exceptions $(C_CXX_FLAGS) $(APP_CXXFLAGS) -# TODO: Extra libs such as Avahi should be provided via external var. -LDFLAGS += -lavahi-client -lavahi-common -lstdc++ +LDFLAGS += -lstdc++ INCDIRS = $(addprefix -I,$(INCLUDES)) AR ?= ar