blob: 07f09fde06aa3c97f9a01d9660d9a59211508429 (
plain)
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.409 2004/03/02 18:55:30 ulfl Exp $
include config.nmake
include <win32.mak>
############### no need to modify below this line #########
CC = cl
LINK= link
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 \
$(ADNS_CFLAGS) $(PCRE_CFLAGS) -D_U_=""
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
PLATFORM_SRC = capture-wpcap.c
include Makefile.common
ethereal_OBJECTS = $(ethereal_SOURCES:.c=.obj)
tethereal_OBJECTS = $(tethereal_SOURCES:.c=.obj)
dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
EXTRA_OBJECTS = \
# snprintf.obj \
# strerror.obj \
mkstemp.obj \
strptime.obj
ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
# $(PCAP_DIR)\lib\wpcap.lib
tethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS)
mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS)
dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
wiretap\wiretap-$(WTAP_VERSION).lib \
$(GLIB_LIBS) \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
user32.lib \
$(GLIB_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
EXECUTABLES=ethereal.exe ethereal-gtk2.exe tethereal.exe editcap.exe mergecap.exe text2pcap.exe
RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res image\mergecap.res image\text2pcap.res
all: tools wiretap epan image $(EXECUTABLES) $(RESOURCES) doc
packaging: all
cd packaging
cd nsis
nmake -f makefile.nmake
cd ..
cd ..
seperate_packaging: all
cd packaging
cd nsis
!IFDEF GTK1_DIR
nmake -f makefile.nmake GTK1_ONLY="USE"
!ENDIF
!IFDEF GTK2_DIR
nmake -f makefile.nmake GTK2_ONLY="USE"
!ENDIF
cd ..
cd ..
$(RESOURCES): image
wiretap\wiretap-$(WTAP_VERSION).lib: wiretap
!IFNDEF GTK1_DIR
ethereal.exe :
!ELSE
ethereal.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk\libui.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:ethereal.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK1_LIBS) gtk\libui.lib $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
<<
!ENDIF
!IFNDEF GTK2_DIR
ethereal-gtk2.exe :
!ELSE
ethereal-gtk2.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk2 image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk2.tmp\libui.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:ethereal-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK2_LIBS) gtk2.tmp\libui.lib $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
<<
!ENDIF
tethereal.exe : config.h cvsversion.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) epan image\tethereal.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:tethereal.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tethereal_LIBS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) image\tethereal.res
<<
editcap.exe : config.h editcap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
@echo Linking $@
$(LINK) @<<
/OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj $(editcap_LIBS) image\editcap.res
<<
mergecap.exe : config.h cvsversion.h mergecap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
@echo Linking $@
$(LINK) @<<
/OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
<<
text2pcap.exe : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
@echo Linking $@
$(LINK) @<<
/OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
<<
dftest.exe : $(dftest_OBJECTS) $(EXTRA_OBJECTS)
$(LINK) @<<
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) $(EXTRA_OBJECTS)
<<
randpkt.exe : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
$(LINK) @<<
/OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS)
<<
config.h : config.h.win32 config.nmake
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
-e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
-e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
< config.h.win32 > $@
ps.c : rdps.exe print.ps
rdps print.ps ps.c
#
# Build the version string
#
cvsversion.h:
$(PERL) make-version.pl
#
# The header files listed here are built from x11-fields using Perl;
# we declare a dependency here so that they get built.
#
packet-x11.obj : packet-x11.c x11-declarations.h x11-register-info.h
#
# Build various header files for the X11 dissector.
#
x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
$(PERL) process-x11-fields.pl <x11-fields
packet-ncp2222.c : ncp2222.py
!IFDEF PYTHON
@echo Making packet-ncp2222.c
$(PYTHON) ncp2222.py -o packet-ncp2222.c
!ELSE
@echo Faking packet-ncp2222.c...
@echo Python is required to build the NCP disector
@echo Hiding packet-ncp.c...
mv packet-ncp.c packet-ncp.c.save
touch packet-ncp.c $@
!ENDIF
#
# Build "tethereal-tap-register.c", which contains a function
# "register_all_tap_listeners()"
# that calls the register routines for all tehtereal tap listeners.
#
# We do this by grepping through sources.
#
# Formatting conventions: The name of the tap_listener_register_*
# routines must start in column zero, or must be preceded only by
# "void " starting in column zero, and must not be inside #if.
#
# The first argument is the name of the file to write.
# The second argument is the directory in which the source files live.
# All subsequent arguments are the files to scan.
#
tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) make-tapreg-dotc
@echo Making tethereal-tap-register.c
@$(SH) make-tapreg-dotc tethereal-tap-register.c . $(TETHEREAL_TAP_SRC)
text2pcap-scanner.c : text2pcap-scanner.l
$(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
gtk2_distclean:
rm -f gtk2.tmp/*.*
if exist gtk2.tmp rmdir gtk2.tmp
clean: gtk2_distclean
rm -f $(ethereal_OBJECTS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) \
$(EXECUTABLES) $(PDB_FILE) \
editcap.obj mergecap.obj text2pcap.obj getopt.obj\
text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
rdps.pdb config.h ps.c \
rdps.exe rdps.ilk dftest.obj dftest.exe randpkt.obj randpkt.ext \
$(RESOURCES)
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../..
# Call distclean only, if you would like to remove ALL generated files.
# Be sure to have python and perl installed to regenerate them.
distclean: clean gtk2_distclean
rm -f $(BUILT_SOURCES) \
packet-ncp2222.c tethereal-tap-register.c
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../..
tools::
cd tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
image::
cd image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
wiretap::
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
gtk:: help config.h cvsversion.h
cd gtk
$(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK1_CFLAGS)" GTK_LIBS="$(GTK1_LIBS)" libui.lib
cd ..
# copy all required files to gtk2.tmp (but only when newer than existing) and compile in that dir
gtk2:: help config.h cvsversion.h
if not exist gtk2.tmp mkdir gtk2.tmp
cd gtk
cp --update --preserve Makefile.* *.c *.h ..\gtk2.tmp
cd ..\gtk2.tmp
$(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK2_CFLAGS)" GTK_LIBS="$(GTK2_LIBS)" libui.lib
cd ..
epan:: packet-ncp2222.c x11-declarations.h x11-register-info.h
cd epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
plugins::
cd plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
doc::
cd doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
help::
cd help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
|