commit ab84c44d26cfc615c8608a3a6a1bbd5f046e01d8
parent a77d248c814f8b874e53d0fb59e56c340113f613
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 30 Jun 2023 15:54:57 +0200
Add missing pkg-config flags when compiling tests
The PCFLAGS macro was not used, although it should have been. Therefore,
private dependencies were not properly handled when Polygon was compiled
as a static library. Until now, this error went unnoticed since Polygon
has no private dependencies
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -114,8 +114,8 @@ TEST_OBJ = $(TEST_SRC:.c=.o)
TEST_DEP = $(TEST_SRC:.c=.d)
PKG_CONFIG_LOCAL = PKG_CONFIG_PATH="./:$${PKG_CONFIG_PATH}" $(PKG_CONFIG)
-POLYGON_CFLAGS = $$($(PKG_CONFIG_LOCAL) --cflags polygon-local.pc)
-POLYGON_LIBS = $$($(PKG_CONFIG_LOCAL) --libs polygon-local.pc)
+POLYGON_CFLAGS = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --cflags polygon-local.pc)
+POLYGON_LIBS = $$($(PKG_CONFIG_LOCAL) $(PCFLAGS) --libs polygon-local.pc)
build_tests: build_library $(TEST_DEP) .test
@$(MAKE) -fMakefile -f.test $$(for i in $(TEST_DEP); do echo -f"$${i}"; done) test_bin