removed cvs log lines;
[dyninst.git] / paradyn / nmake.module.tmpl
1 #
2 # Common makefile template for paradyn.  This file is not intended to
3 # be a useful Makefile in isolation; instead, it should be included
4 # from within an architecture-specific Makefile.
5 #
6 # $Id: nmake.module.tmpl,v 1.4 2001/06/20 20:29:16 schendel Exp $
7 #
8
9 CFLAGS          = $(CFLAGS) $(TCLFRIENDLYWARNINGS)
10 #CXXFLAGS       = $(CXXFLAGS) $(TCLFRIENDLYWARNINGS) -DPCDEBUG
11 CXXFLAGS        = $(CXXFLAGS) $(TCLFRIENDLYWARNINGS) 
12 TFLAGS          = $(TFLAGS) $(TCLFRIENDLYWARNINGS)
13
14 TARGET        = paradyn.exe
15
16 DMSRCS  = ../src/DMthread/DMpublic.C \
17                 ../src/DMthread/DMdaemon.C \
18                 ../src/DMthread/DMmetric.C \
19                 ../src/DMthread/DMmain.C \
20                 ../src/DMthread/DMperfstream.C \
21                 ../src/DMthread/DMresource.C \
22                 ../src/DMthread/DMabstractions.C \
23                 ../src/DMthread/DMcritPath.C \
24                 ../src/DMthread/DMphase.C \
25                 ../src/DMthread/CallGraph.C \
26                 ../src/DMthread/MagnifyManager.C
27
28 MAINSRCS = ../src/pdMain/main.C  \
29                 ../src/pdMain/main-nt.C
30
31 VMSRCS  = ../src/VMthread/VMmain.C
32
33 VISISRCS        = ../src/VISIthread/VISIthreadmain.C \
34                 ../src/VISIthread/VISIthreadpublic.C
35
36 PCSRCS = ../src/PCthread/PCdata.C \
37                 ../src/PCthread/PCfocus.C \
38                 ../src/PCthread/PCsearch.C \
39                 ../src/PCthread/PCpublic.C \
40                 ../src/PCthread/PCmain.C \
41                 ../src/PCthread/PCconstants.C \
42                 ../src/PCthread/PCfilter.C \
43                 ../src/PCthread/PCmetric.C \
44                 ../src/PCthread/PCwhy.C \
45                 ../src/PCthread/PCexperiment.C \
46                 ../src/PCthread/PCrules.C \
47                 ../src/PCthread/PCshg.C \
48                 ../src/PCthread/PCmetricInst.C \
49                 ../src/PCthread/PCcostServer.C
50
51 UISRCS = ../src/UIthread/tclTunable.C \
52                 ../src/UIthread/Status.C \
53                 ../src/UIthread/uimpd.tcl.C \
54                 ../src/UIthread/UImain.C \
55                 ../src/UIthread/UIpublic.C \
56                 ../src/UIthread/UIwhere.C \
57                 ../src/UIthread/paradyn.tcl.C \
58                 ../src/UIthread/whereAxis.C \
59                 ../src/UIthread/abstractions.C \
60                 ../src/UIthread/where4treeConstants.C \
61                 ../src/UIthread/rootNode.C \
62                 ../src/UIthread/scrollbar.C \
63                 ../src/UIthread/whereAxisTcl.C \
64                 ../src/UIthread/shg.C \
65                 ../src/UIthread/shgRootNode.C \
66                 ../src/UIthread/shgPhases.C \
67                 ../src/UIthread/shgConsts.C \
68                 ../src/UIthread/shgTcl.C \
69                 ../src/UIthread/tkTools.C \
70                 ../src/UIthread/pdLogo.C \
71                 ../src/UIthread/callGraphConsts.C \
72                 ../src/UIthread/callGraphTcl.C \
73                 ../src/UIthread/callGraphDisplay.C \
74                 ../src/UIthread/callGraphRootNode.C \
75                 ../src/UIthread/callGraphs.C
76
77 TCSRCS  = ../src/TCthread/TCmain.C \
78                 ../src/TCthread/tunableConst.C
79
80 METSRCS = ../src/met/metMain.C \
81                 metParser.C \
82                 metScanner.C \
83                 ../src/met/metClass.C \
84                 ../src/met/mdl.C
85
86 TEMPLSRCS       = ../src/templatesIGENMDL.C  \
87                                 ../src/templatesDM.C  \
88                                 ../src/templatesPCV.C  \
89                                 ../src/templatesUI.C  \
90                                 ../src/templatesUIWASHG.C
91
92 SRCS         = $(SRCS) \
93                                 $(DMSRCS) \
94                                 $(MAINSRCS) \
95                                 $(VMSRCS) \
96                                 $(VISISRCS) \
97                                 $(PCSRCS) \
98                                 $(UISRCS) \
99                                 $(TCSRCS) \
100                                 $(METSRCS) \
101                                 $(TEMPLSRCS) \
102                                 $(TCL2C_GEN_SRCS)
103
104 # note that due to our use of the nmake macro substitution capability
105 # to define the IGEN_GEN_OBJS macro, we must capitalize the files
106 # in IGEN_GEN_SRCS carefully - make sure that the only .C (capital) is
107 # the one we want to replace.  This takes advantage of Windows using a
108 # case preserving but case insensitive filesystem.
109 #
110 IGEN_GEN_SRCS = dataManager.thread.C \
111                 dataManager.thread.clnt.C \
112                 dataManager.thread.srvr.C \
113                 performanceConsultant.thread.C \
114                 performanceConsultant.thread.clnt.C \
115                 performanceConsultant.thread.srvr.C \
116                 dyninstRPC.xdr.C \
117                 dyninstRPC.xdr.clnt.C \
118                 visi.xdr.clnt.C \
119                 visi.xdr.C \
120                 VISIthread.thread.C \
121                 VISIthread.thread.srvr.C \
122                 VISIthread.thread.clnt.C \
123                 UI.thread.C \
124                 UI.thread.clnt.C \
125                 UI.thread.srvr.C \
126                 VM.thread.C \
127                 VM.thread.srvr.C \
128                 VM.thread.clnt.C 
129
130         
131
132 IGEN_ISRCS    = dataManager.I \
133                 performanceConsultant.I \
134                 dyninstRPC.I \
135                 visi.I \
136                 VISIthread.I \
137                 UI.I \
138                 VM.I
139
140
141 TCL_SRCS        = ../tcl/applic.tcl \
142         ../tcl/errorList.tcl \
143         ../tcl/focusUtils.tcl \
144         ../tcl/generic.tcl \
145         ../tcl/mainMenu.tcl \
146         ../tcl/mets.tcl \
147         ../tcl/save.tcl \
148         ../tcl/shg.tcl \
149         ../tcl/startVisi.tcl \
150         ../tcl/status.tcl \
151         ../tcl/tclTunable.tcl \
152         ../tcl/uimProcs.tcl \
153         ../tcl/whereAxis.tcl \
154         ../tcl/callGraph.tcl
155
156                 
157 SRCS            = $(SRCS) $(TCL2C_GEN_SRCS)
158
159
160 IGEN_GEN_OBJS   = $(IGEN_GEN_SRCS:.C=.obj)
161 TCL2C_GEN_OBJS  = $(TCL2C_GEN_SRCS:.C=.obj)
162
163 # we use a two-step method to convert the Paradyn source specification
164 # to its object specification, because we can only substitute one
165 # section of the pathname at a time.  We remove the "../src/<dir>" prefix
166 # in the TMP_PD_OBJS macro, then conver the .C to a .obj in the PD_OBJS macro.
167 #
168 TMP_PD_OBJS     = $(MAINSRCS:../src/pdMain/=) \
169                         $(DMSRCS:../src/DMthread/=) \
170                         $(VMSRCS:../src/VMthread/=) \
171                         $(VISISRCS:../src/VISIthread/=) \
172                         $(PCSRCS:../src/PCthread/=) \
173                         $(UISRCS:../src/UIthread/=) \
174                         $(TCSRCS:../src/TCthread/=) \
175                         $(METSRCS:../src/met/=) \
176                         $(TEMPLSRCS:../src/=)
177 PD_OBJS         = $(TMP_PD_OBJS:.C=.obj)
178
179 OBJS            = $(OBJS) $(PD_OBJS) $(IGEN_GEN_OBJS) $(TCL2C_GEN_OBJS)
180
181 IFLAGS       = $(IFLAGS) -DPARADYN
182
183 LIBS         = $(LIBS) libpdthread.lib libpdutil.lib
184 SYSLIBS      = $(SYSLIBS) $(TCLTK_LIBS) $(X11_LIB) $(FLEX_LIB) $(RPC_LIB)
185
186 CFLAGS       = $(CFLAGS) -DNO_MDL_PRINT
187 CXXFLAGS     = $(CXXFLAGS) -DNO_MDL_PRINT
188 TFLAGS       = $(TFLAGS) -DNO_MDL_PRINT
189
190 all:    $(TARGET) 
191
192 $(TCL2C_GEN_SRCS):      $(TCL_SRCS)
193         $(PERL) $(TCL2C) $(TCL_SRCS) > $@
194
195 {..\src\pdMain\}.C{}.obj:
196         $(CXX) $(CXXFLAGS) -c $<
197
198 {..\src\DMthread\}.C{}.obj:
199         $(CXX) $(CXXFLAGS) -c $<
200
201 {..\src\VMthread\}.C{}.obj:
202         $(CXX) $(CXXFLAGS) -c $<
203
204 {..\src\VISIthread\}.C{}.obj:
205         $(CXX) $(CXXFLAGS) -c $<
206
207 {..\src\PCthread\}.C{}.obj:
208         $(CXX) $(CXXFLAGS) -c $<
209
210 {..\src\UIthread\}.C{}.obj:
211         $(CXX) $(CXXFLAGS) -c $<
212
213 {..\src\TCthread\}.C{}.obj:
214         $(CXX) $(CXXFLAGS) -c $<
215
216 {..\src\met\}.C{}.obj:
217         $(CXX) $(CXXFLAGS) -c $<
218
219 {..\src\}.C{}.obj:
220         $(CXX) $(CXXFLAGS) -c $<
221
222 dataManager.thread.C \
223         dataManager.thread.h \
224         dataManager.thread.CLNT.C \
225         dataManager.thread.CLNT.h \
226         dataManager.thread.SRVR.C \
227         dataManager.thread.SRVR.h:      ..\h\dataManager.I
228         igen -thread ../h/dataManager.I
229
230 performanceConsultant.thread.C \
231         performanceConsultant.thread.h \
232         performanceConsultant.thread.CLNT.C \
233         performanceConsultant.thread.CLNT.h \
234         performanceConsultant.thread.SRVR.C \
235         performanceConsultant.thread.SRVR.h:    ..\h\performanceConsultant.I
236         igen -thread ../h/performanceConsultant.I
237
238 dyninstRPC.xdr.C \
239         dyninstRPC.xdr.h \
240         dyninstRPC.xdr.CLNT.C \
241         dyninstRPC.xdr.CLNT.h \
242         dyninstRPC.xdr.SRVR.C \
243         dyninstRPC.xdr.SRVR.h:  ..\h\dyninstRPC.I
244         igen -xdr ../h/dyninstRPC.I
245
246 visi.xdr.C \
247         visi.xdr.h \
248         visi.xdr.CLNT.C \
249         visi.xdr.CLNT.h \
250         visi.xdr.SRVR.C \
251         visi.xdr.SRVR.h:        ..\..\visi\h\visi.I
252         igen -xdr ../../visi/h/visi.I
253
254 VISIthread.thread.C \
255         VISIthread.thread.h \
256         VISIthread.thread.CLNT.C \
257         VISIthread.thread.CLNT.h \
258         VISIthread.thread.SRVR.C \
259         VISIthread.thread.SRVR.h:       ..\h\VISIthread.I
260         igen -thread ../h/VISIthread.I
261
262 UI.thread.C \
263         UI.thread.h \
264         UI.thread.CLNT.C \
265         UI.thread.CLNT.h \
266         UI.thread.SRVR.C \
267         UI.thread.SRVR.h:       ..\h\UI.I
268         igen -thread ../h/UI.I
269
270 VM.thread.C \
271         VM.thread.h \
272         VM.thread.CLNT.C \
273         VM.thread.CLNT.h \
274         VM.thread.SRVR.C \
275         VM.thread.SRVR.h:       ..\h\VM.I
276         igen -thread ../h/VM.I
277
278 #
279 # note that we make an explicit rule for bison and flex
280 # bison includes the path of the input file in a comment,
281 # and VC++ doesn't like it as an escape sequence (even in a comment)
282 #
283 metParser.C:    ../src/met/metParser.y
284         $(YACC) $(YFLAGS) ../src/met/metParser.y
285         $(RM) $@
286         $(MV) y.tab.c $@
287
288 metScanner.C:   ../src/met/metScanner.l
289         $(LEX) -t $(LFLAGS) ../src/met/metScanner.l > $@
290