Description: Add CPPFLAGS, CXXFLAGS and LDFLAGS to the test build
Author: Andreas Tille <tille@debian.org>
Last-Update: 2026-10-25

diff --git a/tests/Makefile b/tests/Makefile
index a78c962..8611fab 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -68,10 +68,10 @@ PROGRAMS=test_utils test_gbwtgraph test_cached_gbwtgraph test_gfa test_gbz test_
 all:$(PROGRAMS)
 
 %.o:%.cpp $(HEADERS)
-	$(MY_CXX) $(CXX_FLAGS) -c $<
+	$(MY_CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXX_FLAGS) -c $<
 
 $(PROGRAMS):%:%.o $(LIBRARY)
-	$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
+	$(MY_CXX) $(LDFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
 
 test:$(PROGRAMS)
 	$(foreach PROG,$(PROGRAMS),./$(PROG) || exit 1;)
