source: doc/generic_types/evaluation/Makefile@ d9dd3d1

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 d9dd3d1 was d9dd3d1, checked in by Aaron Moss <a3moss@…>, 9 years ago

Initial test results

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