Skip to content

Commit

Permalink
Fix _LIB setting logic in downstream RULES_OPCUA
Browse files Browse the repository at this point in the history
- distinguish PROVIDED and SYSTEM cases
- ..._SYS_LIBS_Linux is not used with open62541
  (as Gnu @ Windows needs the same setting)
  • Loading branch information
ralphlange committed Sep 17, 2024
1 parent 03c9e07 commit b5db094
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion devOpcuaSup/UaSdk/RULES_OPCUA
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ _OPCUA_CHECK_VARS := PROD TESTPROD $(PROD) $(TESTPROD) $(LIBRARY)

# $(1) is PROD or LIBRARY name
define _UASDK_ADD_SDKLIBS
ifneq ($(UASDK_DEPLOY_MODE),EMBED)
ifeq ($(UASDK_DEPLOY_MODE),PROVIDED)
$(1)_LIBS := $$($(1)_LIBS) $$(if $$(filter opcua,$$($(1)_LIBS)),$$(UASDK_LIBS))
endif
ifeq ($(UASDK_DEPLOY_MODE),SYSTEM)
$(1)_SYS_LIBS := $$($(1)_SYS_LIBS) $$(if $$(filter opcua,$$($(1)_LIBS)),$$(UASDK_LIBS))
endif
$(1)_SYS_LIBS_Linux := $$($(1)_SYS_LIBS_Linux) $$(if $$(filter opcua,$$($(1)_LIBS)),$$(OPCUA_SYS_LIBS_Linux))
endef

Expand Down
6 changes: 4 additions & 2 deletions devOpcuaSup/open62541/RULES_OPCUA
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ _OPCUA_CHECK_VARS := PROD TESTPROD $(PROD) $(TESTPROD) $(LIBRARY)

# $(1) is PROD or LIBRARY name
define _OPEN62541_ADD_SDKLIBS
ifneq ($(OPEN62541_DEPLOY_MODE),EMBED)
ifeq ($(OPEN62541_DEPLOY_MODE),PROVIDED)
$(1)_LIBS := $$($(1)_LIBS) $$(if $$(filter opcua,$$($(1)_LIBS)),$$(OPEN62541_LIBS))
endif
$(1)_SYS_LIBS_Linux := $$($(1)_SYS_LIBS_Linux) $$(if $$(filter opcua,$$($(1)_LIBS)),$$(OPEN62541_SYS_LIBS_Linux))
ifeq ($(OPEN62541_DEPLOY_MODE),SYSTEM)
$(1)_SYS_LIBS := $$($(1)_SYS_LIBS) $$(if $$(filter opcua,$$($(1)_LIBS)),$$(OPEN62541_LIBS))
endif
endef

$(foreach loc,$(_OPCUA_CHECK_VARS),$(eval $(call _OPEN62541_ADD_SDKLIBS,$(loc))))
Expand Down

0 comments on commit b5db094

Please sign in to comment.