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