source: doc/papers/OOPSLA17/evaluation/Makefile @ 6926a6d

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change on this file since 6926a6d was f4e3419d, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

restructure paper documents

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