Cleanup build process (#1023)
avoiding bash subshells (which happen in for loops) because they
like to selectively inherit environment variables
diff --git a/Makefile b/Makefile
index 33067d3..2c46341 100644
--- a/Makefile
+++ b/Makefile
@@ -455,11 +455,9 @@
TESTS += test_m68k.static test_mips.static test_ppc.static test_sparc.static
TESTS += test_systemz.static test_x86.static test_xcore.static test_m680x.static
TESTS += test_skipdata test_skipdata.static test_iter.static
-check:
- @for t in $(TESTS); do \
- echo Check $$t ... ; \
- LD_LIBRARY_PATH=./tests ./tests/$$t > /dev/null && echo OK || echo FAILED; \
- done
+check: $(TESTS)
+test_%:
+ ./tests/$@ > /dev/null && echo OK || echo FAILED
$(OBJDIR)/%.o: %.c
@mkdir -p $(@D)