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
This commit is contained in:
Neels Hofmeyr 2023-03-08 02:25:18 +01:00
parent fa77802281
commit 0e07fa5ac8
1 changed files with 1 additions and 10 deletions

View File

@ -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)