From 6fa5c4085e51aa8438d71b058e06f3c3b389756b Mon Sep 17 00:00:00 2001 From: Patrick Grimm Date: Sun, 30 Jan 2022 01:23:28 +0100 Subject: [PATCH] Fixed uci compile errors (#220) * Fixed UCI=1 compile ld: warning: directory not found for option \-L/usr/local/lib,-luci' Signed-off-by: Patrick Grimm * Fixed bsd compile error ld: unknown option: --gc-sections Signed-off-by: Patrick Grimm * Revert "Fixed bsd compile error ld: unknown option: --gc-sections" This reverts commit e186e396dadb1875018de8b0e738c05b04c8f7d7. * Fixed UCI=1 Undefined symbols "_ucix_init" for bacserv Signed-off-by: Patrick Grimm --- apps/Makefile | 2 +- apps/lib/Makefile | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/Makefile b/apps/Makefile index 6e9032f6..10179897 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -70,7 +70,7 @@ BACNET_PORT ?= linux ifeq (${UCI},1) BACNET_DEFINES += -DBAC_UCI UCI_LIB_DIR ?= /usr/local/lib -BACNET_LIB += -L$(UCI_LIB_DIR),-luci +BACNET_LIB += -L$(UCI_LIB_DIR) -luci endif # OS specific builds ifeq (${BACNET_PORT},linux) diff --git a/apps/lib/Makefile b/apps/lib/Makefile index 713fa062..8278549f 100644 --- a/apps/lib/Makefile +++ b/apps/lib/Makefile @@ -100,6 +100,12 @@ BACNET_BASIC_SRC ?= \ $(BACNET_SRC_DIR)/bacnet/basic/npdu/s_router.c \ $(BACNET_SRC_DIR)/bacnet/basic/tsm/tsm.c +# build in uci integration - use UCI=1 when invoking make +ifeq (${UCI},1) +BACNET_BASIC_SRC += \ + $(wildcard $(BACNET_SRC_DIR)/bacnet/basic/ucix/*.c) +endif + SRCS := $(BACNET_SRC) $(BACNET_BASIC_SRC) $(BACNET_PORT_SRC) OBJS = ${SRCS:.c=.o}