1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
4 # We "Deploy using XCopy," which is described at
5 # http://msdn.microsoft.com/en-us/library/ms235291.aspx
10 ############### no need to modify below this line #########
16 WIN_SETUP=tools/$(WIRESHARK_TARGET_PLATFORM)-setup.sh
19 # Checking that the Wireshark Libraries are up-to-date:
20 # 1. win??-setup.sh --checktag is invoked during nmake "preprocessing".
21 # If an error status is returned (ie: the libraries are not up-to-date)
22 # then CHECK_TAG is defined as a non-null string.
23 # 2. The $(LIBS_CHECK) target is invoked during the nmake:
24 # If $(CHECK_TAG) is non-null, then a "libraries not up to date" exit will occur.
25 # If $(CHECK_TAG) is null, but either config.nmake or Makefile.nmake
26 # are newer than the $(LIBS_CHECK) target, then a detailed verification
27 # as to the required library package files will be made.
29 LIBS_CHECK=_libs_check_
30 !IF [$(SH) $(WIN_SETUP) --checktag "$(WIRESHARK_LIB_DIR)"] != 0
37 LDFLAGS = /NOLOGO /INCREMENTAL:NO $(LOCAL_LDFLAGS)
39 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
42 /I. /Iwiretap $(GLIB_CFLAGS) \
43 $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
44 $(C_ARES_CFLAGS) $(ADNS_CFLAGS) $(GNUTLS_CFLAGS) \
45 $(SMI_CFLAGS) $(GEOIP_CFLAGS) $(WINSPARKLE_CFLAGS)
47 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
50 $(CC) $(CFLAGS) -Fd.\ -c $<
54 capture_wpcap_packet.c \
57 include Makefile.common
59 wireshark_OBJECTS = $(WIRESHARK_COMMON_SRC:.c=.obj)
60 tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
61 tfshark_OBJECTS = $(tfshark_SOURCES:.c=.obj)
62 rawshark_OBJECTS = $(rawshark_SOURCES:.c=.obj)
63 ###text2pcap_OBJECTS = $(text2pcap_SOURCES:.c=.obj)
64 mergecap_OBJECTS = $(mergecap_SOURCES:.c=.obj)
65 editcap_OBJECTS = $(editcap_SOURCES:.c=.obj)
66 capinfos_OBJECTS = $(capinfos_SOURCES:.c=.obj)
67 captype_OBJECTS = $(captype_SOURCES:.c=.obj)
68 dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
69 dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
70 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
73 # psapi.lib see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
76 wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
77 wsock32.lib user32.lib shell32.lib comctl32.lib ole32.lib psapi.lib \
80 wsutil\libwsutil.lib \
83 !IFDEF ENABLE_LIBWIRESHARK
84 epan\libwireshark.lib \
86 epan\dissectors\dissectors.lib \
88 epan\crypt\airpdcap.lib \
89 epan\dfilter\dfilter.lib \
90 epan\ftypes\ftypes.lib \
96 tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
97 wsock32.lib user32.lib psapi.lib \
100 wsutil\libwsutil.lib \
102 !IFDEF ENABLE_LIBWIRESHARK
103 epan\libwireshark.lib \
105 epan\dissectors\dissectors.lib \
107 epan\crypt\airpdcap.lib \
108 epan\dfilter\dfilter.lib \
109 epan\ftypes\ftypes.lib \
115 tfshark_LIBS= filetap\filetap-$(FTAP_VERSION).lib \
116 wiretap\wiretap-$(WTAP_VERSION).lib \
117 wsock32.lib user32.lib psapi.lib \
120 wsutil\libwsutil.lib \
122 !IFDEF ENABLE_LIBWIRESHARK
123 epan\libwireshark.lib \
125 epan\dissectors\dissectors.lib \
127 epan\dfilter\dfilter.lib \
128 epan\ftypes\ftypes.lib \
132 rawshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
133 wsock32.lib user32.lib psapi.lib \
135 wsutil\libwsutil.lib \
137 !IFDEF ENABLE_LIBWIRESHARK
138 epan\libwireshark.lib \
140 epan\dissectors\dissectors.lib \
142 epan\crypt\airpdcap.lib \
143 epan\dfilter\dfilter.lib \
144 epan\ftypes\ftypes.lib \
150 capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
151 wsock32.lib user32.lib shell32.lib \
152 wsutil\libwsutil.lib \
156 captype_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
157 wsock32.lib user32.lib shell32.lib \
158 wsutil\libwsutil.lib \
161 editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
162 wsock32.lib user32.lib shell32.lib \
163 wsutil\libwsutil.lib \
166 mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
167 wsock32.lib user32.lib \
168 wsutil\libwsutil.lib \
171 reordercap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
172 wsock32.lib user32.lib \
173 wsutil\libwsutil.lib \
177 wsock32.lib user32.lib \
178 wsutil\libwsutil.lib \
182 wsock32.lib user32.lib \
183 wsutil\libwsutil.lib \
187 dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
188 wsock32.lib user32.lib psapi.lib \
190 wsutil\libwsutil.lib \
192 !IFDEF ENABLE_LIBWIRESHARK
193 epan\libwireshark.lib \
195 epan\dissectors\dissectors.lib \
197 epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
204 randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
206 wsutil\libwsutil.lib \
209 EXECUTABLES=wireshark.exe tshark.exe tfshark.exe rawshark.exe \
210 capinfos.exe captype.exe editcap.exe mergecap.exe text2pcap.exe \
211 randpkt.exe reordercap.exe dumpcap.exe dftest.exe
214 EXECUTABLES=$(EXECUTABLES) qtshark.exe
217 RESOURCES=image\wireshark.res image\file_dlg_win32.res \
218 image\libwireshark.res image\tshark.res image\tfshark.res image\capinfos.res \
219 image\captype.res image\editcap.res image\mergecap.res \
220 image\text2pcap.res image\wiretap.res image\filetap.res image\dumpcap.res \
221 image\rawshark.res image\reordercap.res image\libwsutil.res
224 all: $(LIBS_CHECK) config.h ui\qt\config.pri tools image codecs $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil wiretap filetap epan $(EXECUTABLES) wireshark.bsc $(RESOURCES) help install-all
230 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
235 @echo \? NSIS not available (MAKENSIS not defined in config.nmake)
244 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
249 # use (info-)zip from cygwin to pack things
252 xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)
255 @echo Including vcredist_$(TARGET_MACHINE).exe -- your recipient may need to run it!
256 xcopy "$(VCREDIST_EXE)" $(INSTALL_DIR)
259 zip -r -9 wireshark.zip $(INSTALL_DIR)/
261 !IFDEF WIRESHARK_GENERATE_BSC_FILE
262 # Note: Certain .sbr files cause bscmake warning "too many references... ignoring ..."
263 # XXX: It seems that using .bsc files with VS2010 doesn't work (isn't supported ?)
264 # Using .bsc files with VS2008 may work
265 # See: http://ask.wireshark.org/questions/8660/wireshark-building-and-debugging-on-visual-c-or-visual-studio
272 epan\dissectors\*.sbr \
277 plugins\docsis\*.sbr \
278 plugins\ethercat\*.sbr \
279 plugins\gryphon\*.sbr \
283 plugins\opcua\*.sbr \
284 plugins\profinet\*.sbr \
285 plugins\stats_tree\*.sbr \
286 plugins\unistim\*.sbr \
287 plugins\wimax\*.sbr \
288 plugins\wimaxasncp\*.sbr \
289 plugins\wimaxmacphy\*.sbr \
305 rm -f ../[Ww]ireshark-pdb-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).zip
306 zip -9 ../Wireshark-pdb-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).zip *.pdb *.lib
311 ## Note: The proper "SUBSYSTEM" link option to be used for linking each of the Wireshark executables
312 ## is specified in '$(guiflags)' or '$(conflags)' as used as part of the link options.
313 ## (These variables (as well as '$(guilibsdll)' and '$(conlibsdll)') are defined in win32.mak).
314 filetap\filetap-$(FTAP_VERSION).lib: image $(ZLIB_DLL) filetap
315 wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
317 wireshark.exe : $(LIBS_CHECK) config.h $(wireshark_OBJECTS) codecs epan ui gtk win32 image\wireshark.res image\file_dlg_win32.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib ui\libui.lib ui\gtk\libgtkui.lib ui\win32\libgtkui_win32.lib plugins
320 /OUT:$(PROGRAM_NAME).exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(wireshark_LIBS) $(GTK_LIBS) codecs\codecs.lib ui\gtk\libgtkui.lib ui\win32\libgtkui_win32.lib ui\libui.lib $(wireshark_OBJECTS) image\wireshark.res image\file_dlg_win32.res
322 !IFDEF MANIFEST_INFO_REQUIRED
323 mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:$(PROGRAM_NAME).exe;1
326 qtshark.exe : install-generated-files $(LIBS_CHECK) config.h epan ui qt wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
328 tshark.exe : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan ui cli image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
331 /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tshark_LIBS) $(tshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tshark.res
333 !IFDEF MANIFEST_INFO_REQUIRED
334 mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
337 tfshark.exe : $(LIBS_CHECK) config.h $(tfshark_OBJECTS) epan ui cli image\tfshark.res wsutil\libwsutil.lib filetap\filetap-$(FTAP_VERSION).lib plugins
340 /OUT:tfshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tfshark_LIBS) $(tfshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tfshark.res
342 !IFDEF MANIFEST_INFO_REQUIRED
343 mt.exe -nologo -manifest "tfshark.exe.manifest" -outputresource:tfshark.exe;1
346 rawshark.exe : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan ui image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
349 /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(rawshark_LIBS) $(rawshark_OBJECTS) ui\libui.lib image\rawshark.res
351 !IFDEF MANIFEST_INFO_REQUIRED
352 mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
355 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
356 capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
359 /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(capinfos_OBJECTS) $(capinfos_LIBS) setargv.obj image\capinfos.res
361 !IFDEF MANIFEST_INFO_REQUIRED
362 mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
365 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
366 captype.exe : $(LIBS_CHECK) config.h $(captype_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\captype.res
369 /OUT:captype.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(captype_OBJECTS) $(captype_LIBS) setargv.obj image\captype.res
371 !IFDEF MANIFEST_INFO_REQUIRED
372 mt.exe -nologo -manifest "captype.exe.manifest" -outputresource:captype.exe;1
375 editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
378 /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(editcap_OBJECTS) $(editcap_LIBS) image\editcap.res
380 !IFDEF MANIFEST_INFO_REQUIRED
381 mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
384 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
385 mergecap.exe : $(LIBS_CHECK) config.h $(mergecap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
388 /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(mergecap_OBJECTS) $(mergecap_LIBS) image\mergecap.res
390 !IFDEF MANIFEST_INFO_REQUIRED
391 mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
394 reordercap.exe : $(LIBS_CHECK) config.h reordercap.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\reordercap.res
397 /OUT:reordercap.exe $(conflags) $(conlibsdll) $(LDFLAGS) reordercap.obj $(reordercap_LIBS) setargv.obj image\reordercap.res
399 !IFDEF MANIFEST_INFO_REQUIRED
400 mt.exe -nologo -manifest "reordercap.exe.manifest" -outputresource:reordercap.exe;1
403 text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj pcapio.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\text2pcap.res
406 /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) text2pcap.obj text2pcap-scanner.obj pcapio.obj $(text2pcap_LIBS) image\text2pcap.res
408 !IFDEF MANIFEST_INFO_REQUIRED
409 mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
412 dftest.exe : $(dftest_OBJECTS) epan ui
415 /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(dftest_LIBS) ui\libui.lib $(dftest_OBJECTS)
417 !IFDEF MANIFEST_INFO_REQUIRED
418 mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
421 randpkt.exe : $(randpkt_OBJECTS)
424 /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(randpkt_LIBS) $(randpkt_OBJECTS)
426 !IFDEF MANIFEST_INFO_REQUIRED
427 mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
430 dumpcap.exe : $(LIBS_CHECK) config.h $(dumpcap_OBJECTS) wsutil\libwsutil.lib image\dumpcap.res
433 /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(dumpcap_LIBS) $(dumpcap_OBJECTS) image\dumpcap.res
435 !IFDEF MANIFEST_INFO_REQUIRED
436 mt.exe -nologo -manifest "dumpcap.exe.manifest" -outputresource:dumpcap.exe;1
440 config.h : config.h.win32 config.nmake
441 sed -e s/@VERSION@/$(VERSION)/ \
442 -e s/@VERSION_MAJOR@/$(VERSION_MAJOR)/ \
443 -e s/@VERSION_MINOR@/$(VERSION_MINOR)/ \
444 -e s/@VERSION_MICRO@/$(VERSION_MICRO)/ \
445 -e "s/@HAVE_C_ARES@/$(C_ARES_CONFIG)/" \
446 -e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
447 -e "s/@HAVE_KFW@/$(KFW_CONFIG)/" \
448 -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
449 -e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
450 -e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
451 -e "s/@HAVE_PCAP_DATALINK_NAME_TO_VAL@/$(PCAP_DATALINK_NAME_TO_VAL_CONFIG)/" \
452 -e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
453 -e "s/@HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION@/$(PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG)/" \
454 -e "s/@HAVE_PCAP_BREAKLOOP@/$(PCAP_BREAKLOOP_CONFIG)/" \
455 -e "s/@HAVE_REMOTE@/$(PCAP_HAVE_REMOTE_CONFIG)/" \
456 -e "s/@HAVE_PCAP_REMOTE@/$(PCAP_REMOTE_CONFIG)/" \
457 -e "s/@HAVE_PCAP_OPEN@/$(PCAP_OPEN_CONFIG)/" \
458 -e "s/@HAVE_PCAP_OPEN_DEAD@/$(PCAP_OPEN_DEAD_CONFIG)/" \
459 -e "s/@HAVE_PCAP_LIST_DATALINKS@/$(PCAP_LIST_DATALINKS_CONFIG)/" \
460 -e "s/@HAVE_PCAP_FREE_DATALINKS@/$(PCAP_FREE_DATALINKS_CONFIG)/" \
461 -e "s/@HAVE_PCAP_SET_DATALINK@/$(PCAP_SET_DATALINK_CONFIG)/" \
462 -e "s/@HAVE_PCAP_SETSAMPLING@/$(PCAP_SETSAMPLING_CONFIG)/" \
463 -e "s/@HAVE_BPF_IMAGE@/$(BPF_IMAGE_CONFIG)/" \
464 -e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \
465 -e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \
466 -e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \
467 -e "s/@HAVE_LUA@/$(LUA_VERSION)/" \
468 -e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \
469 -e "s/@HAVE_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \
470 -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \
471 -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \
472 -e "s/@HAVE_SMI@/$(SMI_CONFIG)/" \
473 -e "s/@HAVE_GEOIP@/$(GEOIP_CONFIG)/" \
474 -e "s/@HAVE_GEOIP_V6@/$(GEOIP_V6_CONFIG)/" \
475 -e "s/@HAVE_SOFTWARE_UPDATE@/$(WINSPARKLE_CONFIG)/" \
476 -e "s/@INET6@/$(INET6_CONFIG)/" \
477 -e "s/@HAVE_NTDDNDIS_H@/$(NTDDNDIS_CONFIG)/" \
478 -e "s/@PCAP_NG_DEFAULT@/$(PCAP_NG_DEFAULT)/" \
479 -e "s/@WANT_PACKET_EDITOR@/$(WANT_PACKET_EDITOR)/" \
480 < config.h.win32 > $@
482 ui\qt\config.pri: config.nmake Makefile.nmake
483 @echo Creating <<ui\qt\config.pri
484 # Automatically generated from Makefile.nmake. Edit there, not here.
485 # qmake apparently requires a three-part numeric VERSION.
486 PROGRAM_NAME = $(PROGRAM_NAME)
487 VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
488 VERSION_FULL = $(VERSION)
489 WTAP_VERSION = $(WTAP_VERSION)
490 INSTALL_DIR = $(INSTALL_DIR)
491 !IFDEF MANIFEST_INFO_REQUIRED
492 CONFIG += wireshark_manifest_info_required
495 CONFIG += wireshark_use_kfw
497 WIRESHARK_LIB_DIR = $(WIRESHARK_LIB_DIR:\=/)
498 GLIB_DIR = $(GTK_DIR:\=/)
499 C_ARES_DIR = $(C_ARES_DIR:\=/)
500 ZLIB_DIR = $(ZLIB_DIR:\=/)
501 GNUTLS_DIR = $(GNUTLS_DIR:\=/)
502 SMI_DIR = $(SMI_DIR:\=/)
503 KFW_DIR = $(KFW_DIR:\=/)
504 LUA_DIR = $(LUA_DIR:\=/)
505 GEOIP_DIR = $(GEOIP_DIR:\=/)
506 WINSPARKLE_DIR = $(WINSPARKLE_DIR:\=/)
508 INTL_DLL = $(INTL_DLL)
510 guilibsdll = $(guilibsdll)
512 HHC_LIBS = $(HHC_LIBS)
517 MSVC_VARIANT = $(MSVC_VARIANT)
518 MSVCR_DLL = "$(MSVCR_DLL:\=/)"
520 QMAKE_CFLAGS *= $(STANDARD_CFLAGS)
521 # NOMINMAX keeps windows.h from defining "min" and "max" via windef.h.
522 # This avoids conflicts with the C++ standard library.
523 QMAKE_CXXFLAGS *= $(STANDARD_CFLAGS) /DNOMINMAX
524 QMAKE_LFLAGS *= /LARGEADDRESSAWARE $(LDFLAGS)
529 # Build the version string
531 # XXX - Makefile.am uses FORCE for this.
532 !IF EXIST(".git/index")
533 GITINDEX = .git/index
534 !ELSE IF EXIST(".svn/wc.db")
535 GITINDEX = .svn/wc.db
536 !ELSE IF EXIST(".svn/entries")
537 GITINDEX = .svn/entries
541 version.h: $(GITINDEX)
543 $(PERL) make-version.pl
546 text2pcap-scanner.c : text2pcap-scanner.l
547 $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
549 text2pcap-scanner.obj : text2pcap-scanner.c
550 $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $?
553 # The following targets will rebuild their respective objs
554 # if and when version.h should change.
556 text2pcap.obj mergecap.obj capinfos.obj captype.obj editcap.obj reordercap.obj version_info.obj: version.h
560 rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(tfshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
561 $(EXECUTABLES) *.pdb *.sbr *.exe.manifest \
562 capinfos.obj capinfos.exp capinfos.lib \
563 captype.obj captype.exp captype.lib \
564 editcap.obj editcap.exp editcap.lib \
565 mergecap.obj text2pcap.obj \
566 reordercap.obj nio-ie5.obj update.obj \
567 text2pcap-scanner.obj text2pcap-scanner.c \
568 config.h ps.c $(LIBS_CHECK) \
569 dftest.obj dftest.exe randpkt.obj randpkt.exe \
571 $(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll \
574 rm -rf $(INSTALL_DIR)
575 rm -rf wireshark-qt-release
579 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
581 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
583 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
585 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
587 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
589 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
591 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
597 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
599 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
601 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
603 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
605 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
607 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
609 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
611 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
613 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
615 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
616 cd ../portableapps/win32
617 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
620 # "distclean" removes all files not part of the distribution.
621 # It does not remove generated files that are part of the distribution.
622 distclean-local: clean-local
624 rm -f $(ADNS_DLL) $(ADNS_LIBS)
627 rm -f $(ZLIB_DLL) $(ZLIB_DIR)\zlib1.dll.manifest \
628 $(ZLIB_DIR)\include\zlib.h $(ZLIB_DIR)\include\zconf.h \
629 $(ZLIB_DIR)\lib\zdll.lib
631 rm -f config.h $(BUILT_SOURCES) wireshark-pdb*.zip
633 distclean: distclean-local
635 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
637 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
639 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
641 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
643 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
645 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
651 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
653 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
655 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
657 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
659 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
661 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
663 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
665 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
667 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
669 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
670 cd ../portableapps/win32
671 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
674 # Make "maintainer-clean" only if you would like to remove ALL generated
676 # Be sure to have python and perl installed to regenerate them.
677 maintainer-clean-local: distclean-local
678 rm -f $(GENERATED_FILES)
680 maintainer-clean: maintainer-clean-local
682 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
684 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
686 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
688 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
690 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
692 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
698 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
700 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
702 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
704 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
706 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
708 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
710 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
712 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
714 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
716 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
717 cd ../portableapps/win32
718 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
723 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
728 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
732 # MSVC variants supported by Wireshark have to avoid indirectly using msvcrt.dll,
733 # therefore compile the adns dll from source ADNS_DIR package.
734 # To avoid path problems, copy the adns sources to a temp dir,
735 # compile and copy the resulting files back to (source) ADNS_DIR
738 # - we need to "patch" adns_dll.rep and adns_dll.rc (at least for MSVC2005EE)
741 xcopy $(ADNS_DIR) adns.tmp /D /I /E /Y
742 copy adns_dll.dep adns.tmp\adns_win32\adns_dll
743 copy adns_dll.rc adns.tmp\adns_win32\adns_dll
744 cd adns.tmp\adns_win32\adns_dll
745 set CFG=adns_dll - Win32 Release
746 $(MAKE) /$(MAKEFLAGS) -f adns_dll.mak LOC="$(LOCAL_CFLAGS)"
748 !IFDEF MANIFEST_INFO_REQUIRED
749 mt.exe -nologo -manifest "adns_dll.dll.manifest" -outputresource:adns_dll.dll;2
751 if not exist "$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns" mkdir "$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns"
752 copy adns_dll.dll $(ADNS_DLL)
753 copy adns_dll.lib $(ADNS_LIBS)
759 # MSVC variants supported by Wireshark have to avoid indirectly using msvcrt.dll,
760 # therefore compile the zlib dll from source ZLIB_DIR package.
761 # To avoid path problems, copy the zlib sources to a temp dir,
762 # compile and copy the resulting files back to (source) ZLIB_DIR
764 xcopy $(ZLIB_DIR) zlib.tmp /D /I /E /Y
766 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
767 $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj"
769 $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll AS=ml64 LOC="-DASMV -DASMINF" OBJA="inffasx64.obj gvmat64.obj inffas8664.obj"
771 if not exist $(ZLIB_DIR) mkdir $(ZLIB_DIR)
772 if not exist $(ZLIB_DIR)\lib mkdir $(ZLIB_DIR)\lib
773 if not exist $(ZLIB_DIR)\include mkdir $(ZLIB_DIR)\include
774 !IFDEF MANIFEST_INFO_REQUIRED
775 mt.exe -nologo -manifest "zlib1.dll.manifest" -outputresource:zlib1.dll;2
777 copy zlib1.dll $(ZLIB_DIR)
778 copy zdll.lib $(ZLIB_DIR)\lib
779 copy zconf.h $(ZLIB_DIR)\include
780 copy zlib.h $(ZLIB_DIR)\include
787 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
792 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
797 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
802 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
805 ui:: help config.h version.h doxygen
807 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
810 gtk:: help config.h version.h doxygen
812 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui.lib
815 # The Visual C++ static analyzer currently fails with error C2171
816 # when compiling summary_dialog.cpp. If/when this ever gets fixed
817 # we can remove the ENABLE_CODE_ANALYSIS check.
818 qt:: help config.h version.h doxygen
821 $(QT5_BASE_DIR)\bin\qmake CONFIG+=release QtShark.pro
822 !IFDEF ENABLE_CODE_ANALYSIS
832 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui_win32.lib
835 cli:: help config.h version.h doxygen
837 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libcliui.lib
840 epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib filetap\filetap-$(FTAP_VERSION).lib $(BUILT_SOURCES) doxygen
842 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
847 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
852 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
857 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
862 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
865 doxygen.cfg: config.nmake doxygen.cfg.in
866 sed -e s/@VERSION@/$(VERSION)/ \
867 < doxygen.cfg.in > $@
871 $(DOXYGEN) doxygen.cfg
874 doxygen: doxygen.cfg doxygen-run
876 services: tools\make-services.py
877 $(PYTHON) tools/make-services.py
879 ################################################################################
880 # Prepare build environment by downloading and installing required libraries
881 ################################################################################
883 # The required tools to build Wireshark.
885 # The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
886 # We only need the cygwin version (for some shell scripts).
887 # In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
892 !IFDEF MANIFEST_INFO_REQUIRED
900 --cygwinonly /usr/bin/find \
905 --windowsonly $(QT5_BASE_DIR)\bin\qmake \
912 # As win-setup.sh assumes the dir exists create it if it doesn't
913 @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
914 @$(SH) $(WIN_SETUP) --appverify $(REQUIRED_TOOLS)
916 # Targets and etc used to verify or download libraries
918 !IFNDEF WIN_SETUP_OPT
919 WIN_SETUP_OPT=--download
922 # Verify that the required library 'package' (zip) files have been downloaded.
923 # (It seems reasonable to assume that if the files have been downloaded
924 # then they have been installed).
926 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN_SETUP_OPT=--libverify process_libs
928 # Verify library packages:
929 # If $(CHECK_TAG) is non-null then checktag failed; Exit with an error message. (See beginning of this Makefile).
930 # Otherwise do detailed library package files verification only if Makefile.nmake or config.make have been updated
931 # (or dummy file doesn't exist because of 'make clean' or whatever).
932 # Note that the creation/modification time of a file after a git pull of that file
933 # is the time of the update (not the time of the file in the repository).
934 # touch is only called if libverify succeeds.
935 $(LIBS_CHECK): $(CHECK_TAG) config.nmake Makefile.nmake
936 @echo Verifying library package files ...
937 @$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN_SETUP_OPT=--libverify process_libs
940 # Target for "checktag failed" (libraries not up to date).
941 # Defined only if "checktag" failed (see beginning of this Makefile).
942 !IF "$(CHECK_TAG)" != ""
943 $(CHECK_TAG): _FORCE_
944 @echo \? Wireshark Libraries not up-to-date \?
945 @echo \? Do you need to run "nmake -f Makefile.nmake setup" \?
951 # Download (if needed) and install all the required libraries into WIRESHARK_LIB_DIR.
952 # A clean_setup is done first to ensure that the target dirs don't
953 # contain old files remaining from a previous setup run.
954 setup: verify_tools clean_setup process_libs
957 $(SH) $(WIN_SETUP) --download "C:\Qt" \
958 . Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws.zip
960 # The process_libs target when invoked causes either a --libverify or a --download for all the required libraries.
961 # (The choice is determined by the value of the macro WIN_SETUP_OPT).
963 @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
964 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
965 . WinPcap_$(WINPCAP_VERSION).exe
967 !MESSAGE Can't find Qt. This will become a problem at some point.
970 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
971 "$(GTK_NAME)" gtk+-bundle_$(GTK_PKG)_$(WIRESHARK_TARGET_PLATFORM)$(PKG_SUFIX).zip
974 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
975 . kfw-3-2-2-i386-ws-vc6.zip
976 # @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
980 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
981 . WpdPack_$(WPD_VERSION).zip
984 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
985 AirPcap_Devpack_4_1_0_1622 AirPcap_Devpack_4_1_0_1622.zip
988 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
989 . c-ares-$(C_ARES_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
992 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
993 . adns-1.0-win32-05ws.zip
996 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
997 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
998 zlib125 zlib-1.2.5.zip
1000 zlib125 zlib125ws.zip
1004 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1005 lua5.2.3 lua$(LUA_DIST)_lib.zip
1009 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1010 . gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1012 !IFDEF PORTAUDIO_DIR
1013 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1014 . portaudio_v19_2.zip
1017 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1018 . libsmi-$(SMI_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1021 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1022 GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1024 !IFDEF WINSPARKLE_DIR
1025 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1026 . WinSparkle-$(WINSPARKLE_PKG).zip
1029 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1030 user-guide user-guide-52567.zip
1033 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1037 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1038 . nasm-2.09.08-win32.zip
1040 !IF "$(WIN_SETUP_OPT)" == "--download"
1041 @$(SH) $(WIN_SETUP) --settag "$(WIRESHARK_LIB_DIR)"
1044 @echo Wireshark is ready to build.
1046 # Cleanup files installed by the setup target. It will not remove the
1047 # downloaded zip files.
1048 # WHEN UPDATING LIBRARY VERSIONS, KEEP ALSO ONE FORMER VERSION SO
1049 # UPDATING REMOVES THE FORMER USER DIRS
1051 cd "$(WIRESHARK_LIB_DIR)"
1052 rm -r -f adns-1.0-win32-05ws
1053 rm -r -f c-ares-1.5.3ws
1054 rm -r -f c-ares-1.6.0ws
1055 rm -r -f c-ares-1.7.0-win??ws
1056 rm -r -f c-ares-1.7.1-win??ws
1057 rm -r -f c-ares-1.9.1-1-win??ws
1058 rm -r -f gettext-0.14.5
1059 rm -r -f gettext-runtime-0.17
1060 rm -r -f gettext-runtime-0.17-1
1061 rm -r -f gettext-0.17-1 # win64
1063 rm -r -f gnutls-2.8.1-1
1064 rm -r -f gnutls-2.8.5-*-win??ws
1065 rm -r -f gnutls-2.10.3-*-win??ws
1066 rm -r -f gnutls-2.12.18-*-win??ws
1067 rm -r -f gnutls-3.1.22-*-win??ws
1068 !IF "$(GTK_NAME)" == "gtk2"
1076 rm -r -f kfw-3-2-2-final
1077 rm -r -f kfw-3.2.2-ws1
1078 rm -r -f kfw-3-2-2-i386-ws-vc6
1079 rm -r -f libiconv-1.9.1.bin.woe32
1083 rm -r -f libsmi-0.4.5
1084 rm -r -f libsmi-0.4.8
1085 rm -r -f libsmi-svn-40773-win??ws
1088 rm -r -f nasm-2.09.08
1091 rm -r -f portaudio_v19
1092 rm -r -f portaudio_v19_2
1099 rm -r -f zlib123-dll
1100 rm -r -f AirPcap_Devpack_1_0_0_594
1101 rm -r -f AirPcap_Devpack_4_0_0_1480
1102 rm -r -f AirPcap_Devpack_4_1_0_1622
1103 rm -r -f GeoIP-1.4.5ws
1104 rm -r -f GeoIP-1.4.6-win??ws
1105 rm -r -f GeoIP-1.4.8-win??ws
1106 rm -r -f GeoIP-1.4.8-*-win??ws
1107 rm -r -f GeoIP-1.5.1-*-win??ws
1108 rm -r -f WinSparkle-0.3-44-g2c8d9d3-win??ws
1112 ################################################################################
1113 # Prepare the debug trees for running Wireshark/Tshark from there.
1114 ################################################################################
1117 # prepare debugging of Wireshark in INSTALL_DIR
1118 debug-wireshark: wireshark.exe install-generated-files
1120 # prepare debugging of tshark in INSTALL_DIR
1121 debug-tshark: tshark.exe install-generated-files
1123 # prepare debugging of tfshark in INSTALL_DIR
1124 debug-tfshark: tfshark.exe install-generated-files
1126 # prepare debugging of rawshark in INSTALL_DIR
1127 debug-rawshark: rawshark.exe install-generated-files
1129 # prepare debugging of dumpcap in INSTALL_DIR
1130 debug-dumpcap: dumpcap.exe install-generated-files
1133 # install generated files (exe, "our" libs, ...)
1134 install-generated-files: doc
1136 if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
1137 !IF DEFINED (MSVCR_DLL) && "$(MSVC_VARIANT)" == "MSVC2008"
1138 xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)\*.* /d
1140 !IFDEF ENABLE_LIBWIRESHARK
1141 xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
1142 if exist epan\libwireshark.lib xcopy .\epan\libwireshark.lib $(INSTALL_DIR) /d
1143 if exist epan\libwireshark.pdb xcopy .\epan\libwireshark.pdb $(INSTALL_DIR) /d
1145 xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
1146 if exist ".\wiretap\wiretap-$(WTAP_VERSION).lib" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).lib" $(INSTALL_DIR) /d
1147 if exist ".\wiretap\wiretap-$(WTAP_VERSION).pdb" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).pdb" $(INSTALL_DIR) /d
1148 xcopy ".\filetap\filetap-$(FTAP_VERSION).dll" $(INSTALL_DIR) /d
1149 if exist ".\filetap\filetap-$(FTAP_VERSION).lib" xcopy ".\filetap\filetap-$(FTAP_VERSION).lib" $(INSTALL_DIR) /d
1150 if exist ".\filetap\filetap-$(FTAP_VERSION).pdb" xcopy ".\filetap\filetap-$(FTAP_VERSION).pdb" $(INSTALL_DIR) /d
1151 xcopy ".\wsutil\libwsutil.dll" $(INSTALL_DIR) /d
1152 if exist ".\wsutil\libwsutil.lib" xcopy ".\wsutil\libwsutil.lib" $(INSTALL_DIR) /d
1153 if exist ".\wsutil\libwsutil.pdb" xcopy ".\wsutil\libwsutil.pdb" $(INSTALL_DIR) /d
1154 if exist $(PROGRAM_NAME).exe xcopy $(PROGRAM_NAME).exe $(INSTALL_DIR) /d
1155 if exist $(PROGRAM_NAME).pdb xcopy $(PROGRAM_NAME).pdb $(INSTALL_DIR) /d
1156 if exist $(PROGRAM_NAME).bsc xcopy $(PROGRAM_NAME).bsc $(INSTALL_DIR) /d
1157 if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL_DIR) /d
1158 if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
1159 if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
1160 if exist captype.exe xcopy captype.exe $(INSTALL_DIR) /d
1161 if exist captype.pdb xcopy captype.pdb $(INSTALL_DIR) /d
1162 if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL_DIR) /d
1163 if exist dumpcap.pdb xcopy dumpcap.pdb $(INSTALL_DIR) /d
1164 if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
1165 if exist editcap.pdb xcopy editcap.pdb $(INSTALL_DIR) /d
1166 if exist mergecap.exe xcopy mergecap.exe $(INSTALL_DIR) /d
1167 if exist mergecap.pdb xcopy mergecap.pdb $(INSTALL_DIR) /d
1168 if exist randpkt.exe xcopy randpkt.exe $(INSTALL_DIR) /d
1169 if exist randpkt.pdb xcopy randpkt.pdb $(INSTALL_DIR) /d
1170 if exist reordercap.exe xcopy reordercap.exe $(INSTALL_DIR) /d
1171 if exist reordercap.pdb xcopy reordercap.pdb $(INSTALL_DIR) /d
1172 if exist rawshark.exe xcopy rawshark.exe $(INSTALL_DIR) /d
1173 if exist rawshark.pdb xcopy rawshark.pdb $(INSTALL_DIR) /d
1174 if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL_DIR) /d
1175 if exist text2pcap.pdb xcopy text2pcap.pdb $(INSTALL_DIR) /d
1176 if exist tfshark.exe xcopy tfshark.exe $(INSTALL_DIR) /d
1177 if exist tfshark.pdb xcopy tfshark.pdb $(INSTALL_DIR) /d
1178 if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
1179 if exist tshark.pdb xcopy tshark.pdb $(INSTALL_DIR) /d
1180 xcopy "doc\AUTHORS-SHORT" $(INSTALL_DIR) /d
1181 xcopy ".\manuf" $(INSTALL_DIR) /d
1182 xcopy ".\services" $(INSTALL_DIR) /d
1183 xcopy ".\pdml2html.xsl" $(INSTALL_DIR) /d
1184 $(TEXTIFY) "./COPYING" $(INSTALL_DIR)
1185 $(TEXTIFY) "./NEWS" $(INSTALL_DIR)
1186 $(TEXTIFY) "./README" $(INSTALL_DIR)
1187 $(TEXTIFY) "./README.windows" $(INSTALL_DIR)
1188 xcopy ".\cfilters" $(INSTALL_DIR) /d
1189 xcopy ".\colorfilters" $(INSTALL_DIR) /d
1190 xcopy ".\dfilters" $(INSTALL_DIR) /d
1191 xcopy ".\smi_modules" $(INSTALL_DIR) /d
1193 xcopy ".\epan\wslua\init.lua" $(INSTALL_DIR) /d
1194 xcopy ".\epan\wslua\console.lua" $(INSTALL_DIR) /d
1196 xcopy ipmap.html $(INSTALL_DIR) /d
1197 xcopy doc\*.html $(INSTALL_DIR) /d
1198 if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
1199 xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
1200 # you can't reliably use xcopy to rename files "on the fly" (so copy first, then rename)
1201 xcopy ".\help\faq.txt" $(INSTALL_DIR) /d
1202 $(UNIX2DOS) $(INSTALL_DIR)/help/*.txt
1203 if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
1204 xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
1205 if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
1206 echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
1207 if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
1208 xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
1209 if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
1210 xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
1211 xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
1212 if not exist $(INSTALL_DIR)\tpncp mkdir $(INSTALL_DIR)\tpncp
1213 xcopy ".\tpncp\*.dat" $(INSTALL_DIR)\tpncp /d
1214 if not exist $(INSTALL_DIR)\wimaxasncp mkdir $(INSTALL_DIR)\wimaxasncp
1215 xcopy ".\wimaxasncp\*.*" $(INSTALL_DIR)\wimaxasncp /d
1216 if not exist $(INSTALL_DIR)\plugins mkdir $(INSTALL_DIR)\plugins
1217 if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
1219 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-plugins
1221 if not exist $(INSTALL_DIR)\profiles mkdir $(INSTALL_DIR)\profiles
1222 if not exist $(INSTALL_DIR)\profiles\Bluetooth mkdir $(INSTALL_DIR)\profiles\Bluetooth
1223 xcopy ".\profiles\Bluetooth\colorfilters" $(INSTALL_DIR)\profiles\Bluetooth /d
1224 if not exist $(INSTALL_DIR)\profiles\Classic mkdir $(INSTALL_DIR)\profiles\Classic
1225 xcopy ".\profiles\Classic\colorfilters" $(INSTALL_DIR)\profiles\Classic /d
1227 # "install-all" will copy all files needed to run Wireshark/Tshark
1228 # to the INSTALL_DIR, so you can run/debug Wireshark/Tshark from there.
1229 install-all: install-generated-files
1231 if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
1232 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1233 xcopy $(GTK_DIR)\bin\libgdk-3-0.dll $(INSTALL_DIR) /d
1234 xcopy $(GTK_DIR)\bin\libgtk-3-0.dll $(INSTALL_DIR) /d
1236 xcopy $(GTK_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL_DIR) /d
1237 xcopy $(GTK_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL_DIR) /d
1239 xcopy $(GTK_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL_DIR) /d
1240 xcopy $(GTK_DIR)\bin\libatk-1.0-0.dll $(INSTALL_DIR) /d
1241 xcopy $(GTK_DIR)\bin\libpango-1.0-0.dll $(INSTALL_DIR) /d
1242 xcopy $(GTK_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL_DIR) /d
1243 if not exist $(INSTALL_DIR)\lib mkdir $(INSTALL_DIR)\lib
1244 if not exist $(INSTALL_DIR)\etc mkdir $(INSTALL_DIR)\etc
1245 if not exist $(INSTALL_DIR)\$(GTK_ETC_DIR) mkdir $(INSTALL_DIR)\$(GTK_ETC_DIR)
1246 xcopy $(GTK_DIR)\$(GTK_ETC_DIR)\*.* $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1247 # if not exist $(INSTALL_DIR)\etc\pango mkdir $(INSTALL_DIR)\etc\pango
1248 # xcopy $(GTK_DIR)\etc\pango\pango.* $(INSTALL_DIR)\etc\pango /d
1249 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1250 if not exist $(INSTALL_DIR)\lib\gtk-3.0 mkdir $(INSTALL_DIR)\lib\gtk-3.0
1251 if not exist $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR)
1252 xcopy ".\ui\win32\settings.ini" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1254 if not exist $(INSTALL_DIR)\lib\gtk-2.0 mkdir $(INSTALL_DIR)\lib\gtk-2.0
1255 if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)
1256 if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders
1257 if exist $(GTK_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders xcopy $(GTK_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders\libpixbufloader-*.dll $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders /d
1259 !IFDEF GTK_ENGINES_DIR
1260 if not exist $(INSTALL_DIR)\$(GTK_ENGINES_DIR) mkdir $(INSTALL_DIR)\$(GTK_ENGINES_DIR)
1261 xcopy $(GTK_DIR)\$(GTK_ENGINES_DIR)\libpixmap.dll $(INSTALL_DIR)\$(GTK_ENGINES_DIR) /d
1262 xcopy $(GTK_DIR)\$(GTK_ENGINES_DIR)\libwimp.dll $(INSTALL_DIR)\$(GTK_ENGINES_DIR) /d
1264 !IFDEF GTK_THEMES_DIR
1265 xcopy "$(GTK_DIR)\$(GTK_THEMES_DIR)\gtkrc" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1267 !IFDEF GTK_MODULES_DIR
1268 if not exist $(INSTALL_DIR)\$(GTK_MODULES_DIR) mkdir $(INSTALL_DIR)\$(GTK_MODULES_DIR)
1269 xcopy $(GTK_DIR)\$(GTK_MODULES_DIR)\libgail.dll $(INSTALL_DIR)\$(GTK_MODULES_DIR) /d
1271 !IFDEF NEED_CAIRO_GOBJECT_DLL
1272 xcopy $(GTK_DIR)\bin\libcairo-gobject-2.dll $(INSTALL_DIR) /d
1274 !IFDEF NEED_CAIRO_DLL
1275 xcopy $(GTK_DIR)\bin\libcairo-2.dll $(INSTALL_DIR) /d
1276 xcopy $(GTK_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL_DIR) /d
1278 !IFDEF NEED_EXPAT_DLL
1279 xcopy $(GTK_DIR)\bin\$(EXPAT_DLL) $(INSTALL_DIR) /d
1282 xcopy $(GTK_DIR)\bin\$(FFI_DLL) $(INSTALL_DIR) /d
1284 !IFDEF NEED_FONTCONFIG_DLL
1285 xcopy $(GTK_DIR)\bin\$(FONTCONFIG_DLL) $(INSTALL_DIR) /d
1287 !IFDEF NEED_FREETYPE_DLL
1288 xcopy $(GTK_DIR)\bin\libpangoft2-1.0-0.dll $(INSTALL_DIR) /d
1289 xcopy $(GTK_DIR)\bin\$(FREETYPE_DLL) $(INSTALL_DIR) /d
1291 !IFDEF NEED_HARFBUZZ_DLL
1292 xcopy $(GTK_DIR)\bin\$(HARFBUZZ_DLL) $(INSTALL_DIR) /d
1294 !IFDEF NEED_JASPER_DLL
1295 xcopy $(GTK_DIR)\bin\$(JASPER_DLL) $(INSTALL_DIR) /d
1297 !IFDEF NEED_JPEG_DLL
1298 xcopy $(GTK_DIR)\bin\$(JPEG_DLL) $(INSTALL_DIR) /d
1300 !IFDEF NEED_LZMA_DLL
1301 xcopy $(GTK_DIR)\bin\$(LZMA_DLL) $(INSTALL_DIR) /d
1303 !IFDEF NEED_PIXMAN_DLL
1304 xcopy $(GTK_DIR)\bin\$(PIXMAN_DLL) $(INSTALL_DIR) /d
1307 xcopy $(GTK_DIR)\bin\$(PNG_DLL) $(INSTALL_DIR) /d
1310 xcopy $(GTK_DIR)\bin\$(SEH_DLL) $(INSTALL_DIR) /d
1312 !IFDEF NEED_SJLJ_DLL
1313 xcopy $(GTK_DIR)\bin\$(SJLJ_DLL) $(INSTALL_DIR) /d
1315 !IFDEF NEED_TIFF_DLL
1316 xcopy $(GTK_DIR)\bin\$(TIFF_DLL) $(INSTALL_DIR) /d
1319 xcopy $(GTK_DIR)\bin\$(XML_DLL) $(INSTALL_DIR) /d
1321 !IFDEF GTK_SCHEMAS_DIR
1322 if not exist $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR) mkdir $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR)
1323 if not exist $(GTK_DIR)\$(GTK_SCHEMAS_DIR)\gschemas.compiled $(GTK_DIR)\bin\glib-compile-schemas $(GTK_DIR)\$(GTK_SCHEMAS_DIR)
1324 xcopy $(GTK_DIR)\$(GTK_SCHEMAS_DIR)\gschemas.compiled $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR) /d
1326 xcopy $(GTK_DIR)\bin\libgio-2.0-0.dll $(INSTALL_DIR) /d
1327 xcopy $(GTK_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
1328 xcopy $(GTK_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
1329 xcopy $(GTK_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
1330 xcopy $(GTK_DIR)\bin\libgthread-2.0-0.dll $(INSTALL_DIR) /d
1331 xcopy $(GTK_DIR)\bin\$(INTL_DLL) $(INSTALL_DIR) /d
1333 xcopy $(ZLIB_DLL) $(INSTALL_DIR) /d
1336 xcopy $(C_ARES_DLL) $(INSTALL_DIR) /d
1339 xcopy $(ADNS_DLL) $(INSTALL_DIR) /d
1342 xcopy $(KFW_PATH)\comerr32.dll $(INSTALL_DIR) /d
1343 xcopy $(KFW_PATH)\krb5_32.dll $(INSTALL_DIR) /d
1344 xcopy $(KFW_PATH)\k5sprt32.dll $(INSTALL_DIR) /d
1347 xcopy $(GNUTLS_DIR)\bin\libffi-6.dll $(INSTALL_DIR) /d
1348 xcopy $(GNUTLS_DIR)\bin\$(GCC_DLL) $(INSTALL_DIR) /d
1349 xcopy $(GNUTLS_DIR)\bin\libgcrypt-20.dll $(INSTALL_DIR) /d
1350 xcopy $(GNUTLS_DIR)\bin\libgmp-10.dll $(INSTALL_DIR) /d
1351 xcopy $(GNUTLS_DIR)\bin\libgnutls-28.dll $(INSTALL_DIR) /d
1352 xcopy $(GNUTLS_DIR)\bin\$(GPGERROR_DLL) $(INSTALL_DIR) /d
1353 xcopy $(GNUTLS_DIR)\bin\libhogweed-2-4.dll $(INSTALL_DIR) /d
1354 xcopy $(GNUTLS_DIR)\bin\libnettle-4-6.dll $(INSTALL_DIR) /d
1355 xcopy $(GNUTLS_DIR)\bin\libp11-kit-0.dll $(INSTALL_DIR) /d
1356 xcopy $(GNUTLS_DIR)\bin\libtasn1-6.dll $(INSTALL_DIR) /d
1357 ! IF "$(INTL_DLL)" != "libintl-8.dll"
1358 # The gtk+ bundle doesn't provide libintl-8.dll (which is the case
1359 # with the 32-bit package); use the GNUTLS version.
1360 xcopy $(GNUTLS_DIR)\bin\libintl-8.dll $(INSTALL_DIR) /d
1364 xcopy "$(LUA_DIR)\lua52.dll" $(INSTALL_DIR) /d
1367 if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
1368 if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
1369 xcopy "$(SMI_DIR)\bin\libsmi-2.dll" $(INSTALL_DIR) /d
1370 xcopy "$(SMI_DIR)\share\mibs\iana\*" $(INSTALL_DIR)\snmp\mibs /d
1371 xcopy "$(SMI_DIR)\share\mibs\ietf\*" $(INSTALL_DIR)\snmp\mibs /d
1372 xcopy "$(SMI_DIR)\share\mibs\irtf\*" $(INSTALL_DIR)\snmp\mibs /d
1373 xcopy "$(SMI_DIR)\share\mibs\site\*" $(INSTALL_DIR)\snmp\mibs /d
1374 xcopy "$(SMI_DIR)\share\mibs\tubs\*" $(INSTALL_DIR)\snmp\mibs /d
1375 xcopy "$(SMI_DIR)\share\pibs\*" $(INSTALL_DIR)\snmp\mibs /d
1376 xcopy "$(SMI_DIR)\share\yang\*.yang" $(INSTALL_DIR)\snmp\mibs /d
1379 xcopy "$(GEOIP_DIR)\bin\libGeoip-1.dll" $(INSTALL_DIR) /d
1381 !IFDEF WINSPARKLE_DIR
1382 xcopy "$(WINSPARKLE_DIR)\WinSparkle.dll" $(INSTALL_DIR) /d
1385 peflags --dynamicbase=true --nxcompat=true *.dll
1386 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1388 peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/*/engines/*.dll
1389 peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/modules/*.dll
1394 $(PERL) tools/checkAPIs.pl -build \
1395 $(WIRESHARK_COMMON_SRC) \
1397 # $(EXTRA_wireshark_SOURCES)
1399 checkapi: checkapi_local
1401 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1403 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1405 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1407 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1409 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1411 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1413 ## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1415 ## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1417 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1419 ## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1421 ## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1423 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1426 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1428 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1431 _FORCE_: ## Assumption: no file named _FORCE_ exists in the current directory