summaryrefslogtreecommitdiff
path: root/test/CBackend/Makefile
blob: 5ee4ba741c142826528a8daced08b07909425373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#                    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)

all:: $(addprefix Output/, $(TESTS:%.ll=%.to))


Output/%.to: Output/%.c
	$(CC) -c -W -Wall $< -o $@ || \
		(rm -f $@; $(FAILURE) $@ )

Output/%.c: %.ll Output/.dir $(LAS) $(LDIS)
	$(LAS) < $< | $(LDIS) -c > $@ || \
		(rm -f $@; $(FAILURE) $@ )