about summary refs log tree commit diff homepage
path: root/test/Concrete/Makefile.cmake.test.in
blob: feb879de706d86031aaba839dd35296185a6892f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#===------------------------------------------------------------------------===#
#
#                     The KLEE Symbolic Virtual Machine
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#
# @AUTO_GEN_MSG@
#
#===------------------------------------------------------------------------===#
LLVMCC := @LLVMCC@
LLVMAS := @LLVM_AS@
LLVMLINK := @LLVM_LINK@
LLVMCC.CFlags := -O0 -Wall

# Make sure source files can match the pattern rules
VPATH := @CMAKE_CURRENT_SOURCE_DIR@

Output/.dir:
	mkdir -p $@

clean::
	-rm -rf Output/

Output/%.bc: %.c Output/.dir
	$(LLVMCC) -emit-llvm -c $(LLVMCC.CFlags) $< -o $@

Output/%.bc: %.ll $(LLVMAS) Output/.dir
	$(LLVMAS) -f $< -o $@

# We build a separate testingUtils bitcode for each test, to make sure parallel
# tests don't interact with one another.
Output/%_testingUtils.bc: _testingUtils.c Output/.dir
	$(LLVMCC) -emit-llvm -c $(LLVMCC.CFlags) $< -o $@

Output/linked_%.bc: Output/%.bc Output/%_testingUtils.bc
	$(LLVMLINK) $< Output/$*_testingUtils.bc -o $@

.PRECIOUS: Output/.dir

## Cancel built-in implicit rules that override above rules
%: %.s

%: %.c

%.o: %.c