2002-05-17 04:53:52 +00:00
|
|
|
# test/Regression/CBackend/Makefile
|
|
|
|
#
|
|
|
|
# This directory contains regression tests for the C backend for LLVM.
|
|
|
|
# These testcases are assembled with the LLVM assembler, then disassembled into
|
|
|
|
# C code. The C code should be compilable with the standard C compiler.
|
|
|
|
#
|
|
|
|
LEVEL = ../../..
|
|
|
|
include $(LEVEL)/test/Makefile.tests
|
|
|
|
|
|
|
|
.PRECIOUS: Output/%.c
|
|
|
|
|
|
|
|
TESTS := $(wildcard *.ll)
|
2003-06-23 19:58:50 +00:00
|
|
|
FTESTS := $(wildcard *.llx) # Freeform tests
|
2002-05-17 04:53:52 +00:00
|
|
|
|
2003-06-23 19:58:50 +00:00
|
|
|
all:: $(addprefix Output/, $(TESTS:%.ll=%.to)) $(addprefix Output/, $(FTESTS:%.llx=%.llx.out))
|
2002-05-17 04:53:52 +00:00
|
|
|
|
|
|
|
Output/%.to: Output/%.c
|
2003-05-12 15:33:52 +00:00
|
|
|
$(CC) -c -Werror $< -o $@ || \
|
2002-05-17 04:53:52 +00:00
|
|
|
(rm -f $@; $(FAILURE) $@ )
|
|
|
|
|
|
|
|
Output/%.c: %.ll Output/.dir $(LAS) $(LDIS)
|
2003-01-23 16:51:47 +00:00
|
|
|
$(LAS) < $< | $(LDIS) -c > $@ || \
|
2002-08-20 16:33:28 +00:00
|
|
|
(rm -f $@; $(FAILURE) $@ )
|
2003-06-23 19:58:50 +00:00
|
|
|
|
|
|
|
Output/%.llx.out: %.llx Output/.dir $(LAS) $(LDIS)
|
|
|
|
-$(TESTRUNR) $<
|
|
|
|
|