1 ##===- TEST.dbg.Makefile ----------------------------------*- Makefile -*--===##
3 # This test is used to measure quality of debugging information.
5 ##===----------------------------------------------------------------------===##
7 #----------------------------------------------------------------------
8 # Be sure to add the python path that points to the LLDB shared library.
10 # setenv PYTHONPATH /Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Python
12 # export PYTHONPATH=/Developer/Library/PrivateFrameworks/LLDB.framework/Resources/Python
13 #----------------------------------------------------------------------
15 CURDIR := $(shell cd .; pwd)
16 PROGDIR := $(PROJ_SRC_ROOT)
17 RELDIR := $(subst $(PROGDIR),,$(CURDIR))
18 COLLECTOR := $(PROJ_SRC_ROOT)/CollectDebugInfoUsingLLDB.py
21 REPORTS_SUFFIX := $(addsuffix .report.txt, $(REPORTS_TO_GEN))
23 Output/%.bp: %.c Output/.dir
24 $(LCC) $(CPPFLAGS) $(CFLAGS) -g -c -emit-llvm $< -o $@.bc
25 $(LOPT) -print-breakpoints-for-testing $@.bc -o $@
27 Output/%.bp: %.cpp Output/.dir
28 $(LCXX) $(CPPFLAGS) $(CFLAGS) -g -c -emit-llvm $< -o $@.bc
29 $(LOPT) -print-breakpoints-for-testing $@.bc -o $@
31 Output/%.bp: %.m Output/.dir
32 $(LCC) $(CPPFLAGS) $(CFLAGS) -g -c -emit-llvm $< -o $@.bc
33 $(LOPT) -print-breakpoints-for-testing $@.bc -o $@
35 Output/%.bp: %.mm Output/.dir
36 $(LCXX) $(CPPFLAGS) $(CFLAGS) -g -c -emit-llvm $< -o $@.bc
37 $(LOPT) -print-breakpoints-for-testing $@.bc -o $@
39 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
40 test.$(TEST).%: Output/%.bp Output/%.dbg Output/%.dbg.opt Output/%.native.dbg Output/%.native.dbg.opt
42 if test "$*" == "reversefile"; then \
45 if test "$*" == "spellcheck"; then \
48 if test "$*" == "sumcol"; then \
51 if test "$*" == "wc"; then \
54 if test "$*" == "wordfreq"; then \
57 if test "$*" == "exptree"; then \
60 if test "$*" == "ray"; then \
63 if test "$*" == "oscar"; then \
66 if test "$*" == "spirit"; then \
69 if test $$is_skip == 0; then \
70 $(COLLECTOR) Output/$*.dbg Output/$*.bp Output/$*.dbg.out; \
71 $(COLLECTOR) Output/$*.dbg.opt Output/$*.bp Output/$*.dbg.opt.out; \
72 $(COLLECTOR) Output/$*.native.dbg Output/$*.bp Output/$*.native.dbg.out; \
73 $(COLLECTOR) Output/$*.native.dbg.opt Output/$*.bp Output/$*.native.dbg.opt.out; \
74 $(PROJ_SRC_ROOT)/CompareDebugInfo.py $*; \