test: add mtd/ubi test helpers
I used these to develop the mtd/ubi ioctl decoders.
* test/.gitignore: Add mtd/ubi.
* test/Makefile: Declare all tests in a PROGS var.
Declare build targets .PHONY.
(all): Depend on $(PROGS) instead of hardcoded list.
(clean): Remove $(PROGS) instead of hardcoded list.
* test/mtd.c: New file.
* test/ubi.c: Likewise.
diff --git a/test/Makefile b/test/Makefile
index 781e1f6..97ae746 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,14 +1,17 @@
CFLAGS += -Wall
-all: \
+PROGS = \
vfork fork sig skodic clone leaderkill childthread \
- sigkill_rain wait_must_be_interruptible threaded_execve
+ sigkill_rain wait_must_be_interruptible threaded_execve \
+ mtd ubi
+
+all: $(PROGS)
leaderkill: LDFLAGS += -pthread
childthread: LDFLAGS += -pthread
clean distclean:
- rm -f *.o core \
- vfork fork sig skodic clone leaderkill childthread \
- sigkill_rain wait_must_be_interruptible threaded_execve
+ rm -f *.o core $(PROGS) *.gdb
+
+.PHONY: all clean distclean