1 ##===- examples/BFtoLLVM/tests/Makefile --------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
10 # Makefile for bf2llvm tests.
13 BFTOLLVM = $(LLVMTOOLCURRENT)/BFtoLLVM
15 include $(LEVEL)/Makefile.common
22 .SUFFIXES: .ll .gccas.bc .llvm .cbe.c .cbe
24 Output/%.ll: %.b $(BFTOLLVM) Output/.dir
27 Output/%.gccas.bc: Output/%.ll Output/.dir
30 Output/%.llvm Output/%.llvm.bc: Output/%.gccas.bc Output/.dir
31 $(LGCCLD) $< -lc -lcrtend -o Output/$*.llvm
33 Output/%.cbe.c: Output/%.llvm.bc Output/.dir
34 $(LLC) -march=c -f -o=$@ $<
36 Output/%.cbe: Output/%.cbe.c Output/.dir
39 check: Output/hello.cbe hello.expected-out
41 Output/hello.cbe > Output/hello.out-cbe
42 @echo "Checking result"
43 diff Output/hello.out-cbe hello.expected-out