source: doc/papers/OOPSLA17/evaluation/Makefile @ 46aa60e

Last change on this file since 46aa60e 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
RevLine 
[6a8ac0b]1CC = gcc
[e3de500]2CFA = cfa
[4cfcf41]3DEPFLAGS = -MMD -MP
[0d10090]4CFLAGS = -O2
5ifdef N
6CFLAGS += -DN=$(N)
7endif
[b276be5]8CXXFLAGS = $(CFLAGS) --std=c++14
[6a8ac0b]9MAKEFILE_NAME = ${firstword ${MAKEFILE_LIST}}
[309be81]10
[6a8ac0b]11.PHONY : all clean run-c run-cpp run-cfa run
[309be81]12
[6a8ac0b]13all : c-bench cpp-bench cpp-vbench cfa-bench
[309be81]14
[4cfcf41]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)
[309be81]19
[4cfcf41]20c-%.o : c-%.c
[122aecd]21        $(COMPILE.c) $(OUTPUT_OPTION) -c $<
[309be81]22
[4cfcf41]23cpp-%.o : cpp-%.cpp
[122aecd]24        $(COMPILE.cpp) $(OUTPUT_OPTION) -c $<
[4cfcf41]25
26cfa-%.o : cfa-%.c
[122aecd]27        $(COMPILE.cfa) $(OUTPUT_OPTION) -c $<
[4cfcf41]28
[6a8ac0b]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
[4cfcf41]33
[6a8ac0b]34${COBJS} ${CPPOBJS} ${CPPVOBJS} ${CFAOBJS} : ${MAKEFILE_NAME}
[3fb7f5e]35
[6a8ac0b]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)
[4cfcf41]40
[6a8ac0b]41c-bench : $(COBJS) c-bench.o
42        $(COMPILE.c) $(LDFLAGS) $^ -o $@
[4cfcf41]43
[6a8ac0b]44cpp-bench : $(CPPOBJS) cpp-bench.o
45        $(COMPILE.cpp) $(LDFLAGS) $^ -o $@
[b276be5]46
[6a8ac0b]47cpp-vbench : $(CPPVOBJS) cpp-vbench.o
48        $(COMPILE.cpp) $(LDFLAGS) $^ -o $@
[309be81]49
[6a8ac0b]50cfa-bench : $(CFAOBJS) cfa-bench.o
51        $(COMPILE.cfa) $(LDFLAGS) $^ -o $@
[4cfcf41]52
[6a8ac0b]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
[47535a0d]66        @echo
[4cfcf41]67        @echo '## C ##'
[6a8ac0b]68        @/usr/bin/time -f 'max_memory:\t%M kilobytes' ./$<
[3fb7f5e]69        @printf 'source_size:\t%8d lines\n' `cat $(CFILES) | wc -l`
[a381b46]70        @printf 'redundant_type_annotations:%8d lines\n' `cat $(CFILES) | fgrep '/***/' -c`
[6a8ac0b]71        @printf 'binary_size:\t%8d bytes\n' `stat -c %s $<`
[b276be5]72
[6a8ac0b]73run-cpp : cpp-bench
[47535a0d]74        @echo
[b276be5]75        @echo '## C++ ##'
[6a8ac0b]76        @/usr/bin/time -f 'max_memory:\t %M kilobytes' ./$<
[3fb7f5e]77        @printf 'source_size:\t%8d lines\n' `cat $(CPPFILES) | wc -l`
[a381b46]78        @printf 'redundant_type_annotations:%8d lines\n' `cat $(CPPFILES) | fgrep '/***/' -c`
[6a8ac0b]79        @printf 'binary_size:\t%8d bytes\n' `stat -c %s $<`
[b276be5]80
[6a8ac0b]81run-cppv : cpp-vbench
[47535a0d]82        @echo
[a381b46]83        @echo '## C++obj ##'
[6a8ac0b]84        @/usr/bin/time -f 'max_memory:\t%M kilobytes' ./$<
[3fb7f5e]85        @printf 'source_size:\t%8d lines\n' `cat $(CPPVFILES) | wc -l`
[a381b46]86        @printf 'redundant_type_annotations:%8d lines\n' `cat $(CPPVFILES) | fgrep '/***/' -c`
[6a8ac0b]87        @printf 'binary_size:\t%8d bytes\n' `stat -c %s $<`
[b276be5]88
[6a8ac0b]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 $<`
[4cfcf41]96
[6a8ac0b]97run : run-c run-cfa run-cpp run-cppv
Note: See TracBrowser for help on using the repository browser.