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