From 0e07fa5ac81f039f67077e1ede11cfdf48be236f Mon Sep 17 00:00:00 2001 From: Neels Janosch Hofmeyr Date: Wed, 8 Mar 2023 02:25:18 +0100 Subject: build: fix linking gen__pfcp_ies_auto to use build-tree libosmo-gtlv Resolve some confusion in src/libosmo-pfcp/Makefile.am: It builds - the libosmo-pfcp library. - the gen__pfcp_ies_auto tool to be used at build time. The library has its own LDFLAGS directive, so it does not used the global AM_LDFLAGS. So there is no point to have AM_LDFLAGS, and then additional gen__pfcp_ies_auto__LDADD, just have a gen__pfcp_ies_auto__LDFLAGS. Put the locally built dependency libosmo-gtlv.la first in this LDFLAGS, so that libtool takes it from the build tree, not a system installed lib (if any). Still keep the AM_CFLAGS, needed for #include paths for building libosmo-pfcp objects. However, no vty #includes are used, so drop LIBOSMOVTY_CFLAGS. Related: OS#5942 Change-Id: I2e92238b214d8e79bab1095d6093139bad05bc66 --- src/libosmo-pfcp/Makefile.am | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src') diff --git a/src/libosmo-pfcp/Makefile.am b/src/libosmo-pfcp/Makefile.am index 578ac0b..03e91df 100644 --- a/src/libosmo-pfcp/Makefile.am +++ b/src/libosmo-pfcp/Makefile.am @@ -10,17 +10,9 @@ AM_CFLAGS = \ -Wall \ $(LIBOSMOCORE_CFLAGS) \ $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) -AM_LDFLAGS = \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(LIBOSMOVTY_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(NULL) - lib_LTLIBRARIES = \ libosmo-pfcp.la \ $(NULL) @@ -65,8 +57,7 @@ gen__pfcp_ies_auto_SOURCES = \ gen__pfcp_ies_auto.c \ $(NULL) -gen__pfcp_ies_auto_LDADD = \ +gen__pfcp_ies_auto_LDFLAGS = \ $(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \ $(LIBOSMOCORE_LIBS) \ - $(COVERAGE_LDFLAGS) \ $(NULL) -- cgit v1.2.3