1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
6 # We "Deploy using XCopy," which is described at
7 # http://msdn.microsoft.com/en-us/library/ms235291.aspx
12 ############### no need to modify below this line #########
18 WIN_SETUP=tools/$(WIRESHARK_TARGET_PLATFORM)-setup.sh
21 # Checking that the Wireshark Libraries are up-to-date:
22 # 1. win??-setup.sh --checktag is invoked during nmake "preprocessing".
23 # If an error status is returned (ie: the libraries are not up-to-date)
24 # then CHECK_TAG is defined as a non-null string.
25 # 2. The $(LIBS_CHECK) target is invoked during the nmake:
26 # If $(CHECK_TAG) is non-null, then a "libraries not up to date" exit will occur.
27 # If $(CHECK_TAG) is null, but either config.nmake or Makefile.nmake
28 # are newer than the $(LIBS_CHECK) target, then a detailed verification
29 # as to the required library package files will be made.
31 LIBS_CHECK=_libs_check_
32 !IF [$(SH) $(WIN_SETUP) --checktag "$(WIRESHARK_LIB_DIR)"] != 0
39 LDFLAGS = /NOLOGO /INCREMENTAL:NO $(LOCAL_LDFLAGS)
41 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
44 /I. /Iwiretap $(GLIB_CFLAGS) \
45 $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
46 $(C_ARES_CFLAGS) $(ADNS_CFLAGS) $(GNUTLS_CFLAGS) \
47 $(PYTHON_CFLAGS) $(SMI_CFLAGS) $(GEOIP_CFLAGS) $(WINSPARKLE_CFLAGS)
49 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
52 $(CC) $(CFLAGS) -Fd.\ -c $<
56 capture_wpcap_packet.c \
59 include Makefile.common
61 wireshark_OBJECTS = $(WIRESHARK_COMMON_SRC:.c=.obj)
62 tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
63 tfshark_OBJECTS = $(tfshark_SOURCES:.c=.obj)
64 rawshark_OBJECTS = $(rawshark_SOURCES:.c=.obj)
65 ###text2pcap_OBJECTS = $(text2pcap_SOURCES:.c=.obj)
66 mergecap_OBJECTS = $(mergecap_SOURCES:.c=.obj)
67 editcap_OBJECTS = $(editcap_SOURCES:.c=.obj)
68 capinfos_OBJECTS = $(capinfos_SOURCES:.c=.obj)
69 captype_OBJECTS = $(captype_SOURCES:.c=.obj)
70 dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
71 dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
72 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
75 # psapi.lib see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
78 wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
79 wsock32.lib user32.lib shell32.lib comctl32.lib ole32.lib psapi.lib \
82 wsutil\libwsutil.lib \
86 !IFDEF ENABLE_LIBWIRESHARK
87 epan\libwireshark.lib \
89 epan\dissectors\dissectors.lib \
91 epan\crypt\airpdcap.lib \
92 epan\dfilter\dfilter.lib \
93 epan\ftypes\ftypes.lib \
99 tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
100 wsock32.lib user32.lib psapi.lib \
103 wsutil\libwsutil.lib \
106 !IFDEF ENABLE_LIBWIRESHARK
107 epan\libwireshark.lib \
109 epan\dissectors\dissectors.lib \
111 epan\crypt\airpdcap.lib \
112 epan\dfilter\dfilter.lib \
113 epan\ftypes\ftypes.lib \
119 tfshark_LIBS= filetap\filetap-$(FTAP_VERSION).lib \
120 wiretap\wiretap-$(WTAP_VERSION).lib \
121 wsock32.lib user32.lib psapi.lib \
124 wsutil\libwsutil.lib \
127 !IFDEF ENABLE_LIBWIRESHARK
128 epan\libwireshark.lib \
130 epan\dissectors\dissectors.lib \
132 epan\dfilter\dfilter.lib \
133 epan\ftypes\ftypes.lib \
137 rawshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
138 wsock32.lib user32.lib psapi.lib \
140 wsutil\libwsutil.lib \
143 !IFDEF ENABLE_LIBWIRESHARK
144 epan\libwireshark.lib \
146 epan\dissectors\dissectors.lib \
148 epan\crypt\airpdcap.lib \
149 epan\dfilter\dfilter.lib \
150 epan\ftypes\ftypes.lib \
156 capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
157 wsock32.lib user32.lib shell32.lib \
158 wsutil\libwsutil.lib \
162 captype_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
163 wsock32.lib user32.lib shell32.lib \
164 wsutil\libwsutil.lib \
167 editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
168 wsock32.lib user32.lib shell32.lib \
169 wsutil\libwsutil.lib \
172 mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
173 wsock32.lib user32.lib \
174 wsutil\libwsutil.lib \
177 reordercap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
178 wsock32.lib user32.lib \
179 wsutil\libwsutil.lib \
183 wsock32.lib user32.lib \
184 wsutil\libwsutil.lib \
188 wsock32.lib user32.lib \
189 wsutil\libwsutil.lib \
193 dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
194 wsock32.lib user32.lib psapi.lib \
196 wsutil\libwsutil.lib \
198 !IFDEF ENABLE_LIBWIRESHARK
199 epan\libwireshark.lib \
201 epan\dissectors\dissectors.lib \
203 epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
210 randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
212 wsutil\libwsutil.lib \
215 EXECUTABLES=wireshark.exe tshark.exe tfshark.exe rawshark.exe \
216 capinfos.exe captype.exe editcap.exe mergecap.exe text2pcap.exe \
217 randpkt.exe reordercap.exe dumpcap.exe dftest.exe
220 EXECUTABLES=$(EXECUTABLES) qtshark.exe
223 RESOURCES=image\wireshark.res image\file_dlg_win32.res \
224 image\libwireshark.res image\tshark.res image\tfshark.res image\capinfos.res \
225 image\captype.res image\editcap.res image\mergecap.res \
226 image\text2pcap.res image\wiretap.res image\filetap.res image\dumpcap.res \
227 image\rawshark.res image\reordercap.res image\libwsutil.res
230 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
236 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
241 @echo \? NSIS not available (MAKENSIS not defined in config.nmake)
250 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
255 # use (info-)zip from cygwin to pack things
258 xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)
261 @echo Including vcredist_$(TARGET_MACHINE).exe -- your recipient may need to run it!
262 xcopy "$(VCREDIST_EXE)" $(INSTALL_DIR)
265 zip -r -9 wireshark.zip $(INSTALL_DIR)/
267 !IFDEF WIRESHARK_GENERATE_BSC_FILE
268 # FIXME: Add epan\wspython\*.sbr when we support Python embedding
269 # Note: Certain .sbr files cause bscmake warning "too many references... ignoring ..."
270 # XXX: It seems that using .bsc files with VS2010 doesn't work (isn't supported ?)
271 # Using .bsc files with VS2008 may work
272 # See: http://ask.wireshark.org/questions/8660/wireshark-building-and-debugging-on-visual-c-or-visual-studio
279 epan\dissectors\*.sbr \
284 plugins\docsis\*.sbr \
285 plugins\ethercat\*.sbr \
286 plugins\gryphon\*.sbr \
290 plugins\opcua\*.sbr \
291 plugins\profinet\*.sbr \
292 plugins\stats_tree\*.sbr \
293 plugins\unistim\*.sbr \
294 plugins\wimax\*.sbr \
295 plugins\wimaxasncp\*.sbr \
296 plugins\wimaxmacphy\*.sbr \
312 rm -f ../[Ww]ireshark-pdb-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).zip
313 zip -9 ../Wireshark-pdb-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).zip *.pdb *.lib
318 ## Note: The proper "SUBSYSTEM" link option to be used for linking each of the Wireshark executables
319 ## is specified in '$(guiflags)' or '$(conflags)' as used as part of the link options.
320 ## (These variables are defined in win32.mak).
321 filetap\filetap-$(FTAP_VERSION).lib: image $(ZLIB_DLL) filetap
322 wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
324 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
327 /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
329 !IFDEF MANIFEST_INFO_REQUIRED
330 mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:$(PROGRAM_NAME).exe;1
333 qtshark.exe : install-generated-files $(LIBS_CHECK) config.h epan ui qt wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
335 tshark.exe : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan ui cli image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
338 /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tshark_LIBS) $(tshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tshark.res
340 !IFDEF MANIFEST_INFO_REQUIRED
341 mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
344 tfshark.exe : $(LIBS_CHECK) config.h $(tfshark_OBJECTS) epan ui cli image\tfshark.res wsutil\libwsutil.lib filetap\filetap-$(FTAP_VERSION).lib plugins
347 /OUT:tfshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tfshark_LIBS) $(tfshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tfshark.res
349 !IFDEF MANIFEST_INFO_REQUIRED
350 mt.exe -nologo -manifest "tfshark.exe.manifest" -outputresource:tfshark.exe;1
353 rawshark.exe : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan ui image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
356 /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(rawshark_LIBS) $(rawshark_OBJECTS) ui\libui.lib image\rawshark.res
358 !IFDEF MANIFEST_INFO_REQUIRED
359 mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
362 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
363 capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
366 /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(capinfos_OBJECTS) $(capinfos_LIBS) setargv.obj image\capinfos.res
368 !IFDEF MANIFEST_INFO_REQUIRED
369 mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
372 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
373 captype.exe : $(LIBS_CHECK) config.h $(captype_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\captype.res
376 /OUT:captype.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(captype_OBJECTS) $(captype_LIBS) setargv.obj image\captype.res
378 !IFDEF MANIFEST_INFO_REQUIRED
379 mt.exe -nologo -manifest "captype.exe.manifest" -outputresource:captype.exe;1
382 editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
385 /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(editcap_OBJECTS) $(editcap_LIBS) image\editcap.res
387 !IFDEF MANIFEST_INFO_REQUIRED
388 mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
391 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
392 mergecap.exe : $(LIBS_CHECK) config.h $(mergecap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
395 /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(mergecap_OBJECTS) $(mergecap_LIBS) image\mergecap.res
397 !IFDEF MANIFEST_INFO_REQUIRED
398 mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
401 reordercap.exe : $(LIBS_CHECK) config.h reordercap.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\reordercap.res
404 /OUT:reordercap.exe $(conflags) $(conlibsdll) $(LDFLAGS) reordercap.obj $(reordercap_LIBS) setargv.obj image\reordercap.res
406 !IFDEF MANIFEST_INFO_REQUIRED
407 mt.exe -nologo -manifest "reordercap.exe.manifest" -outputresource:reordercap.exe;1
410 text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj pcapio.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\text2pcap.res
413 /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) text2pcap.obj text2pcap-scanner.obj pcapio.obj $(text2pcap_LIBS) image\text2pcap.res
415 !IFDEF MANIFEST_INFO_REQUIRED
416 mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
419 dftest.exe : $(dftest_OBJECTS) epan ui
422 /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(dftest_LIBS) ui\libui.lib $(dftest_OBJECTS)
424 !IFDEF MANIFEST_INFO_REQUIRED
425 mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
428 randpkt.exe : $(randpkt_OBJECTS)
431 /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(randpkt_LIBS) $(randpkt_OBJECTS)
433 !IFDEF MANIFEST_INFO_REQUIRED
434 mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
437 dumpcap.exe : $(LIBS_CHECK) config.h $(dumpcap_OBJECTS) wsutil\libwsutil.lib image\dumpcap.res
440 /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(dumpcap_LIBS) $(dumpcap_OBJECTS) image\dumpcap.res
442 !IFDEF MANIFEST_INFO_REQUIRED
443 mt.exe -nologo -manifest "dumpcap.exe.manifest" -outputresource:dumpcap.exe;1
447 config.h : config.h.win32 config.nmake
448 sed -e s/@VERSION@/$(VERSION)/ \
449 -e s/@VERSION_MAJOR@/$(VERSION_MAJOR)/ \
450 -e s/@VERSION_MINOR@/$(VERSION_MINOR)/ \
451 -e s/@VERSION_MICRO@/$(VERSION_MICRO)/ \
452 -e "s/@HAVE_C_ARES@/$(C_ARES_CONFIG)/" \
453 -e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
454 -e "s/@HAVE_KFW@/$(KFW_CONFIG)/" \
455 -e "s/@HAVE_NETTLE@/$(NETTLE_CONFIG)/" \
456 -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
457 -e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
458 -e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
459 -e "s/@HAVE_PCAP_DATALINK_NAME_TO_VAL@/$(PCAP_DATALINK_NAME_TO_VAL_CONFIG)/" \
460 -e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
461 -e "s/@HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION@/$(PCAP_DATALINK_VAL_TO_DESCRIPTION_CONFIG)/" \
462 -e "s/@HAVE_PCAP_BREAKLOOP@/$(PCAP_BREAKLOOP_CONFIG)/" \
463 -e "s/@HAVE_REMOTE@/$(PCAP_HAVE_REMOTE_CONFIG)/" \
464 -e "s/@HAVE_PCAP_REMOTE@/$(PCAP_REMOTE_CONFIG)/" \
465 -e "s/@HAVE_PCAP_OPEN@/$(PCAP_OPEN_CONFIG)/" \
466 -e "s/@HAVE_PCAP_OPEN_DEAD@/$(PCAP_OPEN_DEAD_CONFIG)/" \
467 -e "s/@HAVE_PCAP_LIST_DATALINKS@/$(PCAP_LIST_DATALINKS_CONFIG)/" \
468 -e "s/@HAVE_PCAP_FREE_DATALINKS@/$(PCAP_FREE_DATALINKS_CONFIG)/" \
469 -e "s/@HAVE_PCAP_SET_DATALINK@/$(PCAP_SET_DATALINK_CONFIG)/" \
470 -e "s/@HAVE_PCAP_SETSAMPLING@/$(PCAP_SETSAMPLING_CONFIG)/" \
471 -e "s/@HAVE_BPF_IMAGE@/$(BPF_IMAGE_CONFIG)/" \
472 -e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \
473 -e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \
474 -e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \
475 -e "s/@HAVE_LUA@/$(LUA_VERSION)/" \
476 -e "s/@HAVE_PYTHON@/$(PYTHON_CONFIG)/" \
477 -e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \
478 -e "s/@HAVE_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \
479 -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \
480 -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \
481 -e "s/@HAVE_SMI@/$(SMI_CONFIG)/" \
482 -e "s/@HAVE_GEOIP@/$(GEOIP_CONFIG)/" \
483 -e "s/@HAVE_GEOIP_V6@/$(GEOIP_V6_CONFIG)/" \
484 -e "s/@HAVE_SOFTWARE_UPDATE@/$(WINSPARKLE_CONFIG)/" \
485 -e "s/@INET6@/$(INET6_CONFIG)/" \
486 -e "s/@HAVE_NTDDNDIS_H@/$(NTDDNDIS_CONFIG)/" \
487 -e "s/@PCAP_NG_DEFAULT@/$(PCAP_NG_DEFAULT)/" \
488 -e "s/@WANT_PACKET_EDITOR@/$(WANT_PACKET_EDITOR)/" \
489 < config.h.win32 > $@
491 ui\qt\config.pri: config.nmake Makefile.nmake
492 @echo Creating <<ui\qt\config.pri
493 # Automatically generated from Makefile.nmake. Edit there, not here.
494 # qmake apparently requires a three-part numeric VERSION.
495 PROGRAM_NAME = $(PROGRAM_NAME)
496 VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
497 VERSION_FULL = $(VERSION)
498 WTAP_VERSION = $(WTAP_VERSION)
499 INSTALL_DIR = $(INSTALL_DIR)
500 !IFDEF MANIFEST_INFO_REQUIRED
501 CONFIG += wireshark_manifest_info_required
504 CONFIG += wireshark_use_kfw
506 WIRESHARK_LIB_DIR = $(WIRESHARK_LIB_DIR:\=/)
507 GLIB_DIR = $(GTK_DIR:\=/)
508 C_ARES_DIR = $(C_ARES_DIR:\=/)
509 ZLIB_DIR = $(ZLIB_DIR:\=/)
510 GNUTLS_DIR = $(GNUTLS_DIR:\=/)
511 SMI_DIR = $(SMI_DIR:\=/)
512 KFW_DIR = $(KFW_DIR:\=/)
513 LUA_DIR = $(LUA_DIR:\=/)
514 GEOIP_DIR = $(GEOIP_DIR:\=/)
515 WINSPARKLE_DIR = $(WINSPARKLE_DIR:\=/)
517 INTL_DLL = $(INTL_DLL)
519 guilibsdll = $(guilibsdll)
521 HHC_LIBS = $(HHC_LIBS)
526 MSVC_VARIANT = $(MSVC_VARIANT)
527 MSVCR_DLL = "$(MSVCR_DLL:\=/)"
529 QMAKE_CFLAGS *= $(STANDARD_CFLAGS)
530 # NOMINMAX keeps windows.h from defining "min" and "max" via windef.h.
531 # This avoids conflicts with the C++ standard library.
532 QMAKE_CXXFLAGS *= $(STANDARD_CFLAGS) /DNOMINMAX
533 QMAKE_LFLAGS *= /LARGEADDRESSAWARE $(LDFLAGS)
538 # Build the version string
540 # XXX - Makefile.am uses FORCE for this.
541 !IF EXIST(".git/index")
542 GITINDEX = .git/index
543 !ELSE IF EXIST(".svn/wc.db")
544 GITINDEX = .svn/wc.db
545 !ELSE IF EXIST(".svn/entries")
546 GITINDEX = .svn/entries
550 version.h: $(GITINDEX)
552 $(PERL) make-version.pl
555 text2pcap-scanner.c : text2pcap-scanner.l
556 $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
558 text2pcap-scanner.obj : text2pcap-scanner.c
559 $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $?
562 # The following targets will rebuild their respective objs
563 # if and when version.h should change.
565 text2pcap.obj mergecap.obj capinfos.obj captype.obj editcap.obj reordercap.obj version_info.obj: version.h
569 rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(tfshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
570 $(EXECUTABLES) *.pdb *.sbr *.exe.manifest \
571 capinfos.obj capinfos.exp capinfos.lib \
572 captype.obj captype.exp captype.lib \
573 editcap.obj editcap.exp editcap.lib \
574 mergecap.obj text2pcap.obj \
575 reordercap.obj nio-ie5.obj update.obj \
576 text2pcap-scanner.obj text2pcap-scanner.c \
577 config.h ps.c $(LIBS_CHECK) \
578 dftest.obj dftest.exe randpkt.obj randpkt.exe \
580 $(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll \
583 rm -rf $(INSTALL_DIR)
584 rm -rf wireshark-qt-release
588 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
590 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
592 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
594 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
596 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
598 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
600 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
606 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
608 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
610 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
612 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
614 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
616 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
618 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
620 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
622 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
624 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
625 cd ../portableapps/win32
626 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
629 # "distclean" removes all files not part of the distribution.
630 # It does not remove generated files that are part of the distribution.
631 distclean-local: clean-local
633 rm -f $(ADNS_DLL) $(ADNS_LIBS)
636 rm -f $(ZLIB_DLL) $(ZLIB_DIR)\zlib1.dll.manifest \
637 $(ZLIB_DIR)\include\zlib.h $(ZLIB_DIR)\include\zconf.h \
638 $(ZLIB_DIR)\lib\zdll.lib
640 rm -f config.h $(BUILT_SOURCES) wireshark-pdb*.zip
642 distclean: distclean-local
644 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
646 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
648 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
650 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
652 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
654 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
660 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
662 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
664 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
666 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
668 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
670 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
672 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
674 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
676 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
678 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
679 cd ../portableapps/win32
680 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
683 # Make "maintainer-clean" only if you would like to remove ALL generated
685 # Be sure to have python and perl installed to regenerate them.
686 maintainer-clean-local: distclean-local
687 rm -f $(GENERATED_FILES)
689 maintainer-clean: maintainer-clean-local
691 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
693 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
695 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
697 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
699 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
701 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
707 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
709 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
711 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
713 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
715 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
717 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
719 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
721 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
723 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
725 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
726 cd ../portableapps/win32
727 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
732 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
737 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
741 # MSVC variants supported by Wireshark have to avoid indirectly using msvcrt.dll,
742 # therefore compile the adns dll from source ADNS_DIR package.
743 # To avoid path problems, copy the adns sources to a temp dir,
744 # compile and copy the resulting files back to (source) ADNS_DIR
747 # - we need to "patch" adns_dll.rep and adns_dll.rc (at least for MSVC2005EE)
750 xcopy $(ADNS_DIR) adns.tmp /D /I /E /Y
751 copy adns_dll.dep adns.tmp\adns_win32\adns_dll
752 copy adns_dll.rc adns.tmp\adns_win32\adns_dll
753 cd adns.tmp\adns_win32\adns_dll
754 set CFG=adns_dll - Win32 Release
755 $(MAKE) /$(MAKEFLAGS) -f adns_dll.mak LOC="$(LOCAL_CFLAGS)"
757 !IFDEF MANIFEST_INFO_REQUIRED
758 mt.exe -nologo -manifest "adns_dll.dll.manifest" -outputresource:adns_dll.dll;2
760 if not exist "$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns" mkdir "$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns"
761 copy adns_dll.dll $(ADNS_DLL)
762 copy adns_dll.lib $(ADNS_LIBS)
768 # MSVC variants supported by Wireshark have to avoid indirectly using msvcrt.dll,
769 # therefore compile the zlib dll from source ZLIB_DIR package.
770 # To avoid path problems, copy the zlib sources to a temp dir,
771 # compile and copy the resulting files back to (source) ZLIB_DIR
773 xcopy $(ZLIB_DIR) zlib.tmp /D /I /E /Y
775 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
776 $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj"
778 $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll AS=ml64 LOC="-DASMV -DASMINF" OBJA="inffasx64.obj gvmat64.obj inffas8664.obj"
780 if not exist $(ZLIB_DIR) mkdir $(ZLIB_DIR)
781 if not exist $(ZLIB_DIR)\lib mkdir $(ZLIB_DIR)\lib
782 if not exist $(ZLIB_DIR)\include mkdir $(ZLIB_DIR)\include
783 !IFDEF MANIFEST_INFO_REQUIRED
784 mt.exe -nologo -manifest "zlib1.dll.manifest" -outputresource:zlib1.dll;2
786 copy zlib1.dll $(ZLIB_DIR)
787 copy zdll.lib $(ZLIB_DIR)\lib
788 copy zconf.h $(ZLIB_DIR)\include
789 copy zlib.h $(ZLIB_DIR)\include
796 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
801 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
806 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
811 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
814 ui:: help config.h version.h doxygen
816 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
819 gtk:: help config.h version.h doxygen
821 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui.lib
824 # The Visual C++ static analyzer currently fails with error C2171
825 # when compiling summary_dialog.cpp. If/when this ever gets fixed
826 # we can remove the ENABLE_CODE_ANALYSIS check.
827 qt:: help config.h version.h doxygen
830 $(QT5_BASE_DIR)\bin\qmake CONFIG+=release QtShark.pro
831 !IFDEF ENABLE_CODE_ANALYSIS
841 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui_win32.lib
844 cli:: help config.h version.h doxygen
846 $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libcliui.lib
849 epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib filetap\filetap-$(FTAP_VERSION).lib $(BUILT_SOURCES) doxygen
851 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
856 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
861 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
866 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
871 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
874 doxygen.cfg: config.nmake doxygen.cfg.in
875 sed -e s/@VERSION@/$(VERSION)/ \
876 < doxygen.cfg.in > $@
880 $(DOXYGEN) doxygen.cfg
883 doxygen: doxygen.cfg doxygen-run
885 services: tools\make-services.py
886 $(PYTHON) tools/make-services.py
888 ################################################################################
889 # Prepare build environment by downloading and installing required libraries
890 ################################################################################
892 # The required tools to build Wireshark.
894 # The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
895 # We only need the cygwin version (for some shell scripts).
896 # In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
901 !IFDEF MANIFEST_INFO_REQUIRED
909 --cygwinonly /usr/bin/find \
914 --windowsonly $(QT5_BASE_DIR)\bin\qmake \
921 # As win-setup.sh assumes the dir exists create it if it doesn't
922 @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
923 @$(SH) $(WIN_SETUP) --appverify $(REQUIRED_TOOLS)
925 # Targets and etc used to verify or download libraries
927 !IFNDEF WIN_SETUP_OPT
928 WIN_SETUP_OPT=--download
931 # Verify that the required library 'package' (zip) files have been downloaded.
932 # (It seems reasonable to assume that if the files have been downloaded
933 # then they have been installed).
935 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN_SETUP_OPT=--libverify process_libs
937 # Verify library packages:
938 # If $(CHECK_TAG) is non-null then checktag failed; Exit with an error message. (See beginning of this Makefile).
939 # Otherwise do detailed library package files verification only if Makefile.nmake or config.make have been updated
940 # (or dummy file doesn't exist because of 'make clean' or whatever).
941 # Note that the creation/modification time of a file after a git pull of that file
942 # is the time of the update (not the time of the file in the repository).
943 # touch is only called if libverify succeeds.
944 $(LIBS_CHECK): $(CHECK_TAG) config.nmake Makefile.nmake
945 @echo Verifying library package files ...
946 @$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN_SETUP_OPT=--libverify process_libs
949 # Target for "checktag failed" (libraries not up to date).
950 # Defined only if "checktag" failed (see beginning of this Makefile).
951 !IF "$(CHECK_TAG)" != ""
952 $(CHECK_TAG): _FORCE_
953 @echo \? Wireshark Libraries not up-to-date \?
954 @echo \? Do you need to run "nmake -f Makefile.nmake setup" \?
960 # Download (if needed) and install all the required libraries into WIRESHARK_LIB_DIR.
961 # A clean_setup is done first to ensure that the target dirs don't
962 # contain old files remaining from a previous setup run.
963 setup: verify_tools clean_setup process_libs
966 $(SH) $(WIN_SETUP) --download "C:\Qt" \
967 . Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws.zip
969 # The process_libs target when invoked causes either a --libverify or a --download for all the required libraries.
970 # (The choice is determined by the value of the macro WIN_SETUP_OPT).
972 @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
973 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
974 . WinPcap_$(WINPCAP_VERSION).exe
976 !MESSAGE Can't find Qt. This will become a problem at some point.
979 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
980 "$(GTK_NAME)" gtk+-bundle_$(GTK_PKG)_$(WIRESHARK_TARGET_PLATFORM)$(PKG_SUFIX).zip
983 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
984 . kfw-3-2-2-i386-ws-vc6.zip
985 # @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
989 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
990 . WpdPack_$(WPD_VERSION).zip
993 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
994 AirPcap_Devpack_4_1_0_1622 AirPcap_Devpack_4_1_0_1622.zip
997 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
998 . c-ares-$(C_ARES_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1001 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1002 . adns-1.0-win32-05ws.zip
1005 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1006 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1007 zlib125 zlib-1.2.5.zip
1009 zlib125 zlib125ws.zip
1013 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1014 lua5.1.4 lua$(LUA_DIST)_lib.zip
1018 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1019 . gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1021 !IFDEF PORTAUDIO_DIR
1022 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1023 . portaudio_v19_2.zip
1026 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1027 . libsmi-$(SMI_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1030 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1031 GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1033 !IFDEF WINSPARKLE_DIR
1034 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1035 . WinSparkle-$(WINSPARKLE_PKG).zip
1038 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1039 user-guide user-guide-52567.zip
1042 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1046 @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1047 . nasm-2.09.08-win32.zip
1049 !IF "$(WIN_SETUP_OPT)" == "--download"
1050 @$(SH) $(WIN_SETUP) --settag "$(WIRESHARK_LIB_DIR)"
1053 @echo Wireshark is ready to build.
1055 # Cleanup files installed by the setup target. It will not remove the
1056 # downloaded zip files.
1057 # WHEN UPDATING LIBRARY VERSIONS, KEEP ALSO ONE FORMER VERSION SO
1058 # UPDATING REMOVES THE FORMER USER DIRS
1060 cd "$(WIRESHARK_LIB_DIR)"
1061 rm -r -f adns-1.0-win32-05ws
1062 rm -r -f c-ares-1.5.3ws
1063 rm -r -f c-ares-1.6.0ws
1064 rm -r -f c-ares-1.7.0-win??ws
1065 rm -r -f c-ares-1.7.1-win??ws
1066 rm -r -f c-ares-1.9.1-1-win??ws
1067 rm -r -f gettext-0.14.5
1068 rm -r -f gettext-runtime-0.17
1069 rm -r -f gettext-runtime-0.17-1
1070 rm -r -f gettext-0.17-1 # win64
1072 rm -r -f gnutls-2.8.1-1
1073 rm -r -f gnutls-2.8.5-*-win??ws
1074 rm -r -f gnutls-2.10.3-*-win??ws
1075 rm -r -f gnutls-2.12.18-*-win??ws
1076 !IF "$(GTK_NAME)" == "gtk2"
1084 rm -r -f kfw-3-2-2-final
1085 rm -r -f kfw-3.2.2-ws1
1086 rm -r -f kfw-3-2-2-i386-ws-vc6
1087 rm -r -f libiconv-1.9.1.bin.woe32
1090 rm -r -f libsmi-0.4.5
1091 rm -r -f libsmi-0.4.8
1092 rm -r -f libsmi-svn-40773-win??ws
1095 rm -r -f nasm-2.09.08
1098 rm -r -f portaudio_v19
1099 rm -r -f portaudio_v19_2
1106 rm -r -f zlib123-dll
1107 rm -r -f AirPcap_Devpack_1_0_0_594
1108 rm -r -f AirPcap_Devpack_4_0_0_1480
1109 rm -r -f AirPcap_Devpack_4_1_0_1622
1110 rm -r -f GeoIP-1.4.5ws
1111 rm -r -f GeoIP-1.4.6-win??ws
1112 rm -r -f GeoIP-1.4.8-win??ws
1113 rm -r -f GeoIP-1.4.8-*-win??ws
1114 rm -r -f GeoIP-1.5.1-*-win??ws
1115 rm -r -f WinSparkle-0.3-44-g2c8d9d3-win??ws
1119 ################################################################################
1120 # Prepare the debug trees for running Wireshark/Tshark from there.
1121 ################################################################################
1124 # prepare debugging of Wireshark in INSTALL_DIR
1125 debug-wireshark: wireshark.exe install-generated-files
1127 # prepare debugging of tshark in INSTALL_DIR
1128 debug-tshark: tshark.exe install-generated-files
1130 # prepare debugging of tfshark in INSTALL_DIR
1131 debug-tfshark: tfshark.exe install-generated-files
1133 # prepare debugging of rawshark in INSTALL_DIR
1134 debug-rawshark: rawshark.exe install-generated-files
1136 # prepare debugging of dumpcap in INSTALL_DIR
1137 debug-dumpcap: dumpcap.exe install-generated-files
1140 # install generated files (exe, "our" libs, ...)
1141 install-generated-files: doc
1143 if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
1144 !IF DEFINED (MSVCR_DLL) && "$(MSVC_VARIANT)" == "MSVC2008"
1145 xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)\*.* /d
1147 !IFDEF ENABLE_LIBWIRESHARK
1148 xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
1149 if exist epan\libwireshark.lib xcopy .\epan\libwireshark.lib $(INSTALL_DIR) /d
1150 if exist epan\libwireshark.pdb xcopy .\epan\libwireshark.pdb $(INSTALL_DIR) /d
1152 xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
1153 if exist ".\wiretap\wiretap-$(WTAP_VERSION).lib" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).lib" $(INSTALL_DIR) /d
1154 if exist ".\wiretap\wiretap-$(WTAP_VERSION).pdb" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).pdb" $(INSTALL_DIR) /d
1155 xcopy ".\filetap\filetap-$(FTAP_VERSION).dll" $(INSTALL_DIR) /d
1156 if exist ".\filetap\filetap-$(FTAP_VERSION).lib" xcopy ".\filetap\filetap-$(FTAP_VERSION).lib" $(INSTALL_DIR) /d
1157 if exist ".\filetap\filetap-$(FTAP_VERSION).pdb" xcopy ".\filetap\filetap-$(FTAP_VERSION).pdb" $(INSTALL_DIR) /d
1158 xcopy ".\wsutil\libwsutil.dll" $(INSTALL_DIR) /d
1159 if exist ".\wsutil\libwsutil.lib" xcopy ".\wsutil\libwsutil.lib" $(INSTALL_DIR) /d
1160 if exist ".\wsutil\libwsutil.pdb" xcopy ".\wsutil\libwsutil.pdb" $(INSTALL_DIR) /d
1161 if exist $(PROGRAM_NAME).exe xcopy $(PROGRAM_NAME).exe $(INSTALL_DIR) /d
1162 if exist $(PROGRAM_NAME).pdb xcopy $(PROGRAM_NAME).pdb $(INSTALL_DIR) /d
1163 if exist $(PROGRAM_NAME).bsc xcopy $(PROGRAM_NAME).bsc $(INSTALL_DIR) /d
1164 if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL_DIR) /d
1165 if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
1166 if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
1167 if exist captype.exe xcopy captype.exe $(INSTALL_DIR) /d
1168 if exist captype.pdb xcopy captype.pdb $(INSTALL_DIR) /d
1169 if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL_DIR) /d
1170 if exist dumpcap.pdb xcopy dumpcap.pdb $(INSTALL_DIR) /d
1171 if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
1172 if exist editcap.pdb xcopy editcap.pdb $(INSTALL_DIR) /d
1173 if exist mergecap.exe xcopy mergecap.exe $(INSTALL_DIR) /d
1174 if exist mergecap.pdb xcopy mergecap.pdb $(INSTALL_DIR) /d
1175 if exist reordercap.exe xcopy reordercap.exe $(INSTALL_DIR) /d
1176 if exist reordercap.pdb xcopy reordercap.pdb $(INSTALL_DIR) /d
1177 if exist rawshark.exe xcopy rawshark.exe $(INSTALL_DIR) /d
1178 if exist rawshark.pdb xcopy rawshark.pdb $(INSTALL_DIR) /d
1179 if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL_DIR) /d
1180 if exist text2pcap.pdb xcopy text2pcap.pdb $(INSTALL_DIR) /d
1181 if exist tfshark.exe xcopy tfshark.exe $(INSTALL_DIR) /d
1182 if exist tfshark.pdb xcopy tfshark.pdb $(INSTALL_DIR) /d
1183 if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
1184 if exist tshark.pdb xcopy tshark.pdb $(INSTALL_DIR) /d
1185 xcopy "doc\AUTHORS-SHORT" $(INSTALL_DIR) /d
1186 xcopy ".\manuf" $(INSTALL_DIR) /d
1187 xcopy ".\services" $(INSTALL_DIR) /d
1188 xcopy ".\pdml2html.xsl" $(INSTALL_DIR) /d
1189 $(TEXTIFY) "./COPYING" $(INSTALL_DIR)
1190 $(TEXTIFY) "./NEWS" $(INSTALL_DIR)
1191 $(TEXTIFY) "./README" $(INSTALL_DIR)
1192 $(TEXTIFY) "./README.windows" $(INSTALL_DIR)
1193 xcopy ".\cfilters" $(INSTALL_DIR) /d
1194 xcopy ".\colorfilters" $(INSTALL_DIR) /d
1195 xcopy ".\dfilters" $(INSTALL_DIR) /d
1196 xcopy ".\smi_modules" $(INSTALL_DIR) /d
1198 xcopy ".\epan\wslua\init.lua" $(INSTALL_DIR) /d
1199 xcopy ".\epan\wslua\console.lua" $(INSTALL_DIR) /d
1202 if not exist $(INSTALL_DIR)\python mkdir $(INSTALL_DIR)\python
1203 xcopy ".\epan\wspython\register-dissector.py" $(INSTALL_DIR)\python /d
1204 xcopy ".\epan\wspython\wspy_dissector.py" $(INSTALL_DIR)\python /d
1205 xcopy ".\epan\wspython\wspy_libws.py" $(INSTALL_DIR)\python /d
1207 xcopy ipmap.html $(INSTALL_DIR) /d
1208 xcopy doc\*.html $(INSTALL_DIR) /d
1209 if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
1210 xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
1211 # you can't reliably use xcopy to rename files "on the fly" (so copy first, then rename)
1212 xcopy ".\help\faq.txt" $(INSTALL_DIR) /d
1213 $(UNIX2DOS) $(INSTALL_DIR)/help/*.txt
1214 if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
1215 xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
1216 if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
1217 echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
1218 if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
1219 xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
1220 if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
1221 xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
1222 xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
1223 if not exist $(INSTALL_DIR)\tpncp mkdir $(INSTALL_DIR)\tpncp
1224 xcopy ".\tpncp\*.dat" $(INSTALL_DIR)\tpncp /d
1225 if not exist $(INSTALL_DIR)\wimaxasncp mkdir $(INSTALL_DIR)\wimaxasncp
1226 xcopy ".\wimaxasncp\*.*" $(INSTALL_DIR)\wimaxasncp /d
1227 if not exist $(INSTALL_DIR)\plugins mkdir $(INSTALL_DIR)\plugins
1228 if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
1230 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-plugins
1232 if not exist $(INSTALL_DIR)\profiles mkdir $(INSTALL_DIR)\profiles
1233 if not exist $(INSTALL_DIR)\profiles\Bluetooth mkdir $(INSTALL_DIR)\profiles\Bluetooth
1234 xcopy ".\profiles\Bluetooth\colorfilters" $(INSTALL_DIR)\profiles\Bluetooth /d
1235 if not exist $(INSTALL_DIR)\profiles\Classic mkdir $(INSTALL_DIR)\profiles\Classic
1236 xcopy ".\profiles\Classic\colorfilters" $(INSTALL_DIR)\profiles\Classic /d
1238 # "install-all" will copy all files needed to run Wireshark/Tshark
1239 # to the INSTALL_DIR, so you can run/debug Wireshark/Tshark from there.
1240 install-all: install-generated-files
1242 if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
1243 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1244 xcopy $(GTK_DIR)\bin\libgdk-3-0.dll $(INSTALL_DIR) /d
1245 xcopy $(GTK_DIR)\bin\libgtk-3-0.dll $(INSTALL_DIR) /d
1247 xcopy $(GTK_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL_DIR) /d
1248 xcopy $(GTK_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL_DIR) /d
1250 xcopy $(GTK_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL_DIR) /d
1251 xcopy $(GTK_DIR)\bin\libatk-1.0-0.dll $(INSTALL_DIR) /d
1252 xcopy $(GTK_DIR)\bin\libpango-1.0-0.dll $(INSTALL_DIR) /d
1253 xcopy $(GTK_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL_DIR) /d
1254 if not exist $(INSTALL_DIR)\lib mkdir $(INSTALL_DIR)\lib
1255 if not exist $(INSTALL_DIR)\etc mkdir $(INSTALL_DIR)\etc
1256 if not exist $(INSTALL_DIR)\$(GTK_ETC_DIR) mkdir $(INSTALL_DIR)\$(GTK_ETC_DIR)
1257 xcopy $(GTK_DIR)\$(GTK_ETC_DIR)\*.* $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1258 # if not exist $(INSTALL_DIR)\etc\pango mkdir $(INSTALL_DIR)\etc\pango
1259 # xcopy $(GTK_DIR)\etc\pango\pango.* $(INSTALL_DIR)\etc\pango /d
1260 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1261 if not exist $(INSTALL_DIR)\lib\gtk-3.0 mkdir $(INSTALL_DIR)\lib\gtk-3.0
1262 if not exist $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR)
1263 xcopy ".\ui\win32\settings.ini" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1265 if not exist $(INSTALL_DIR)\lib\gtk-2.0 mkdir $(INSTALL_DIR)\lib\gtk-2.0
1266 if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)
1267 if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders
1268 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
1270 !IFDEF GTK_ENGINES_DIR
1271 if not exist $(INSTALL_DIR)\$(GTK_ENGINES_DIR) mkdir $(INSTALL_DIR)\$(GTK_ENGINES_DIR)
1272 xcopy $(GTK_DIR)\$(GTK_ENGINES_DIR)\libpixmap.dll $(INSTALL_DIR)\$(GTK_ENGINES_DIR) /d
1273 xcopy $(GTK_DIR)\$(GTK_ENGINES_DIR)\libwimp.dll $(INSTALL_DIR)\$(GTK_ENGINES_DIR) /d
1275 !IFDEF GTK_THEMES_DIR
1276 xcopy "$(GTK_DIR)\$(GTK_THEMES_DIR)\gtkrc" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1278 !IFDEF GTK_MODULES_DIR
1279 if not exist $(INSTALL_DIR)\$(GTK_MODULES_DIR) mkdir $(INSTALL_DIR)\$(GTK_MODULES_DIR)
1280 xcopy $(GTK_DIR)\$(GTK_MODULES_DIR)\libgail.dll $(INSTALL_DIR)\$(GTK_MODULES_DIR) /d
1282 !IFDEF NEED_CAIRO_GOBJECT_DLL
1283 xcopy $(GTK_DIR)\bin\libcairo-gobject-2.dll $(INSTALL_DIR) /d
1285 !IFDEF NEED_CAIRO_DLL
1286 xcopy $(GTK_DIR)\bin\libcairo-2.dll $(INSTALL_DIR) /d
1287 xcopy $(GTK_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL_DIR) /d
1289 !IFDEF NEED_EXPAT_DLL
1290 xcopy $(GTK_DIR)\bin\$(EXPAT_DLL) $(INSTALL_DIR) /d
1293 xcopy $(GTK_DIR)\bin\$(FFI_DLL) $(INSTALL_DIR) /d
1295 !IFDEF NEED_FONTCONFIG_DLL
1296 xcopy $(GTK_DIR)\bin\$(FONTCONFIG_DLL) $(INSTALL_DIR) /d
1298 !IFDEF NEED_FREETYPE_DLL
1299 xcopy $(GTK_DIR)\bin\libpangoft2-1.0-0.dll $(INSTALL_DIR) /d
1300 xcopy $(GTK_DIR)\bin\$(FREETYPE_DLL) $(INSTALL_DIR) /d
1302 !IFDEF NEED_JASPER_DLL
1303 xcopy $(GTK_DIR)\bin\$(JASPER_DLL) $(INSTALL_DIR) /d
1305 !IFDEF NEED_JPEG_DLL
1306 xcopy $(GTK_DIR)\bin\$(JPEG_DLL) $(INSTALL_DIR) /d
1308 !IFDEF NEED_LZMA_DLL
1309 xcopy $(GTK_DIR)\bin\$(LZMA_DLL) $(INSTALL_DIR) /d
1311 !IFDEF NEED_PIXMAN_DLL
1312 xcopy $(GTK_DIR)\bin\$(PIXMAN_DLL) $(INSTALL_DIR) /d
1315 xcopy $(GTK_DIR)\bin\$(PNG_DLL) $(INSTALL_DIR) /d
1317 !IFDEF NEED_TIFF_DLL
1318 xcopy $(GTK_DIR)\bin\$(TIFF_DLL) $(INSTALL_DIR) /d
1321 xcopy $(GTK_DIR)\bin\$(XML_DLL) $(INSTALL_DIR) /d
1323 !IFDEF GTK_SCHEMAS_DIR
1324 if not exist $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR) mkdir $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR)
1325 if not exist $(GTK_DIR)\$(GTK_SCHEMAS_DIR)\gschemas.compiled $(GTK_DIR)\bin\glib-compile-schemas $(GTK_DIR)\$(GTK_SCHEMAS_DIR)
1326 xcopy $(GTK_DIR)\$(GTK_SCHEMAS_DIR)\gschemas.compiled $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR) /d
1328 xcopy $(GTK_DIR)\bin\libgio-2.0-0.dll $(INSTALL_DIR) /d
1329 xcopy $(GTK_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
1330 xcopy $(GTK_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
1331 xcopy $(GTK_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
1332 xcopy $(GTK_DIR)\bin\libgthread-2.0-0.dll $(INSTALL_DIR) /d
1333 xcopy $(GTK_DIR)\bin\$(INTL_DLL) $(INSTALL_DIR) /d
1335 xcopy $(ZLIB_DLL) $(INSTALL_DIR) /d
1338 xcopy $(C_ARES_DLL) $(INSTALL_DIR) /d
1341 xcopy $(ADNS_DLL) $(INSTALL_DIR) /d
1344 xcopy $(KFW_PATH)\comerr32.dll $(INSTALL_DIR) /d
1345 xcopy $(KFW_PATH)\krb5_32.dll $(INSTALL_DIR) /d
1346 xcopy $(KFW_PATH)\k5sprt32.dll $(INSTALL_DIR) /d
1349 xcopy $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(INSTALL_DIR) /d
1350 xcopy $(GNUTLS_DIR)\bin\libgnutls-26.dll $(INSTALL_DIR) /d
1351 xcopy $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(INSTALL_DIR) /d
1352 xcopy $(GNUTLS_DIR)\bin\libtasn1-3.dll $(INSTALL_DIR) /d
1353 ! IF "$(INTL_DLL)" != "libintl-8.dll"
1354 # The gtk+ bundle doesn't provide libintl-8.dll (which is the case
1355 # with the 32-bit package); use the GNUTLS version.
1356 xcopy $(GNUTLS_DIR)\bin\libintl-8.dll $(INSTALL_DIR) /d
1360 xcopy "$(LUA_DIR)\lua5.1.dll" $(INSTALL_DIR) /d
1363 if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
1364 if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
1365 xcopy "$(SMI_DIR)\bin\libsmi-2.dll" $(INSTALL_DIR) /d
1366 xcopy "$(SMI_DIR)\share\mibs\iana\*" $(INSTALL_DIR)\snmp\mibs /d
1367 xcopy "$(SMI_DIR)\share\mibs\ietf\*" $(INSTALL_DIR)\snmp\mibs /d
1368 xcopy "$(SMI_DIR)\share\mibs\irtf\*" $(INSTALL_DIR)\snmp\mibs /d
1369 xcopy "$(SMI_DIR)\share\mibs\site\*" $(INSTALL_DIR)\snmp\mibs /d
1370 xcopy "$(SMI_DIR)\share\mibs\tubs\*" $(INSTALL_DIR)\snmp\mibs /d
1371 xcopy "$(SMI_DIR)\share\pibs\*" $(INSTALL_DIR)\snmp\mibs /d
1372 xcopy "$(SMI_DIR)\share\yang\*.yang" $(INSTALL_DIR)\snmp\mibs /d
1375 xcopy "$(GEOIP_DIR)\bin\libGeoip-1.dll" $(INSTALL_DIR) /d
1377 !IFDEF WINSPARKLE_DIR
1378 xcopy "$(WINSPARKLE_DIR)\WinSparkle.dll" $(INSTALL_DIR) /d
1381 peflags --dynamicbase=true --nxcompat=true *.dll
1382 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1384 peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/*/engines/*.dll
1385 peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/modules/*.dll
1390 $(PERL) tools/checkAPIs.pl -build \
1391 $(WIRESHARK_COMMON_SRC) \
1393 # $(EXTRA_wireshark_SOURCES)
1395 checkapi: checkapi_local
1397 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1399 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
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
1422 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1424 $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1427 _FORCE_: ## Assumption: no file named _FORCE_ exists in the current directory