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 d919f47 was
122aecd,
checked in by Aaron Moss <a3moss@…>, 8 years ago
|
Expand benchmarks
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | CFA = my-cfa |
---|
2 | DEPFLAGS = -MMD -MP |
---|
3 | OPT = -O2 |
---|
4 | CFLAGS = $(OPT) |
---|
5 | CXXFLAGS = $(OPT) |
---|
6 | |
---|
7 | .PHONY: all clean distclean bench |
---|
8 | |
---|
9 | all: c-bench cpp-bench cfa-bench |
---|
10 | |
---|
11 | # rewrite object generation to auto-determine deps |
---|
12 | COMPILE.c = $(CC) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) |
---|
13 | COMPILE.cpp = $(CXX) $(DEPFLAGS) $(CXXFLAGS) $(CPPFLAGS) |
---|
14 | COMPILE.cfa = $(CFA) $(DEPFLAGS) $(CFLAGS) $(CPPFLAGS) |
---|
15 | |
---|
16 | c-%.o : c-%.c |
---|
17 | c-%.o : c-%.c c-%.d |
---|
18 | $(COMPILE.c) $(OUTPUT_OPTION) -c $< |
---|
19 | |
---|
20 | cpp-%.o : cpp-%.cpp |
---|
21 | cpp-%.o : cpp-%.cpp cpp-%.d |
---|
22 | $(COMPILE.cpp) $(OUTPUT_OPTION) -c $< |
---|
23 | |
---|
24 | cfa-%.o : cfa-%.c |
---|
25 | cfa-%.o : cfa-%.c cfa-%.d |
---|
26 | $(COMPILE.cfa) $(OUTPUT_OPTION) -c $< |
---|
27 | |
---|
28 | COBJS = c-stack.o |
---|
29 | CPPOBJS = |
---|
30 | CFAOBJS = cfa-stack.o |
---|
31 | |
---|
32 | c-bench: c-bench.c c-bench.d $(COBJS) |
---|
33 | $(COMPILE.c) -o $@ $< $(COBJS) $(LDFLAGS) |
---|
34 | |
---|
35 | cpp-bench: cpp-bench.cpp cpp-bench.d $(CPPOBJS) |
---|
36 | $(COMPILE.cpp) -o $@ $< $(CPPOBJS) $(LDFLAGS) |
---|
37 | |
---|
38 | cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS) |
---|
39 | $(COMPILE.cfa) -o $@ $< $(CFAOBJS) $(LDFLAGS) |
---|
40 | |
---|
41 | clean: |
---|
42 | -rm $(COBJS) c-bench |
---|
43 | -rm $(CPPOBJS) cpp-bench |
---|
44 | -rm $(CFAOBJS) cfa-bench |
---|
45 | |
---|
46 | distclean: 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 | |
---|
51 | bench: 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.