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

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 122aecd was 122aecd, checked in by Aaron Moss <a3moss@…>, 5 years ago

Expand benchmarks

  • Property mode set to 100644
File size: 1.5 KB
Line 
1CFA = my-cfa
2DEPFLAGS = -MMD -MP
3OPT = -O2
4CFLAGS = $(OPT)
5CXXFLAGS = $(OPT)
6
7.PHONY: all clean distclean bench
8
9all: c-bench cpp-bench cfa-bench
10
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)
15
16c-%.o : c-%.c
17c-%.o : c-%.c c-%.d
18        $(COMPILE.c) $(OUTPUT_OPTION) -c $<
19
20cpp-%.o : cpp-%.cpp
21cpp-%.o : cpp-%.cpp cpp-%.d
22        $(COMPILE.cpp) $(OUTPUT_OPTION) -c $<
23
24cfa-%.o : cfa-%.c
25cfa-%.o : cfa-%.c cfa-%.d
26        $(COMPILE.cfa) $(OUTPUT_OPTION) -c $<
27
28COBJS = c-stack.o
29CPPOBJS = 
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
38cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS)
39        $(COMPILE.cfa) -o $@ $< $(CFAOBJS) $(LDFLAGS)
40
41clean:
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
51bench: c-bench cpp-bench cfa-bench
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.