-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile.skel
265 lines (216 loc) · 9.27 KB
/
Makefile.skel
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#****************************************************************************
#* TAU Portable Profiling Package **
#* http://www.cs.uoregon.edu/research/tau **
#****************************************************************************
#* Copyright 1997-2000 **
#* Department of Computer and Information Science, University of Oregon **
#* Advanced Computing Laboratory, Los Alamos National Laboratory **
#* Research Center Juelich, ZAM Germany **
#****************************************************************************
#######################################################################
## TAU (C) 1996 ##
## based on TAU/pC++/Sage++ Copyright (C) 1993,1995 ##
## Indiana University University of Oregon University of Rennes ##
#######################################################################
########### Automatically modified by the configure script ############
CONFIG_ARCH=default
CONFIG_CC=gcc
CONFIG_CXX=g++
PCXX_OPT=-g
USER_OPT=-g -__DUSE_TAU
TAUROOT=
#######################################################################
include include/Makefile
#INTELCXXLIBICC#INTELOPTS = -cxxlib-icc #ENDIF#
############# Standard Defines ##############
CC = $(CONFIG_CC) $(ABI) $(ISA)
CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(INTELOPTS)
TAU_INSTALL = /bin/cp
TAU_SHELL = /bin/sh
LSX = .a
#############################################
#PDT#PDTEXAMPLE = examples/autoinstrument examples/reduce #ENDIF#
#MPI#MPIEXAMPLES = examples/pi examples/NPB2.3 #ENDIF#
# Pete Beckman (3/16/95)
# This makefile recursively calls MAKE in each subdirectory
#PTX#CC=cc#ENDIF#
LINKER = $(CC)
# tools EVERYONE needs
#BASIC = utils src/Profile examples/instrument
BASIC = utils src/Profile
# library and tools
EXPORTS = utils src/Profile
# Example Programs
EXAMPLES = examples/instrument examples/threads \
examples/cthreads examples/fortran examples/f90 $(MPIEXAMPLES) $(PDTEXAMPLE)
# PC++ Support
#PCXX#PCXX=lang_support/pc++#ENDIF#
# HPC++ Support
#HPCXX#HPCXX=lang_support/hpc++#ENDIF#
# AnsiC Support
#ANSIC#ANSIC=lang_support/ansic#ENDIF#
# APEX Support
#APEX#APEX=apex#ENDIF#
# ZeroSum Support
#ZeroSum#ZeroSum=zerosum#ENDIF#
# PerfStubs Support
#PerfStubs#PerfStubs=perfstubs#ENDIF#
# Trace Reader Library
TRACEINPUT=src/TraceInput
TRACE2PROFILE=utils/trace2profile
#OTF2#OTF2PROFILE=utils/otf2profile #ENDIF#
#PERFLIB#BASIC=utils #ENDIF#
#VTF#VTFCONVERTER=utils/vtfconverter#ENDIF#
#TAU2EPILOG#ELGCONVERTER=utils/elgconverter #ENDIF#
#IOWRAPPER#IOWRAPPER=src/wrappers/posixio#ENDIF#
#DMAPP#DMAPPWRAPPER=src/wrappers/dmapp#ENDIF#
#UGNI#UGNIWRAPPER=src/wrappers/gni#ENDIF#
#CHAPEL#CHAPELWRAPPER=src/wrappers/chapel#ENDIF#
#GPI#GPIWRAPPER=src/wrappers/gpi#ENDIF#
#MPC#MPC_MPI_WRAPPER=src/wrappers/mpc_mpi#ENDIF#
#ARMCI#ARMCIWRAPPER=src/wrappers/armci#ENDIF#
TAUPRELOAD=src/wrappers/taupreload
#PIN#TAUPRELOAD= #ENDIF#
#IBM64#TAUPRELOAD= #ENDIF#
#CUDA#TAUCUDA=src/wrappers/cuda #ENDIF#
#CUPTI#TAU_CUPTI_AVAIL=utils/tau_cupti_avail #ENDIF#
#SHMEM#TAU_CUPTI_AVAIL= #ENDIF#
#IBM64LINUX_XLC#TAU_CUPTI_AVAIL= #ENDIF#
### Note: tau_cupti_avail fails to build because POMP2_Begin is undefined for it when TAU is built with OPARI2. Remove the following line when this is fixed.
#OPARI2#TAU_CUPTI_AVAIL= #ENDIF#
#TAUENV#TAU_ENV=utils/tau_env #ENDIF#
TAUOPENCL=src/wrappers/opencl
MEMORYWRAPPER=src/wrappers/memory
#IBM64#MEMORYWRAPPER= #ENDIF#
#ANDROID#ANDROID_TOOLS=tools/src/android #ENDIF#
#SYSCALL#SYSCALL_WRAPPER=src/wrappers/syscall#ENDIF#
#CRAYXMT#TAU_ENV= #ENDIF#
#TAU_WINDOWS#TAU_ENV= #ENDIF#
#BGL#TAU_ENV= #ENDIF#
#CATAMOUNT#TAU_ENV= #ENDIF#
#CRAYX1CC#TAU_ENV= #ENDIF#
#CRAYCNL#TAU_ENV= #ENDIF#
#SUNCC#TAU_ENV= #ENDIF#
#APPLEPGI#TAU_ENV= #ENDIF#
#HITACHI#TAU_ENV= #ENDIF#
#CRAYXMT#TAU_ENV= #ENDIF#
#CRAYCC#TAU_ENV= #ENDIF#
#USE_NECCXX#TAU_ENV= #ENDIF#
#NOSHARED#TAU_ENV= #ENDIF#
#SCOREPOPARI2#TAU_ENV= #ENDIF#
#SCOREP#TAU_ENV= #ENDIF#
#PYTHON#TAU_ENV= #ENDIF#
#BUPC#TAU_UPCC_WRAPPER=src/wrappers/upc/bupc/upcr #ENDIF#
#BUPC#UPCWRAPPER=$(TAU_UPCC_WRAPPER) #ENDIF#
#GUPC#TAU_UPCC_WRAPPER=src/wrappers/upc/gupc #ENDIF#
#GUPC#UPCWRAPPER=$(TAU_UPCC_WRAPPER) #ENDIF#
#XLUPC#UPCWRAPPER=src/wrappers/upc/xlupc#ENDIF#
#COMPINST_CRAYCC#UPCWRAPPER=src/wrappers/upc/crayupc #ENDIF#
#CRAYCNL_MVAPICH2#UPCWRAPPER= #ENDIF#
#TAU_CRAY_AARCH64#UPCWRAPPER= #ENDIF#
#TAU_PTHREAD_WRAP#PTHREAD_WRAPPER=src/wrappers/pthread #ENDIF#
#GOMP_AVAILABLE#GOMP_WRAPPER=src/wrappers/gomp #ENDIF#
#MPC##PTHREAD_WRAPPER=src/wrappers/mpcthread #ENDIF#
#SHMEM#SHMEM_WRAPPER=src/wrappers/shmem #ENDIF#
#PGI_OPENACC#TAU_CUPTI_AVAIL= #ENDIF#
# Plugin directory
PLUGINS=plugins
#TAU_BUILD_LLVM_PLUGIN#LLVM_PLUGIN=plugins/llvm #ENDIF#
#IBM64#PLUGINS= #ENDIF#
#NOPLUGINS#PLUGINS= #ENDIF#
#IBM64#LLVM_PLUGIN= #ENDIF#
#NOPLUGINS#LLVM_PLUGIN= #ENDIF#
# Subdirectories to make resursively
SUBDIR = $(TRACEINPUT) $(BASIC) $(PCXX) $(HPCXX) $(ANSIC) $(VTFCONVERTER) \
$(ANDROID_TOOLS) $(ELGCONVERTER) $(IOWRAPPER) $(TAUPRELOAD) \
$(PTHREAD_WRAPPER) \
$(MEMORYWRAPPER) $(TAUCUDA) $(TAU_CUPTI_AVAIL) $(TAU_ENV) $(TAUOPENCL) \
$(GPIWRAPPER) $(ARMCIWRAPPER) $(DMAPPWRAPPER) $(UGNIWRAPPER) $(CHAPELWRAPPER) $(UPCWRAPPER) \
$(GOMP_WRAPPER) $(OTF2PROFILE) $(MPC_MPI_WRAPPER) $(APEX) $(ZeroSum) $(PerfStubs) \
$(SHMEM_WRAPPER) $(PLUGINS) $(LLVM_PLUGIN) \
$(SYSCALL_WRAPPER)
CONFIGQUERY=`utils/ConfigQuery -arch`
#SUN386I#CONFIGQUERY=`/bin/bash utils/ConfigQuery -arch` #ENDIF#
#SUNX86_64#CONFIGQUERY=`/bin/bash utils/ConfigQuery -arch` #ENDIF#
.PHONY: all exports tests install clean cleandist cleaninstall cleangood
all: install
@echo
exports :
@echo "Determining Configuration..."
@if [ x${CONFIGQUERY} = xdefault ] ; then \
(echo Run the configure script before attempting to compile ; \
exit 1) ; \
else echo System previously configured as a ${CONFIGQUERY} ; fi
@echo "*********** RECURSIVELY MAKING SUBDIRECTORIES ***********"
@for i in ${EXPORTS}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\
$(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" ); done
@echo "***************** DONE ************************"
tests:
@echo "Determining Configuration..."
@if [ x${CONFIGQUERY} = xdefault ] ; then \
(echo Run the configure script before attempting to compile ; \
exit 1) ; \
else echo System previously configured as a ${CONFIGQUERY} ; fi
@echo "*********** RECURSIVELY MAKING SUBDIRECTORIES ***********"
@for i in ${EXAMPLES}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\
$(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" ) || exit $$?; done
@echo "***************** DONE ************************"
install: .clean
@echo "Determining Configuration..."
@if [ x${CONFIGQUERY} = xdefault ] ; then \
(echo Run the configure script before attempting to compile ; \
exit 1) ; \
else echo System previously configured as a ${CONFIGQUERY} ; fi
@echo "*********** RECURSIVELY MAKING SUBDIRECTORIES ***********"
@for i in ${SUBDIR}; do (echo "*** COMPILING $$i DIRECTORY"; cd $$i;\
$(MAKE) "MAKE=$(MAKE)" install ) || exit $$?; done
@echo " "
@if [ x${CONFIG_ARCH} = xarm64_apple ] ; then \
(echo "Working around macOS codesigning bug..." ; \
echo "Making temporary copy of $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH)" ; \
cp -r -p $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH) $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH)-temp ; \
echo "Removing $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH)" ; \
rm -r $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH) ; \
echo "Replacing $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH) with temporary copy" ; \
mv $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH)-temp $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH)) ; \
fi
@echo "Built $(TAU_PREFIX_INSTALL_DIR)/$(TAU_ARCH)/lib/Makefile.tau$(TAU_CONFIG)"
@echo "***************** DONE ************************"
javadoc:
cd tools/src; $(MAKE) javadoc
doc: javadoc
java:
cd tools/src/common; $(MAKE)
cd tools/src/vis; $(MAKE)
cd tools/src/perfdmf; $(MAKE) override
cd tools/src/paraprof; $(MAKE) override
cd tools/src/perfexplorer; ./configure; $(MAKE)
.clean:
@for i in ${SUBDIR} ${EXAMPLES} ; do (cd $$i; $(MAKE) "MAKE=$(MAKE)" clean || exit 0); done
touch .clean
clean:
@for i in ${SUBDIR} ${EXAMPLES} ; do (cd $$i; $(MAKE) "MAKE=$(MAKE)" clean || exit 0); done
cleandist: clean cleangood
cleaninstall: clean cleangood
cleangood:
/bin/rm -f make.log
@echo "Deleting *~ .#* core *.a *.sl *.o *.dep"
@find . \( -name \*~ -o -name .\#\* -o -name core \) \
-exec /bin/rm {} \; -print
@find . \( -name \*.a -o -name \*.sl -o -name \*.o -o -name \*.dep \) \
-exec /bin/rm {} \; -print
@if [ ! -d $(CONFIG_ARCH)/bin ] ; then true; \
else /bin/rm -r $(CONFIG_ARCH)/bin ; fi
@if [ ! -d $(CONFIG_ARCH)/lib ] ; then true; \
else /bin/rm -r $(CONFIG_ARCH)/lib ; fi
@grep "^#" ./build/Config.info > ./build/Config.info~~0; \
/bin/rm -f include/tauarch.h include/tau_config.h; \
/bin/mv ./build/Config.info~~0 ./build/Config.info
.RECURSIVE: ${SUBDIR}
${SUBDIR}: FRC
cd $@; $(MAKE) "MAKE=$(MAKE)" "CC=$(CC)" "CXX=$(CXX)" "LINKER=$(LINKER)" all
FRC:
validate:
@echo "Running TAU validation tests..."
./tau_validate --html --timeout 180 $(CONFIG_ARCH) > results.html
@echo "...done. Please see results.html for details."