diff --git a/.gitignore b/.gitignore
index 2eee7623d98382adf1fb85423229d774866f1079..a232684a944c9683dd4ad99e698bb58a593758a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,12 @@ lib/c/liblabcomm2006.a
 lib/c/liblabcomm2013.so.1
 lib/c/liblabcomm2013.so
 lib/c/liblabcomm2013.a
+lib/c/test/test_labcomm
+lib/c/test/test_labcomm_basic_type_encoding
+lib/c/test/test_labcomm_copy
+lib/c/test/test_labcomm_generated_encoding
+lib/c/test/test_labcomm_pthread_scheduler
+lib/c/test/test_signature_numbers
 compiler/AST/
 compiler/labComm.jar
 encoded_data
diff --git a/lib/c/Makefile b/lib/c/Makefile
index 4929b78d238e622c066f794f869f6f8bd0ae7edd..4d86f35cb7cf15caa7aa046f78699cf1adc4b41d 100644
--- a/lib/c/Makefile
+++ b/lib/c/Makefile
@@ -167,8 +167,9 @@ clean:
 	$(RM) test/test_labcomm_errors
 	$(RM) test/testdata/gen/*.[cho]
 	$(RM) test/gen/*.[cho]
-	$(RM) $(TEST_DIR)/test_labcomm
-	$(RM) $(TEST_DIR)/test_labcomm_copy
+	for x in $(TESTS); do \
+		$(RM) $(TEST_DIR)/$$x ; \
+	done
 
 distclean: clean
 	$(RM) liblabcomm.so.1