opticsmon: Use $(PKG_CONFIG) instead of calling pkg-config directly

Is more consistent with other Makefiles and fixes cross compilation
if it relies on a modified $(PKG_CONFIG).

Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/193
Signed-off-by: Sertonix <sertonix@posteo.net>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Sertonix
2025-10-28 20:51:19 +01:00
committed by Jan Höppner
parent a49887de1f
commit e8f9244224

View File

@@ -42,17 +42,17 @@ install:
else
ifneq ($(shell sh -c 'command -v pkg-config'),)
LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libnl-3.0)
LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libnl-genl-3.0)
LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libnl-route-3.0)
LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libnl-3.0)
LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libnl-genl-3.0)
LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libnl-route-3.0)
LIB_CFLAGS += $(shell pkg-config --silence-errors --cflags libcrypto)
LIB_CFLAGS += $(shell $(PKG_CONFIG) --silence-errors --cflags libcrypto)
LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libnl-3.0)
LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libnl-genl-3.0)
LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libnl-route-3.0)
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-3.0)
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-genl-3.0)
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libnl-route-3.0)
LIB_LFLAGS += $(shell pkg-config --silence-errors --libs libcrypto)
LIB_LFLAGS += $(shell $(PKG_CONFIG) --silence-errors --libs libcrypto)
else
LIB_CFLAGS += -I /usr/include/libnl3/
LIB_LFLAGS += -lnl-route-3 -lnl-genl-3 -lnl-3