https://github.com/trahay/Generic-Trace-Generator/pull/9

commit d120d572f72923dfca6b8ed66a58788c079f6b63
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Nov 24 00:01:18 2024 +0100

    Add missing dependency
    
    test targets need $(BIN) being created first.
    
    while at it, just factorize the rules.

diff --git a/test/Makefile b/test/Makefile
index 7c0fcbc..70b0d42 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -19,29 +19,8 @@ all	: dir $(TESTS) $(MPI_TESTS)
 dir	:
 		mkdir -p $(BIN)
 
-testAll		: testAll.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testState	: testState.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testState_parall	: testState_parall.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testEvent_parall	: testEvent_parall.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testEvent_mpi	: testEvent_mpi.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testEvent	: testEvent.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testLink	: testLink.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
-
-testVar		: testVar.c
-		$(CC) $^ -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
+%		: %.c dir
+		$(CC) $< -o $(BIN)/$@ $(CFLAGS) $(CPPFLAGS) $(INC) $(LIB)
 
 check   : all
 	for i in $(TESTS) ; do \
