source: doc/generic_types/evaluation/Makefile@ b276be5

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since b276be5 was b276be5, checked in by Aaron Moss <a3moss@…>, 9 years ago

Further updates to benchmarks (new C++ virtual benchmark still slightly broken)

  • Property mode set to 100644
File size: 2.4 KB
Line 
1CFA = my-cfa
2DEPFLAGS = -MMD -MP
3CFLAGS = -O2 -flto
4CXXFLAGS = $(CFLAGS) --std=c++14
5
6.PHONY: all clean distclean run-c run-cpp run-cfa run
7
8all: c-bench cpp-bench cfa-bench
9
10# rewrite object generation to auto-determine deps
11COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS)
12COMPILE.cpp = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS)
13COMPILE.cfa = $(CFA) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS)
14
15c-%.o : c-%.c
16c-%.o : c-%.c c-%.d
17 $(COMPILE.c) $(OUTPUT_OPTION) -c $<
18
19cpp-%.o : cpp-%.cpp
20cpp-%.o : cpp-%.cpp cpp-%.d
21 $(COMPILE.cpp) $(OUTPUT_OPTION) -c $<
22
23cfa-%.o : cfa-%.c
24cfa-%.o : cfa-%.c cfa-%.d
25 $(COMPILE.cfa) $(OUTPUT_OPTION) -c $<
26
27COBJS = c-stack.o
28CPPOBJS =
29CPPVOBJS = cpp-vstack.o
30CFAOBJS = cfa-stack.o
31
32c-bench: c-bench.c c-bench.d $(COBJS)
33 $(COMPILE.c) -o $@ $< $(COBJS) $(LDFLAGS)
34
35cpp-bench: cpp-bench.cpp cpp-bench.d $(CPPOBJS)
36 $(COMPILE.cpp) -o $@ $< $(CPPOBJS) $(LDFLAGS)
37
38cpp-vbench: cpp-vbench.cpp cpp-vbench.d $(CPPVOBJS)
39 $(COMPILE.cpp) -o $@ $< $(CPPVOBJS) $(LDFLAGS)
40
41cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS)
42 $(COMPILE.cfa) -o $@ $< $(CFAOBJS) $(LDFLAGS)
43
44clean:
45 -rm $(COBJS) c-bench
46 -rm $(CPPOBJS) cpp-bench
47 -rm $(CPPVOBJS) cpp-vbench
48 -rm $(CFAOBJS) cfa-bench
49
50distclean: clean
51 -rm $(COBJS:.o=.d) c-bench.d
52 -rm $(CPPOBJS:.o=.d) cpp-bench.d
53 -rm $(CPPVOBJS:.o=.d) cpp-vbench.d
54 -rm $(CFAOBJS:.o=.d) cfa-bench.d
55
56run-c: c-bench
57 @echo '## C ##'
58 @./c-bench
59 @printf 'source_size:\t%7d lines\n' `cat c-bench.c bench.h c-stack.h c-stack.c | wc -l`
60 @printf 'binary_size:\t%7d bytes\n' `wc -c < c-bench`
61
62run-cfa: cfa-bench
63 @echo '## Cforall ##'
64 @./cfa-bench
65 @printf 'source_size:\t%7d lines\n' `cat cfa-bench.c bench.h cfa-stack.h cfa-stack.c | wc -l`
66 @printf 'binary_size:\t%7d bytes\n' `wc -c < cfa-bench`
67
68run-cpp: cpp-bench
69 @echo '## C++ ##'
70 @./cpp-bench
71 @printf 'source_size:\t%7d lines\n' `cat cpp-bench.cpp bench.hpp cpp-stack.hpp | wc -l`
72 @printf 'binary_size:\t%7d bytes\n' `wc -c < cpp-bench`
73
74run-cppv: cpp-vbench
75 @echo '## C++ virtual ##'
76 @./cpp-vbench
77 @printf 'source_size:\t%7d lines\n' `cat cpp-vbench.cpp bench.hpp object.hpp cpp-vstack.hpp cpp-vstack.cpp | wc -l`
78 @printf 'binary_size:\t%7d bytes\n' `wc -c < cpp-vbench`
79
80run: run-c run-cfa run-cpp run-cppv
81
82# so make doesn't fail without dependency files
83%.d: ;
84
85# so make won't delete dependency files
86.PRECIOUS: %.d
87
88# include dependency files
89-include: $(COBJS:.o=.d)
90-include: $(CPPOBJS:.o=.d)
91-include: $(CFAOBJS:.o=.d)
92-include: c-bench.d
93-include: cpp-bench.d
94-include: cfa-bench.d
Note: See TracBrowser for help on using the repository browser.