-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile.win32
173 lines (126 loc) · 6.75 KB
/
Makefile.win32
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
# To use, do "nmake /f makefile.win32"
# To build tau_instrumentor you must have PDT
# use "nmake /f makefile.win32 "PDT=<path\to\pdt\>" tau_instrumentor
# (e.g. nmake /f makefile.win32 "PDT=c:\pdtoolkit" tau_instrumentor
# To build tau2vtf you must have libvtf3.lib
# use "nmake /f makefile.win32 "VTF=<path\to\libvtf3.lib> tau2vtf
# (e.g. nmake /f makefile.win32 "VTF=c:\" tau2vtf)
# To build dll's for use with java
# use "nmake /f makefile.win32 "JDK=<path\to\jdk> java
# (e.g. nmake /f makefile.win32 "JDK=c:\j2sdk1.4.2_05" java)
MPICFLAGS= /O2 /Gz /nologo /EHsc -I . -DPROFILING_ON -DTAU_WINDOWS
CFLAGS= $(CFLAGS) /O2 /Gd /nologo /TP /EHsc -I .
CC=cl
INCLUDES=-I./include -I../include -I./include/Profile -I"C:\Program Files\Microsoft Compute Cluster Pack\Include"
DEFINES=-DTAU_WINDOWS -DTAU_DOT_H_LESS_HEADERS -DTAU_LIBRARY_SOURCE -DTAU_DISABLE_SIGUSR -DTAU_SYNCHRONIZE_CLOCKS -DPDT_NO_UPC
#DEFINES=-DTAU_WINDOWS -DTAU_DOT_H_LESS_HEADERS -DTAU_LIBRARY_SOURCE -DTAU_DISABLE_SIGUSR -DTAU_MPI -DTAU_SYNCHRONIZE_CLOCKS
CFLAGS=$(CFLAGS) $(DEFINES) $(INCLUDES)
MPICFLAGS=$(MPICFLAGS) $(DEFINES) $(INCLUDES)
LD=link
LDFLAGS=
O=.obj
TAU_PROFILE_SRCS =\
src/Profile/FunctionInfo.cpp \
src/Profile/Profiler.cpp \
src/Profile/RtsLayer.cpp \
src/Profile/RtsThread.cpp \
src/Profile/TauCAPI.cpp \
src/Profile/TauCallPath.cpp \
src/Profile/TauCollate.cpp \
src/Profile/TauCompensate.cpp \
src/Profile/TauEnv.cpp \
src/Profile/TauFAPI.cpp \
src/Profile/TauHandler.cpp \
src/Profile/TauHooks.cpp \
src/Profile/TauInit.cpp \
src/Profile/TauIoWrap.cpp \
src/Profile/TauMapping.cpp \
src/Profile/TauMemory.cpp \
src/Profile/TauMetaData.cpp \
src/Profile/TauMetaDataMerge.cpp \
src/Profile/TauMetrics.cpp \
src/Profile/TauMonCommon.cpp \
src/Profile/TauMonMrnet.cpp \
src/Profile/TauProfileMerge.cpp \
src/Profile/TauReadMetrics.cpp \
src/Profile/TauSnapshot.cpp \
src/Profile/TauUtil.cpp \
src/Profile/TauXML.cpp \
src/Profile/Tracer.cpp \
src/Profile/UserEvent.cpp \
src/Profile/TauMmapMemMgr.cpp \
src/Profile/WindowsThreadLayer.cpp \
src/Profile/TauBfdUnimplemented.cpp
#TAU_PROFILE_SRCS= src\Profile\TauInit.cpp src\Profile\TauEnv.cpp src\profile\TauCallPath.cpp src\profile\FunctionInfo.cpp src\profile\Profiler.cpp src\profile\RtsLayer.cpp src\profile\RtsThread.cpp src\profile\TauCAPI.cpp src\profile\TauFAPI.cpp src\profile\TauHandler.cpp src\profile\TauHooks.cpp src\profile\TauMapping.cpp src\profile\TauMemory.cpp src\profile\UserEvent.cpp src\profile\WindowsThreadLayer.cpp src\profile\TauMetaData.cpp src\profile\TauMetrics.cpp src\profile\TauReadMetrics.cpp src\profile\Tracer.cpp src\profile\TauCompensate.cpp
TAU_JAVA_SRC= src\profile\JavaThreadLayer.cpp src\profile\TauJava.cpp src\profile\TauJAPI.cpp src\profile\MetaData.cpp
TAU_JAVA_SRC= src\profile\TauJAPI.cpp src\profile\TauJVMTI.cpp
TAU_JAVA_SRC_C= src\profile\agent_util.c src\profile\java_crw_demo.c src\profile\jdwp.c src\profile\ddm.c
TAU_MPI_SRC= src\profile\TauUnify.cpp src\profile\TauMpi.c src\profile\ClockSync.c src\profile\ProfileMerge.c
TAU_PROFILE_OBJS= $(TAU_PROFILE_SRCS:.cpp=.obj)
TAU_CALLPATH_OBJS= $(TAU_PROFILE_SRCS:.cpp=.obj)
TAU_JAVA_OBJS= $(TAU_JAVA_SRC:.cpp=.obj) $(TAU_JAVA_SRC_C:.c=.obj)
#TAU_MPI_OBJS= $(TAU_MPI_SRC:.c=.obj)
#all : win32 pprof tau_convert tau_merge tau_reduce libs mpi
all : win32 pprof tau_convert tau_reduce libs
#all : libs
java :
-mkdir win32\java
-del $(TAU_PROFILE_OBJS) $(TAU_JAVA_OBJS)
nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON -DJAVA /MT -I$(JDK)/include -I$(JDK)/include/win32" tau-profile.dll
-del win32\java\*.lib win32\java\*.exp
tau-profile.dll : $(TAU_PROFILE_OBJS) $(TAU_JAVA_OBJS)
link /dll /OUT:"win32\java\tau-profile.dll" $(TAU_PROFILE_OBJS) $(TAU_JAVA_OBJS) $(JDK)/lib/jvm.lib
libs : win32
-del $(TAU_PROFILE_OBJS)
nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON" tau-profile.lib
-del $(TAU_PROFILE_OBJS)
nmake /f Makefile.win32 "FLAGS = -DPROFILING_ON /MT" tau-profile-mt.lib
tau2vtf : win32\bin
$(CC) $(CFLAGS) -DTRACING_ON /o win32\bin\tau2vtf utils\tau2vtf.cpp src\TraceInput\TAU_tf.cpp src\TraceInput\TAU_tf_writer.cpp src\TraceInput\TAU_Cwrapper.cpp -Isrc\TraceInput -I$(VTF)/include /link $(VTF)\win32\lib\libvtf3.lib
tau_instrumentor : win32\bin
$(CC) $(CFLAGS) /o win32\bin\tau_instrumentor utils\tau_instrumentor.cpp utils\tau_instrument.cpp utils\tau_selective.cpp -I$(PDT)\ductape\inc /link $(PDT)\windows\lib\ductape.lib
win32\bin : win32
mkdir win32\bin
win32\lib : win32
mkdir win32\lib
win32 :
mkdir win32
copy tools\src\windows\etc\tau_config.h include
copy tools\src\windows\etc\tauarch.h include
copy tools\src\windows\trace_impl.h include
pprof : utils\function_data.cpp utils\pprof.cpp utils\user_event_data.cpp
$(CC) $(CFLAGS) /o win32\bin\pprof utils\function_data.cpp utils\pprof.cpp utils\user_event_data.cpp
tau_convert : utils\tau_convert.c
$(CC) $(CFLAGS) /o win32\bin\tau_convert utils\tau_convert.c
tau_merge : utils\tau_events.cpp utils\tau_merge.c utils\getopt.cpp
$(CC) $(CFLAGS) /o win32\bin\tau_merge utils\tau_events.cpp utils\tau_merge.c utils\getopt.cpp
tau_reduce : utils\tau_reduce.cpp utils\pprof_elem.cpp
$(CC) $(CFLAGS) /o win32\bin\tau_reduce utils\tau_reduce.cpp utils\pprof_elem.cpp
tau-profile.lib : $(TAU_PROFILE_OBJS)
lib /OUT:"win32\lib\tau-profile-static.lib" $(TAU_PROFILE_OBJS)
tau-profile-mt.lib : $(TAU_PROFILE_OBJS)
lib /OUT:"win32\lib\tau-profile-static-mt.lib" $(TAU_PROFILE_OBJS)
link /dll /def:utils\win32exports.def /OUT:win32\lib\tau-profile.dll $(TAU_PROFILE_OBJS)
tau-callpath.lib : $(TAU_CALLPATH_OBJS)
lib /OUT:"win32\lib\tau-callpath-static.lib" $(TAU_CALLPATH_OBJS)
tau-callpath-mt.lib : $(TAU_CALLPATH_OBJS)
lib /OUT:"win32\lib\tau-callpath-static-mt.lib" $(TAU_CALLPATH_OBJS)
link /dll /def:utils\win32exports.def /OUT:win32\lib\tau-callpath.dll $(TAU_CALLPATH_OBJS)
tau-trace.lib : $(TAU_TRACE_OBJS)
lib /OUT:"win32\lib\tau-trace-static.lib" $(TAU_TRACE_OBJS)
tau-trace-mt.lib : $(TAU_TRACE_OBJS)
lib /OUT:"win32\lib\tau-trace-static-mt.lib" $(TAU_TRACE_OBJS)
link /dll /def:utils\win32exports.def /OUT:win32\lib\tau-trace.dll $(TAU_TRACE_OBJS)
mpi : TauMpi.lib
TauMpi.obj: src\Profile\TauMpi.c
$(CC) $(FLAGS) $(MPICFLAGS) /Fo$@ -c src\Profile\TauMpi.c
ClockSync.obj: src\Profile\ClockSync.c
$(CC) $(FLAGS) $(MPICFLAGS) /Fo$@ -c src\Profile\ClockSync.c
ProfileMerge.obj: src\Profile\ProfileMerge.c
$(CC) $(FLAGS) $(MPICFLAGS) /Fo$@ -c src\Profile\ProfileMerge.c
TauUnify.obj: src\Profile\TauUnify.cpp
$(CC) $(FLAGS) $(MPICFLAGS) /Fo$@ -c src\Profile\ProfileMerge.c
TauMpi.lib : TauMpi.obj ClockSync.obj ProfileMerge.obj
lib /OUT:"win32\lib\TauMpi.lib" TauMpi.obj ClockSync.obj ProfileMerge.obj
.cpp.obj :
$(CC) $(FLAGS) $(CFLAGS) /Fo$@ -c $<