source: doc/generic_types/evaluation/Makefile @ 122aecd

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 122aecd was 122aecd, checked in by Aaron Moss <a3moss@…>, 7 years ago

Expand benchmarks

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[4cfcf41]1CFA = my-cfa
2DEPFLAGS = -MMD -MP
[122aecd]3OPT = -O2
4CFLAGS = $(OPT)
5CXXFLAGS = $(OPT)
[309be81]6
[4cfcf41]7.PHONY: all clean distclean bench
[309be81]8
[122aecd]9all: c-bench cpp-bench cfa-bench
[309be81]10
[4cfcf41]11# rewrite object generation to auto-determine deps
12COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS)
13COMPILE.cpp = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS)
14COMPILE.cfa = $(CFA) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS)
[309be81]15
[4cfcf41]16c-%.o : c-%.c
17c-%.o : c-%.c c-%.d
[122aecd]18        $(COMPILE.c) $(OUTPUT_OPTION) -c $<
[309be81]19
[4cfcf41]20cpp-%.o : cpp-%.cpp
21cpp-%.o : cpp-%.cpp cpp-%.d
[122aecd]22        $(COMPILE.cpp) $(OUTPUT_OPTION) -c $<
[4cfcf41]23
24cfa-%.o : cfa-%.c
25cfa-%.o : cfa-%.c cfa-%.d
[122aecd]26        $(COMPILE.cfa) $(OUTPUT_OPTION) -c $<
[4cfcf41]27
28COBJS = c-stack.o
29CPPOBJS = 
30CFAOBJS = cfa-stack.o
31
32c-bench: c-bench.c c-bench.d $(COBJS)
[122aecd]33        $(COMPILE.c) -o $@ $< $(COBJS) $(LDFLAGS)
[4cfcf41]34
35cpp-bench: cpp-bench.cpp cpp-bench.d $(CPPOBJS)
[122aecd]36        $(COMPILE.cpp) -o $@ $< $(CPPOBJS) $(LDFLAGS)
[4cfcf41]37
38cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS)
[122aecd]39        $(COMPILE.cfa) -o $@ $< $(CFAOBJS) $(LDFLAGS)
[309be81]40
41clean:
[4cfcf41]42        -rm $(COBJS) c-bench
43        -rm $(CPPOBJS) cpp-bench
44        -rm $(CFAOBJS) cfa-bench
45
46distclean: clean
47        -rm $(COBJS:.o=.d) c-bench.d
48        -rm $(CPPOBJS:.o=.d) cpp-bench.d
49        -rm $(CFAOBJS:.o=.d) cfa-bench.d
50
[122aecd]51bench: c-bench cpp-bench cfa-bench
[4cfcf41]52        @echo '## C ##'
53        @./c-bench
54        @echo '## C++ ##'
55        @./cpp-bench
56        @echo '## Cforall ##'
57        @./cfa-bench
58
59# so make doesn't fail without dependency files
60%.d: ;
61
62# so make won't delete dependency files
63.PRECIOUS: %.d
64
65# include dependency files
66-include: $(COBJS:.o=.d)
67-include: $(CPPOBJS:.o=.d)
68-include: $(CFAOBJS:.o=.d)
69-include: c-bench.d
70-include: cpp-bench.d
71-include: cfa-bench.d
Note: See TracBrowser for help on using the repository browser.