-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
99 lines (68 loc) · 1.77 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Copyright 2007-2008 Adobe Systems Incorporated
# Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
# or a copy at http://stlab.adobe.com/licenses.html )
#
###################################################
#
# Makefile for C++ benchmarks
#
###################################################
#
# Macros
#
INCLUDE = -I.
# GCC
$?FLASCC=$(PWD)/../../sdk
CC = $(FLASCC)/usr/bin/gcc
CXX = $(FLASCC)/usr/bin/g++
CFLAGS =
CPPFLAGS = $(INCLUDE) -O3
CLIBS = -lm
CPPLIBS = -lm
DEPENDENCYFLAG = -M
#
# our target programs
#
BINARIES = machine \
stepanov_abstraction \
stepanov_vector \
loop_unroll \
simple_types_loop_invariant \
functionobjects \
simple_types_constant_folding
#
# Build rules
#
all : $(BINARIES)
SUFFIXES:
.SUFFIXES: .c .cpp
# declare some targets to be fakes without real dependencies
.PHONY : clean dependencies
# remove all the stuff we build
clean :
rm -f *.o $(BINARIES)
# generate dependency listing from all the source files
# used for double checking problems with headers
# this does NOT go in the makefile
SOURCES = $(wildcard *.c) $(wildcard *.cpp)
dependencies : $(SOURCES)
$(CXX) $(DEPENDENCYFLAG) $(CPPFLAGS) $^
#
# Run the benchmarks and generate a report
#
REPORT_FILE = report.txt
report: $(BINARIES)
echo "##STARTING Version 1.0" > $(REPORT_FILE)
date >> $(REPORT_FILE)
echo "##CFlags: $(CFLAGS)" >> $(REPORT_FILE)
echo "##CPPFlags: $(CPPFLAGS)" >> $(REPORT_FILE)
./machine >> $(REPORT_FILE)
./stepanov_abstraction >> $(REPORT_FILE)
./stepanov_vector >> $(REPORT_FILE)
./functionobjects >> $(REPORT_FILE)
./simple_types_constant_folding >> $(REPORT_FILE)
./simple_types_loop_invariant >> $(REPORT_FILE)
./loop_unroll >> $(REPORT_FILE)
date >> $(REPORT_FILE)
echo "##END Version 1.0" >> $(REPORT_FILE)