summaryrefslogtreecommitdiffstats
path: root/libflash/test/Makefile.check
diff options
context:
space:
mode:
Diffstat (limited to 'libflash/test/Makefile.check')
-rw-r--r--libflash/test/Makefile.check20
1 files changed, 20 insertions, 0 deletions
diff --git a/libflash/test/Makefile.check b/libflash/test/Makefile.check
new file mode 100644
index 00000000..f9f1ca80
--- /dev/null
+++ b/libflash/test/Makefile.check
@@ -0,0 +1,20 @@
+# -*-Makefile-*-
+LIBFLASH_TEST := libflash/test/test-flash
+
+check: $(LIBFLASH_TEST:%=%-check)
+
+$(LIBFLASH_TEST:%=%-check) : %-check: %
+ $(VALGRIND) $<
+
+libflash/test/stubs.o: libflash/test/stubs.c
+ $(HOSTCC) $(HOSTCFLAGS) -g -c -o $@ $<
+
+$(LIBFLASH_TEST) : libflash/test/stubs.o libflash/libflash.c
+
+$(LIBFLASH_TEST) : % : %.c
+ $(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -o $@ $< libflash/test/stubs.o
+
+clean: libflash-test-clean
+
+libflash-test-clean:
+ $(RM) libflash/test/*.o $(LIBFLASH_TEST)
OpenPOWER on IntegriCloud