/
Makefile.in
143 lines (104 loc) · 3.46 KB
/
Makefile.in
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Makefile for TPIE test applications.
# Use gmake on this Makefile. It relies on the default rules, and
# Use gmake -p to see the default rules.
# $Id: Makefile.in,v 1.43 2006-05-10 11:39:19 aveng Exp $
CXX = @CXX@
CC = @CC@
MAKEDEPEND = $(CXX) -M
TPIEINC = ../include
TPIELIBDIR = ../lib
TPIELIB = $(TPIELIBDIR)/libtpie.a
TPIEBINDIR = ../bin
ifdef DEBUG_APPS
LOG_APPS = 1
ASSERT_DEBUG_APPS = 1
endif
CXXFLAGS =
# CPPFLAGS is used by the default rules. Using "override" and "+="
# allows the user to prepend things to CPPFLAGS on the command line.
override CPPFLAGS += -I$(TPIEINC)
# These options are set by the configure script.
override CPPFLAGS += @DEFS@
# These options are for large file support. They force all file access
# calls to use the 64 bit variants. Several types change also, e.g. off_t
# becomes off64_t.
override CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
#override CPPFLAGS += -DTPIE_SORT_SMALL_MRGARITY=2
#override CPPFLAGS += -DTPIE_SORT_SMALL_RUNSIZE=10000
#override CPPFLAGS += -DTPIE_USE_STL_SORT
ifeq ($(MINUSG),1)
override CPPFLAGS += -g
else
override CPPFLAGS += -O3
endif
ifeq ($(MINUSPG),1)
override CPPFLAGS += -pg
endif
LDLIBS = -L$(TPIELIBDIR) -ltpie -lm #-liberty
CCFLAGS = $(CXXFLAGS)
# The various test applications.
APPS := test_ami_pmerge \
test_ami_sort \
test_ami_merge \
test_ami_gp \
test_ami_arith \
test_ami_matrix \
test_ami_matrix_pad \
test_ami_stack \
test_ami_queue \
test_ami_bp \
test_ami_sm \
test_ami_sort24 \
test_ami_btree \
test_correctness \
test_big_scan \
test_sort
# Sources to the test applications.
APPSRC = $(patsubst %,%.cpp,$(APPS))
# Other C++ sources for common support routines.
COMMONCXXSRC = parse_args.cpp app_config.cpp getopts.cpp
COMMONCSRC =
OTHERCXXSRC = scan_random.cpp \
scan_count.cpp \
scan_uniform_sm.cpp
CXXSRC = $(APPSRC) $(COMMONCXXSRC) $(OTHERCXXSRC)
# Common objects that go into most apps.
COMMONOBJ = $(COMMONCXXSRC:.cpp=.o) $(COMMONCSRC:.c=.o)
# C sources.
CSRC =
# Translation rules:
%:%.o
$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $(TPIEBINDIR)/$@
# Specific dependencies, explicit and automatic.
all: $(APPS)
depend: cleandepend
$(MAKEDEPEND) $(CPPFLAGS) $(CSRC) $(CXXSRC) >> Makefile.depend
clean: cleandepend
-rm -f $(CSRC:.c=.o) $(CXXSRC:.cpp=.o)
$(foreach APP,$(APPS), (rm -f $(TPIEBINDIR)/$(APP));)
distclean: clean
# What objects each of the apps acually needs.
test_ami_pmerge: test_ami_pmerge.o scan_random.o $(COMMONOBJ)
test_ami_sort: test_ami_sort.o scan_random.o $(COMMONOBJ)
test_ami_merge: test_ami_merge.o scan_count.o $(COMMONOBJ)
test_ami_gp: test_ami_gp.o scan_count.o $(COMMONOBJ)
test_ami_bp: test_ami_bp.o scan_count.o $(COMMONOBJ)
test_ami_arith: test_ami_arith.o scan_count.o $(COMMONOBJ)
test_ami_matrix_pad: test_ami_matrix_pad.o scan_count.o $(COMMONOBJ)
test_ami_matrix: test_ami_matrix.o scan_count.o $(COMMONOBJ)
test_ami_stack: test_ami_stack.o $(COMMONOBJ)
test_ami_queue: test_ami_queue.o $(COMMONOBJ)
test_ami_sm: test_ami_sm.o scan_uniform_sm.o $(COMMONOBJ)
test_ami_sort24: test_ami_sort24.o $(COMMONOBJ)
test_ami_btree: test_ami_btree.o
test_correctness: test_correctness.o getopts.o
test_big_scan: test_big_scan.o getopts.o
sample_pgm: sample_pgm.o getopts.o
test_sort: test_sort.o getopts.o
include Makefile.depend
Makefile.depend: #$(CSRC) $(CXXSRC)
rm -f Makefile.depend; \
$(MAKEDEPEND) $(CPPFLAGS) $(CSRC) $(CXXSRC) >> Makefile.depend
cleandepend:
-rm -f Makefile.depend
.PHONY : clean all depend cleandepend distclean