1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
9 ############### no need to modify below this line #########
14 LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
16 CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
17 $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
19 $(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(LUA_CFLAGS) \
20 -D_U_="" -D_NEED_VAR_IMPORT_
22 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
25 $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
27 PLATFORM_SRC = capture-wpcap.c capture_wpcap_packet.c
29 include Makefile.common
31 wireshark_OBJECTS = $(wireshark_SOURCES:.c=.obj)
32 tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
33 dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
34 dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
35 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
41 wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
42 wsock32.lib user32.lib shell32.lib comctl32.lib \
45 !IFDEF ENABLE_LIBWIRESHARK
46 epan\libwireshark.lib \
48 epan\dissectors\dissectors.lib \
50 epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
57 tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
58 wsock32.lib user32.lib \
61 !IFDEF ENABLE_LIBWIRESHARK
62 epan\libwireshark.lib \
64 epan\dissectors\dissectors.lib \
66 epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
73 capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
74 wsock32.lib user32.lib \
77 editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
78 wsock32.lib user32.lib \
81 mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
82 wsock32.lib user32.lib \
85 dumpcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
86 wsock32.lib user32.lib \
89 dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
90 wsock32.lib user32.lib \
93 !IFDEF ENABLE_LIBWIRESHARK
94 epan\libwireshark.lib \
96 epan\dissectors\dissectors.lib \
98 epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
105 randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
110 EXECUTABLES=wireshark.exe wireshark-gtk2.exe tshark.exe \
111 capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe dumpcap.exe
113 RESOURCES=image\wireshark.res image\libwireshark.res image\tshark.res \
114 image\capinfos.res image\editcap.res image\mergecap.res \
115 image\text2pcap.res image\wiretap.res image\dumpcap.res
117 all: config.h tools image codecs wiretap epan $(EXECUTABLES) $(RESOURCES) doc install-deps
122 $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
126 separate_packaging: all
130 $(MAKE) /$(MAKEFLAGS) -f makefile.nmake GTK1_ONLY="USE"
133 $(MAKE) /$(MAKEFLAGS) -f makefile.nmake GTK2_ONLY="USE"
142 $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
147 # use (info-)zip from cygwin to pack things
149 rm -f wireshark-gtk1.zip
150 zip -r -9 wireshark-gtk1.zip $(INSTALL1_DIR)/*.*
152 # use (info-)zip from cygwin to pack things
154 rm -f wireshark-gtk2.zip
155 zip -r -9 wireshark-gtk2.zip $(INSTALL2_DIR)/*.*
157 packaging_zip: packaging_zip1 packaging_zip2
162 wiretap\wiretap-$(WTAP_VERSION).lib: image wiretap
167 wireshark.exe : config.h svnversion.h $(wireshark_OBJECTS) getopt.obj codecs epan gtk image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
170 /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj $(GTK1_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
177 wireshark-gtk2.exe : config.h svnversion.h $(wireshark_OBJECTS) getopt.obj codecs epan gtk2 image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk2.tmp\libui.lib plugins
180 /OUT:wireshark-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj $(GTK2_LIBS) codecs\codecs.lib gtk2.tmp\libui.lib $(wireshark_OBJECTS) image\wireshark.res
184 tshark.exe : config.h svnversion.h $(tshark_OBJECTS) getopt.obj epan image\tshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
187 /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj image\tshark.res
190 capinfos.exe : config.h capinfos.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
193 /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console capinfos.obj getopt.obj $(capinfos_LIBS) image\capinfos.res
196 editcap.exe : config.h editcap.obj getopt.obj strptime.obj epan\crypt-md5.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
199 /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj strptime.obj epan\crypt-md5.obj $(editcap_LIBS) image\editcap.res
202 mergecap.exe : config.h svnversion.h mergecap.obj merge.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
205 /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
208 text2pcap.exe : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
211 /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
214 dftest.exe : $(dftest_OBJECTS) epan
217 /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS)
220 randpkt.exe : $(randpkt_OBJECTS) getopt.obj
223 /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) getopt.obj
226 dumpcap.exe : config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj mkstemp.obj wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
229 /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) getopt.obj mkstemp.obj image\dumpcap.res
233 config.h : config.h.win32 config.nmake
234 sed -e s/@VERSION@/$(VERSION)/ \
235 -e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
236 -e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
237 -e "s/@HAVE_KFW@/$(KFW_CONFIG)/" \
238 -e "s/@HAVE_NETTLE@/$(NETTLE_CONFIG)/" \
239 -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
240 -e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
241 -e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
242 -e "s/@HAVE_PCAP_DATALINK_NAME_TO_VAL@/$(PCAP_DATALINK_NAME_TO_VAL_CONFIG)/" \
243 -e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
244 -e "s/@HAVE_PCAP_BREAKLOOP@/$(PCAP_BREAKLOOP_CONFIG)/" \
245 -e "s/@HAVE_LIBWIRESHARKDLL@/$(LIBWIRESHARK_CONFIG)/" \
246 -e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
247 -e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \
248 -e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \
249 -e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \
250 -e "s/@HAVE_LUA_5_1@/$(LUA_VERSION)/" \
251 -e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \
252 -e "s/@HAVE_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \
253 -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \
254 -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \
255 -e "s/@HAVE_NET_SNMP@/$(NET_SNMP_CONFIG)/" \
256 -e "s/@HAVE_SOME_SNMP@/$(SOME_SNMP_CONFIG)/" \
257 < config.h.win32 > $@
259 ps.c : rdps.exe print.ps
264 # Build the version string
266 !IF EXIST(".svn/entries")
267 SVNENTRIES = .svn/entries
271 svnversion.h: $(SVNENTRIES)
273 $(PERL) make-version.pl
276 # Build the short version of the authors file for the about dialog
278 AUTHORS-SHORT: AUTHORS make-authors-short.pl
279 $(PERL) perlnoutf.pl make-authors-short.pl < AUTHORS > AUTHORS-SHORT
282 # Build the short version of the authors file with formatting codes for
285 AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
286 $(PERL) perlnoutf.pl make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
289 # Build "tshark-tap-register.c", which contains a function
290 # "register_all_tap_listeners()"
291 # that calls the register routines for all tehtereal tap listeners.
293 # We do this by grepping through sources.
295 # Formatting conventions: The name of the tap_listener_register_*
296 # routines must start in column zero, or must be preceded only by
297 # "void " starting in column zero, and must not be inside #if.
299 # The first argument is the name of the file to write.
300 # The second argument is the directory in which the source files live.
301 # All subsequent arguments are the files to scan.
303 tshark-tap-register.c: $(TSHARK_TAP_SRC) make-tapreg-dotc
304 @echo Making tshark-tap-register.c
305 @$(SH) make-tapreg-dotc tshark-tap-register.c . $(TSHARK_TAP_SRC)
307 text2pcap-scanner.c : text2pcap-scanner.l
308 $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
312 if exist gtk2.tmp rmdir gtk2.tmp
314 clean: clean_gtk2.tmp clean-deps
315 rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(EXTRA_OBJECTS) \
316 $(EXECUTABLES) $(PDB_FILE) \
317 capinfos.obj editcap.obj mergecap.obj text2pcap.obj getopt.obj\
318 text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
319 rdps.pdb rdps.exe rdps.ilk config.h ps.c AUTHORS-SHORT \
320 AUTHORS-SHORT-FORMAT \
321 dftest.obj dftest.exe randpkt.obj randpkt.ext dumpcap.obj \
323 $(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll
325 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
328 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
330 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
332 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
334 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
336 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
338 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
340 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
342 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
344 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
346 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
348 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
351 # "distclean" removes all files not part of the distribution.
352 # It does not remove generated files that are part of the distribution.
354 rm -f config.h $(BUILT_SOURCES)
356 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
358 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
360 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
362 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
364 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
366 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
368 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
370 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
372 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
374 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
376 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
379 # Make "maintainer-clean" only if you would like to remove ALL generated
381 # Be sure to have python and perl installed to regenerate them.
382 maintainer-clean: distclean
383 rm -f $(GENERATED_FILES)
385 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
387 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
389 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
391 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
393 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
395 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
397 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
399 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
401 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
403 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
405 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
410 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
415 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
420 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
425 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
428 gtk:: help config.h svnversion.h AUTHORS-SHORT doxygen
430 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK1_CFLAGS)" GTK_LIBS="$(GTK1_LIBS)" libui.lib
433 # copy all required files to gtk2.tmp (but only when newer than existing) and compile in that dir
434 gtk2:: help config.h svnversion.h AUTHORS-SHORT
435 if not exist gtk2.tmp mkdir gtk2.tmp
438 xcopy Makefile.* ..\gtk2.tmp /d
439 xcopy *.c ..\gtk2.tmp /d
440 xcopy *.h ..\gtk2.tmp /d
442 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK2_CFLAGS)" GTK_LIBS="$(GTK2_LIBS)" libui.lib
445 epan:: $(RESOURCES) $(BUILT_SOURCES) doxygen
447 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
452 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
457 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
462 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
465 doxygen.cfg: config.nmake doxygen.cfg.in
466 sed -e s/@VERSION@/$(VERSION)/ \
467 < doxygen.cfg.in > $@
471 $(DOXYGEN) doxygen.cfg
474 doxygen: doxygen.cfg doxygen-run
476 ################################################################################
477 # Prepare build environment by downloading and installing required libraries
478 ################################################################################
480 # The required tools to build Wireshark.
482 # The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
483 # We only need the cygwin version (for some shell scripts).
484 # In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
502 @$(SH) tools\win32-setup.sh --appverify $(REQUIRED_TOOLS)
504 # Download and install all the required libraries into WIRESHARK_LIBS.
505 # If you used this setup target before, consider doing a clean_setup.
507 if not exist $(WIRESHARK_LIBS) md $(WIRESHARK_LIBS)
508 !IF "$(GTK2_INST_VERSION)" == "2.8"
509 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
510 glib gtk2.8/glib-2.12.4.zip
511 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
512 glib gtk2.8/glib-dev-2.12.4.zip
513 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
514 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
515 glib gtk2.6/glib-2.6.6.zip
516 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
517 glib gtk2.6/glib-dev-2.6.6.zip
518 !ELSEIF "$(GTK2_INST_VERSION)" == "2.4"
519 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
520 glib gtk2.4/glib-2.4.7.zip
521 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
522 glib gtk2.4/glib-dev-2.4.7.zip
524 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
525 glib glib-2.2.3-20040116.zip
526 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
527 glib glib-dev-2.2.3-20040116.zip
530 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
531 gtk+ gtk+-1.3.0-20030717.zip
532 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
533 gtk+ gtk+-dev-1.3.0-20030115.zip
535 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
536 libiconv-1.9.1.bin.woe32 libiconv-1.9.1.bin.woe32.zip
537 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
538 gettext-0.14.5 gettext-0.14.5.zip
540 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
544 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
548 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
552 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
553 . adns-1.0-win32-05.zip
556 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
557 pcre-6.4 pcre-6.4-bin.zip
558 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
559 pcre-6.4 pcre-6.4-lib.zip
562 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
563 zlib123-dll zlib123-dll.zip
566 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
570 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
574 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
575 . portaudio_v18_1.zip
579 !IF "$(GTK2_INST_VERSION)" == "2.8"
580 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
581 gtk2 gtk2.8/gtk+-2.8.20.zip
582 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
583 gtk2 gtk2.8/gtk+-dev-2.8.20.zip
584 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
585 gtk2 gtk2.8/cairo-1.2.6.zip
586 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
587 gtk2 gtk2.8/cairo-dev-1.2.6.zip
588 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
589 gtk2 gtk2.8/atk-1.10.3.zip
590 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
591 gtk2 gtk2.8/atk-dev-1.10.3.zip
592 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
593 gtk2 gtk2.8/libpng-1.2.8-bin.zip
594 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
595 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
596 gtk2 gtk2.6/gtk+-2.6.9.zip
597 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
598 gtk2 gtk2.6/gtk+-dev-2.6.9.zip
599 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
600 gtk2 gtk2.6/atk-1.9.0.zip
601 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
602 gtk2 gtk2.6/atk-dev-1.9.0.zip
603 !ELSEIF "$(GTK2_INST_VERSION)" == "2.4"
604 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
605 gtk2 gtk2.4/gtk+-2.4.14.zip
606 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
607 gtk2 gtk2.4/gtk+-dev-2.4.14.zip
608 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
609 gtk2 gtk2.4/atk-1.6.0.zip
610 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
611 gtk2 gtk2.4/atk-dev-1.6.0.zip
613 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
614 gtk2 gtk2/gtk+-2.2.4-20040124.zip
615 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
616 gtk2 gtk2/gtk+-dev-2.2.4-20040124.zip
617 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
618 gtk2 gtk2/atk-1.4.0.zip
619 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
620 gtk2 gtk2/atk-dev-1.4.0.zip
622 !IF "$(PANGO_INST_VERSION)" == "1.14"
623 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
624 gtk2 gtk2.8/pango-1.14.5.zip
625 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
626 gtk2 gtk2.8/pango-dev-1.14.5.zip
627 !ELSEIF "$(PANGO_INST_VERSION)" == "1.10"
628 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
629 gtk2 gtk2.8/pango-1.10.1.zip
630 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
631 gtk2 gtk2.8/pango-dev-1.10.1.zip
632 !ELSEIF "$(PANGO_INST_VERSION)" == "1.8"
633 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
634 gtk2 gtk2.6/pango-1.8.2.zip
635 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
636 gtk2 gtk2.6/pango-dev-1.8.2.zip
637 !ELSEIF "$(PANGO_INST_VERSION)" == "1.4"
638 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
639 gtk2 gtk2.4/pango-1.4.1.zip
640 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
641 gtk2 gtk2.4/pango-dev-1.4.1.zip
643 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
644 gtk2 gtk2/pango-1.2.5-20040124.zip
645 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
646 gtk2 gtk2/pango-dev-1.2.5-20040124.zip
650 @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
651 gtk-wimp gtk-wimp/gtk-wimp-0.7.0-bin.zip
654 @echo Wireshark is ready to build.
656 # Cleanup files installed by the setup target. It will not remove the
657 # downloaded zip files.
659 rm -r -f $(WIRESHARK_LIBS)/adns-1.0-win32-05
660 rm -r -f $(WIRESHARK_LIBS)/gettext-0.14.5
661 rm -r -f $(WIRESHARK_LIBS)/glib
662 rm -r -f $(WIRESHARK_LIBS)/gnutls-1.5.1-1
663 rm -r -f $(WIRESHARK_LIBS)/gtk2
664 rm -r -f $(WIRESHARK_LIBS)/gtk+
665 rm -r -f $(WIRESHARK_LIBS)/gtk-wimp
666 rm -r -f $(WIRESHARK_LIBS)/kfw-2.5
667 rm -r -f $(WIRESHARK_LIBS)/libiconv-1.9.1.bin.woe32
668 rm -r -f $(WIRESHARK_LIBS)/lua5.1
669 rm -r -f $(WIRESHARK_LIBS)/net-snmp-5.3.1
670 rm -r -f $(WIRESHARK_LIBS)/pcre-6.4
671 rm -r -f $(WIRESHARK_LIBS)/portaudio_v18_1
672 rm -r -f $(WIRESHARK_LIBS)/WpdPack
673 rm -r -f $(WIRESHARK_LIBS)/zlib123-dll
675 ################################################################################
676 # Prepare the debug trees for running Wireshark/Tshark from there.
677 ################################################################################
680 # generate and install Wireshark GTK1 in INSTALL1_DIR
681 debug-gtk1: wireshark.exe install-files1
683 # generate and install Wireshark GTK2 in INSTALL2_DIR
684 debug-gtk2: wireshark-gtk2.exe install-files2
686 # generate and install Wireshark GTK2 in INSTALL2_DIR
687 debug-tshark: tshark.exe
689 set INSTALL_DIR=$(INSTALL2_DIR)
690 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
693 # "install-deps" will copy all files needed to run Wwireshark/Tshark
694 # to the INSTALL1_DIR/INSTALL2_DIR, so you can run/debug Wireshark/Tshark from there.
696 install-deps: install-deps1 install-deps2 install-files1 install-files2
698 # install Wireshark GTK2 and other generated files
702 set INSTALL_DIR=$(INSTALL1_DIR)
703 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
704 xcopy wireshark.exe $(INSTALL1_DIR) /d
707 # install Wireshark GTK2 and other generated files
710 set INSTALL_DIR=$(INSTALL2_DIR)
711 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
712 copy wireshark-gtk2.exe $(INSTALL2_DIR)\wireshark.exe
713 if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL2_DIR) /d
716 install-common-files:
718 if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
719 !IFDEF ENABLE_LIBWIRESHARK
720 xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
722 xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
723 xcopy ".\epan\libwireshark.dll" $(INSTALL_DIR) /d
724 if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
725 if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL2_DIR) /d
726 if exist mergecap.exe xcopy mergecap.exe $(INSTALL2_DIR) /d
727 if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL2_DIR) /d
728 if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
729 if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
730 xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
731 xcopy ".\manuf" $(INSTALL_DIR) /d
732 xcopy ".\FAQ" $(INSTALL_DIR) /d
733 xcopy ".\README" $(INSTALL_DIR) /d
734 xcopy ".\README.win32" $(INSTALL_DIR) /d
735 xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
736 xcopy ".\COPYING" $(INSTALL_DIR) /d
737 copy ".\NEWS" $(INSTALL_DIR)\NEWS.txt
738 xcopy ".\cfilters" $(INSTALL_DIR) /d
739 xcopy ".\colorfilters" $(INSTALL_DIR) /d
740 xcopy ".\dfilters" $(INSTALL_DIR) /d
741 xcopy doc\*.html $(INSTALL_DIR) /d
742 !IFDEF ETHEREAL_EUG_DIR
743 xcopy $(ETHEREAL_EUG_DIR) $(INSTALL_DIR) /d
745 if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
746 xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
747 if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
748 xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
749 if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
750 echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
751 if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
752 xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
753 if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
754 xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
755 xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
756 if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
757 xcopy ".\plugins\agentx\agentx.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
758 xcopy ".\plugins\artnet\artnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
759 xcopy ".\plugins\asn1\asn1.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
760 xcopy ".\plugins\ciscosm\ciscosm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
761 xcopy ".\plugins\docsis\docsis.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
762 xcopy ".\plugins\enttec\enttec.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
763 xcopy ".\plugins\giop\coseventcomm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
764 xcopy ".\plugins\giop\cosnaming.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
765 xcopy ".\plugins\giop\parlay.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
766 xcopy ".\plugins\giop\tango.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
767 xcopy ".\plugins\gryphon\gryphon.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
768 xcopy ".\plugins\h223\h223.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
769 xcopy ".\plugins\irda\irda.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
770 xcopy ".\plugins\lwres\lwres.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
771 xcopy ".\plugins\mate\mate.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
772 xcopy ".\plugins\megaco\megaco.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
773 xcopy ".\plugins\mgcp\mgcp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
774 xcopy ".\plugins\opsi\opsi.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
775 xcopy ".\plugins\pcli\pcli.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
776 xcopy ".\plugins\profinet\profinet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
777 xcopy ".\plugins\rlm\rlm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
778 xcopy ".\plugins\rtnet\rtnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
779 xcopy ".\plugins\rudp\rudp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
780 xcopy ".\plugins\sbus\sbus.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
781 xcopy ".\plugins\stats_tree\stats_tree.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
782 xcopy ".\plugins\v5ua\v5ua.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
783 if exist custom-install.bat custom-install $(INSTALL_DIR) $(VERSION)
785 install-deps1: install-common-deps1
788 xcopy $(GTK1_DIR)\lib\libgtk-0.dll $(INSTALL1_DIR) /d
789 xcopy $(GTK1_DIR)\lib\libgdk-0.dll $(INSTALL1_DIR) /d
792 install-deps2: install-common-deps2
795 xcopy $(GTK2_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL2_DIR) /d
796 xcopy $(GTK2_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL2_DIR) /d
797 xcopy $(GTK2_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL2_DIR) /d
798 xcopy $(GTK2_DIR)\bin\libatk-1.0-0.dll $(INSTALL2_DIR) /d
799 xcopy $(GTK2_DIR)\bin\libpango-1.0-0.dll $(INSTALL2_DIR) /d
800 xcopy $(GTK2_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL2_DIR) /d
801 if not exist $(INSTALL2_DIR)\etc mkdir $(INSTALL2_DIR)\etc
802 if not exist $(INSTALL2_DIR)\etc\gtk-2.0 mkdir $(INSTALL2_DIR)\etc\gtk-2.0
803 if not exist $(INSTALL2_DIR)\etc\pango mkdir $(INSTALL2_DIR)\etc\pango
804 if not exist $(INSTALL2_DIR)\lib mkdir $(INSTALL2_DIR)\lib
805 if not exist $(INSTALL2_DIR)\lib\gtk-2.0 mkdir $(INSTALL2_DIR)\lib\gtk-2.0
806 if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR) mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)
807 if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders
808 if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules
809 # if not exist $(INSTALL2_DIR)\lib\pango mkdir $(INSTALL2_DIR)\lib\pango
810 # if not exist $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR) mkdir $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)
811 # if not exist $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules mkdir $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules
812 xcopy $(GTK2_DIR)\etc\gtk-2.0\*.* $(INSTALL2_DIR)\etc\gtk-2.0 /d
813 xcopy $(GTK2_DIR)\etc\pango\pango.* $(INSTALL2_DIR)\etc\pango /d
814 xcopy $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders\libpixbufloader-*.dll $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders /d
815 xcopy $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules\im-*.dll $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules /d
816 # xcopy $(GTK2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules\pango-*.dll $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules /d
817 !IFDEF NEED_LIBPNG_DLL
818 xcopy $(GTK2_DIR)\bin\libpng13.dll $(INSTALL2_DIR) /d
820 !IFDEF NEED_CAIRO_DLL
821 xcopy $(GTK2_DIR)\bin\libcairo-2.dll $(INSTALL2_DIR) /d
822 xcopy $(GTK2_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL2_DIR) /d
825 if not exist $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR) mkdir $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR)
826 xcopy "$(GTK_WIMP_DLLSRC_DIR)\libwimp.dll" $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR) /d
827 if not exist $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR) mkdir $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR)
828 xcopy "$(GTK_WIMP_RCSRC_DIR)\gtkrc" $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR) /d
832 install-common-deps1:
834 set INSTALL_DIR=$(INSTALL1_DIR)
835 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-deps
838 install-common-deps2:
840 set INSTALL_DIR=$(INSTALL2_DIR)
841 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-deps
846 if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
847 xcopy $(GLIB_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
848 xcopy $(GLIB_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
849 xcopy $(GLIB_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
850 xcopy $(ICONV_DIR)\bin\iconv.dll $(INSTALL_DIR) /d
851 xcopy $(GETTEXT_DIR)\bin\intl.dll $(INSTALL_DIR) /d
853 xcopy $(ZLIB_DIR)\zlib1.dll $(INSTALL_DIR) /d
856 xcopy $(ADNS_DIR)\adns_win32\LIB\adns_dll.dll $(INSTALL_DIR) /d
859 xcopy $(PCRE_DIR)\bin\pcre.dll $(INSTALL_DIR) /d
860 xcopy $(PCRE_DIR)\man\cat3\pcrepattern.3.txt $(INSTALL_DIR) /d
863 xcopy $(KFW_DIR)\bin\comerr32.dll $(INSTALL_DIR) /d
864 xcopy $(KFW_DIR)\bin\krb5_32.dll $(INSTALL_DIR) /d
867 xcopy $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(INSTALL_DIR) /d
868 xcopy $(GNUTLS_DIR)\bin\libgnutls-14.dll $(INSTALL_DIR) /d
869 xcopy $(GNUTLS_DIR)\bin\libgnutls-extra-14.dll $(INSTALL_DIR) /d
870 xcopy $(GNUTLS_DIR)\bin\libgnutls-openssl-14.dll $(INSTALL_DIR) /d
871 xcopy $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(INSTALL_DIR) /d
872 xcopy $(GNUTLS_DIR)\bin\libtasn1-3.dll $(INSTALL_DIR) /d
875 if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
876 if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
877 xcopy "$(NET_SNMP_DIR)\mibs\*.txt" $(INSTALL_DIR)\snmp\mibs /d
880 xcopy "$(LUA_DIR)\lib\dll\lua5.1.dll" $(INSTALL_DIR) /d
884 rm -rf $(INSTALL1_DIR)
886 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
890 rm -rf $(INSTALL2_DIR)
892 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
895 clean-deps: clean-deps1 clean-deps2