Build with $(CC), not gcc explicitly
[oota-llvm.git] / test / CBackend / Makefile
1 #                    test/Regression/CBackend/Makefile
2 #
3 # This directory contains regression tests for the C backend for LLVM.  
4 # These testcases are assembled with the LLVM assembler, then disassembled into
5 # C code.  The C code should be compilable with the standard C compiler.
6 #
7 LEVEL = ../../..
8 include $(LEVEL)/test/Makefile.tests
9
10 .PRECIOUS: Output/%.c
11
12 TESTS := $(wildcard *.ll)
13
14 all:: $(addprefix Output/, $(TESTS:%.ll=%.to))
15
16
17 Output/%.to: Output/%.c
18         $(CC) -c -W -Wall $< -o $@ || \
19                 (rm -f $@; $(FAILURE) $@ )
20
21 Output/%.c: %.ll Output/.dir $(LAS) $(LDIS)
22         $(LAS) < $< | $(LDIS) -c > $@ || \
23                 (rm -f $@; $(FAILURE) $@ )