Merge "Apply layouts in Qt Creator. Fix a tooltip."
[metze/wireshark/wip.git] / Makefile.nmake
1 ## Makefile for building wireshark.exe with Microsoft C and nmake
2 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
3 #
4 # $Id$
5
6 # We "Deploy using XCopy," which is described at
7 # http://msdn.microsoft.com/en-us/library/ms235291.aspx
8
9 include config.nmake
10 include <win32.mak>
11
12 ############### no need to modify below this line #########
13
14 CC = cl
15 LINK= link
16 BSCMAKE= bscmake
17
18 WIN_SETUP=tools/$(WIRESHARK_TARGET_PLATFORM)-setup.sh
19
20 # -------------
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.
30 #
31 LIBS_CHECK=_libs_check_
32 !IF [$(SH) $(WIN_SETUP) --checktag "$(WIRESHARK_LIB_DIR)"] != 0
33 CHECK_TAG=_check_tag_
34 !ELSE
35 CHECK_TAG=
36 !ENDIF
37 # -------------
38
39 LDFLAGS = /NOLOGO /INCREMENTAL:NO $(LOCAL_LDFLAGS)
40
41 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
42 GENERATED_CFLAGS=\
43         $(STANDARD_CFLAGS) \
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)
48
49 CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
50
51 .c.obj::
52         $(CC) $(CFLAGS) -Fd.\ -c $<
53
54 PLATFORM_PCAP_SRC = \
55         capture-wpcap.c \
56         capture_wpcap_packet.c \
57         capture_win_ifnames.c
58
59 include Makefile.common
60
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)
73
74 #
75 # psapi.lib see http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
76 #
77
78 wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
79         wsock32.lib user32.lib shell32.lib comctl32.lib ole32.lib psapi.lib \
80         $(GTHREAD_LIBS) \
81         $(HHC_LIBS) \
82         wsutil\libwsutil.lib \
83         $(GNUTLS_LIBS) \
84         $(PYTHON_LIBS) \
85         $(WINSPARKLE_LIBS) \
86 !IFDEF ENABLE_LIBWIRESHARK
87         epan\libwireshark.lib \
88 !ELSE
89         epan\dissectors\dissectors.lib \
90         epan\wireshark.lib \
91         epan\crypt\airpdcap.lib \
92         epan\dfilter\dfilter.lib \
93         epan\ftypes\ftypes.lib \
94         $(C_ARES_LIBS) \
95         $(ADNS_LIBS) \
96         $(ZLIB_LIBS)
97 !ENDIF
98
99 tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
100         wsock32.lib user32.lib psapi.lib \
101         $(GLIB_LIBS) \
102         $(GTHREAD_LIBS) \
103         wsutil\libwsutil.lib \
104         $(GNUTLS_LIBS) \
105         $(PYTHON_LIBS) \
106 !IFDEF ENABLE_LIBWIRESHARK
107         epan\libwireshark.lib \
108 !ELSE
109         epan\dissectors\dissectors.lib \
110         epan\wireshark.lib \
111         epan\crypt\airpdcap.lib \
112         epan\dfilter\dfilter.lib \
113         epan\ftypes\ftypes.lib \
114         $(C_ARES_LIBS) \
115         $(ADNS_LIBS) \
116         $(ZLIB_LIBS)
117 !ENDIF
118
119 tfshark_LIBS= filetap\filetap-$(FTAP_VERSION).lib \
120         wiretap\wiretap-$(WTAP_VERSION).lib \
121         wsock32.lib user32.lib psapi.lib \
122         $(GLIB_LIBS) \
123         $(GTHREAD_LIBS) \
124         wsutil\libwsutil.lib \
125         $(GNUTLS_LIBS) \
126         $(PYTHON_LIBS) \
127 !IFDEF ENABLE_LIBWIRESHARK
128         epan\libwireshark.lib \
129 !ELSE
130         epan\dissectors\dissectors.lib \
131         epan\wireshark.lib \
132         epan\dfilter\dfilter.lib \
133         epan\ftypes\ftypes.lib \
134         epan\wmem\wmem.lib
135 !ENDIF
136
137 rawshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
138         wsock32.lib user32.lib psapi.lib \
139         $(GLIB_LIBS) \
140         wsutil\libwsutil.lib \
141         $(GNUTLS_LIBS) \
142         $(PYTHON_LIBS) \
143 !IFDEF ENABLE_LIBWIRESHARK
144         epan\libwireshark.lib \
145 !ELSE
146         epan\dissectors\dissectors.lib \
147         epan\wireshark.lib \
148         epan\crypt\airpdcap.lib \
149         epan\dfilter\dfilter.lib \
150         epan\ftypes\ftypes.lib \
151         $(C_ARES_LIBS) \
152         $(ADNS_LIBS) \
153         $(ZLIB_LIBS)
154 !ENDIF
155
156 capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
157         wsock32.lib user32.lib shell32.lib \
158         wsutil\libwsutil.lib \
159         $(GLIB_LIBS) \
160         $(GCRYPT_LIBS)
161
162 captype_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
163         wsock32.lib user32.lib shell32.lib \
164         wsutil\libwsutil.lib \
165         $(GLIB_LIBS)
166
167 editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
168         wsock32.lib user32.lib shell32.lib \
169         wsutil\libwsutil.lib \
170         $(GLIB_LIBS)
171
172 mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
173         wsock32.lib user32.lib \
174         wsutil\libwsutil.lib \
175         $(GLIB_LIBS)
176
177 reordercap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
178         wsock32.lib user32.lib \
179         wsutil\libwsutil.lib \
180         $(GLIB_LIBS)
181
182 text2pcap_LIBS= \
183         wsock32.lib user32.lib \
184         wsutil\libwsutil.lib \
185         $(GLIB_LIBS)
186
187 dumpcap_LIBS= \
188         wsock32.lib user32.lib \
189         wsutil\libwsutil.lib \
190         $(GLIB_LIBS) \
191         $(GTHREAD_LIBS)
192
193 dftest_LIBS=  wiretap\wiretap-$(WTAP_VERSION).lib \
194         wsock32.lib user32.lib psapi.lib \
195         $(GLIB_LIBS) \
196         wsutil\libwsutil.lib \
197         $(GNUTLS_LIBS) \
198 !IFDEF ENABLE_LIBWIRESHARK
199         epan\libwireshark.lib \
200 !ELSE
201         epan\dissectors\dissectors.lib \
202         epan\wireshark.lib \
203         epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
204         $(C_ARES_LIBS) \
205         $(ADNS_LIBS) \
206         $(ZLIB_LIBS) \
207         $(SMI_LIBS)
208 !ENDIF
209
210 randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
211         user32.lib \
212         wsutil\libwsutil.lib \
213         $(GLIB_LIBS)
214
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
218
219 !IFDEF QT5_BASE_DIR
220 EXECUTABLES=$(EXECUTABLES) qtshark.exe
221 !ENDIF
222
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
228
229
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
231
232 !IFDEF MAKENSIS
233 packaging: all
234         cd packaging
235         cd nsis
236         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
237         cd ..
238         cd ..
239 !ELSE
240 packaging: _FORCE_
241         @echo \? NSIS not available (MAKENSIS not defined in config.nmake)
242         @echo.
243         @exit 1
244 !ENDIF
245
246 packaging_papps: all
247         cd packaging
248         cd portableapps
249         cd win32
250         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
251         cd ..
252         cd ..
253         cd ..
254
255 # use (info-)zip from cygwin to pack things
256 packaging_zip: all
257 !IFDEF MSVCR_DLL
258         xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)
259 !ENDIF
260 !IFDEF VCREDIST_EXE
261         @echo Including vcredist_$(TARGET_MACHINE).exe -- your recipient may need to run it!
262         xcopy "$(VCREDIST_EXE)" $(INSTALL_DIR)
263 !ENDIF
264         rm -f wireshark.zip
265         zip -r -9 wireshark.zip $(INSTALL_DIR)/
266
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
273 wireshark.bsc: \
274         *.sbr                           \
275         codecs\*.sbr                    \
276         epan\*.sbr                      \
277         epan\crypt\*.sbr                \
278         epan\dfilter\*.sbr              \
279         epan\dissectors\*.sbr           \
280         epan\ftypes\*.sbr               \
281         epan\wslua\*.sbr                \
282         filetap\*.sbr                   \
283         plugins\asn1\*.sbr              \
284         plugins\docsis\*.sbr            \
285         plugins\ethercat\*.sbr          \
286         plugins\gryphon\*.sbr           \
287         plugins\irda\*.sbr              \
288         plugins\m2m\*.sbr               \
289         plugins\mate\*.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       \
297         ui\*.sbr                        \
298         ui\cli\*.sbr                    \
299         ui\gtk\*.sbr                    \
300         ui\win32\*.sbr                  \
301         wiretap\*.sbr                   \
302         wsutil\*.sbr
303         $(BSCMAKE) @<<
304                 /o $@ $?
305 <<
306 !ELSE
307 wireshark.bsc:
308 !ENDIF
309
310 pdb_zip: all
311         cd $(INSTALL_DIR)
312         rm -f ../[Ww]ireshark-pdb-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).zip
313         zip -9 ../Wireshark-pdb-$(WIRESHARK_TARGET_PLATFORM)-$(VERSION).zip *.pdb *.lib
314         cd ..
315
316 $(RESOURCES): image
317
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
323
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
325         @echo Linking $@
326         $(LINK) @<<
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
328 <<
329 !IFDEF MANIFEST_INFO_REQUIRED
330         mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:$(PROGRAM_NAME).exe;1
331 !ENDIF
332
333 qtshark.exe     : install-generated-files $(LIBS_CHECK) config.h epan ui qt wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
334
335 tshark.exe      : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan ui cli image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
336         @echo Linking $@
337         $(LINK) @<<
338                 /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tshark_LIBS) $(tshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tshark.res
339 <<
340 !IFDEF MANIFEST_INFO_REQUIRED
341         mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
342 !ENDIF
343
344 tfshark.exe     : $(LIBS_CHECK) config.h $(tfshark_OBJECTS) epan ui cli image\tfshark.res wsutil\libwsutil.lib filetap\filetap-$(FTAP_VERSION).lib plugins
345         @echo Linking $@
346         $(LINK) @<<
347                 /OUT:tfshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tfshark_LIBS) $(tfshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tfshark.res
348 <<
349 !IFDEF MANIFEST_INFO_REQUIRED
350         mt.exe -nologo -manifest "tfshark.exe.manifest" -outputresource:tfshark.exe;1
351 !ENDIF
352
353 rawshark.exe    : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan ui image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
354         @echo Linking $@
355         $(LINK) @<<
356                 /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(rawshark_LIBS) $(rawshark_OBJECTS) ui\libui.lib image\rawshark.res
357 <<
358 !IFDEF MANIFEST_INFO_REQUIRED
359         mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
360 !ENDIF
361
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
364         @echo Linking $@
365         $(LINK) @<<
366                 /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(capinfos_OBJECTS) $(capinfos_LIBS) setargv.obj image\capinfos.res
367 <<
368 !IFDEF MANIFEST_INFO_REQUIRED
369         mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
370 !ENDIF
371
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
374         @echo Linking $@
375         $(LINK) @<<
376                 /OUT:captype.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(captype_OBJECTS) $(captype_LIBS) setargv.obj image\captype.res
377 <<
378 !IFDEF MANIFEST_INFO_REQUIRED
379         mt.exe -nologo -manifest "captype.exe.manifest" -outputresource:captype.exe;1
380 !ENDIF
381
382 editcap.exe     : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
383         @echo Linking $@
384         $(LINK) @<<
385                 /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(editcap_OBJECTS) $(editcap_LIBS) image\editcap.res
386 <<
387 !IFDEF MANIFEST_INFO_REQUIRED
388         mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
389 !ENDIF
390
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
393         @echo Linking $@
394         $(LINK) @<<
395                 /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(mergecap_OBJECTS) $(mergecap_LIBS) image\mergecap.res
396 <<
397 !IFDEF MANIFEST_INFO_REQUIRED
398         mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
399 !ENDIF
400
401 reordercap.exe  : $(LIBS_CHECK)  config.h reordercap.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\reordercap.res
402         @echo Linking $@
403         $(LINK) @<<
404                 /OUT:reordercap.exe $(conflags) $(conlibsdll) $(LDFLAGS) reordercap.obj $(reordercap_LIBS) setargv.obj image\reordercap.res
405 <<
406 !IFDEF MANIFEST_INFO_REQUIRED
407         mt.exe -nologo -manifest "reordercap.exe.manifest" -outputresource:reordercap.exe;1
408 !ENDIF
409
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
411         @echo Linking $@
412         $(LINK) @<<
413                 /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) text2pcap.obj text2pcap-scanner.obj pcapio.obj $(text2pcap_LIBS) image\text2pcap.res
414 <<
415 !IFDEF MANIFEST_INFO_REQUIRED
416         mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
417 !ENDIF
418
419 dftest.exe      : $(dftest_OBJECTS) epan ui
420         @echo Linking $@
421         $(LINK) @<<
422                 /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(dftest_LIBS) ui\libui.lib $(dftest_OBJECTS)
423 <<
424 !IFDEF MANIFEST_INFO_REQUIRED
425         mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
426 !ENDIF
427
428 randpkt.exe     : $(randpkt_OBJECTS)
429         @echo Linking $@
430         $(LINK) @<<
431                 /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(randpkt_LIBS) $(randpkt_OBJECTS)
432 <<
433 !IFDEF MANIFEST_INFO_REQUIRED
434         mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
435 !ENDIF
436
437 dumpcap.exe     : $(LIBS_CHECK) config.h $(dumpcap_OBJECTS) wsutil\libwsutil.lib image\dumpcap.res
438         @echo Linking $@
439         $(LINK) @<<
440                 /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(dumpcap_LIBS) $(dumpcap_OBJECTS) image\dumpcap.res
441 <<
442 !IFDEF MANIFEST_INFO_REQUIRED
443         mt.exe -nologo -manifest "dumpcap.exe.manifest" -outputresource:dumpcap.exe;1
444 !ENDIF
445
446
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 > $@
490
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
502 !ENDIF
503 !IFDEF KFW_DIR
504 CONFIG += wireshark_use_kfw
505 !ENDIF
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:\=/)
516
517 INTL_DLL = $(INTL_DLL)
518
519 guilibsdll = $(guilibsdll)
520
521 HHC_LIBS = $(HHC_LIBS)
522
523 SH = $(SH)
524 PYTHON = $(PYTHON)
525
526 MSVC_VARIANT = $(MSVC_VARIANT)
527 MSVCR_DLL = "$(MSVCR_DLL:\=/)"
528
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)
534
535 <<KEEP
536
537 #
538 # Build the version string
539 #
540 !IF EXIST(".svn/wc.db")
541 SVNENTRIES = .svn/wc.db
542 !ELSE IF EXIST(".svn/entries")
543 SVNENTRIES = .svn/entries
544 !ELSE
545 SVNENTRIES =
546 !ENDIF
547 svnversion.h: $(SVNENTRIES)
548         rm -f svnversion.h
549         $(PERL) make-version.pl
550
551
552 text2pcap-scanner.c : text2pcap-scanner.l
553         $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
554
555 text2pcap-scanner.obj : text2pcap-scanner.c
556         $(CC) $(GENERATED_CFLAGS) -Fd.\ -c $?
557
558 #
559 # The following targets will rebuild their respective objs
560 # if and when svnversion.h should change.
561 #
562 text2pcap.obj mergecap.obj capinfos.obj captype.obj editcap.obj reordercap.obj version_info.obj: svnversion.h
563
564
565 clean-local:
566         rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(tfshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
567                 $(EXECUTABLES) *.pdb *.sbr *.exe.manifest \
568                 capinfos.obj capinfos.exp capinfos.lib \
569                 captype.obj captype.exp captype.lib \
570                 editcap.obj editcap.exp editcap.lib \
571                 mergecap.obj text2pcap.obj \
572                 reordercap.obj nio-ie5.obj update.obj \
573                 text2pcap-scanner.obj text2pcap-scanner.c \
574                 config.h ps.c $(LIBS_CHECK) \
575                 dftest.obj dftest.exe randpkt.obj randpkt.exe \
576                 doxygen.cfg \
577                 $(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll \
578                 libwsutil.dll \
579                 wireshark.bsc
580         rm -rf $(INSTALL_DIR)
581         rm -rf wireshark-qt-release
582
583 clean: clean-local
584         cd asn1
585         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
586         cd ../wiretap
587         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
588         cd ../wsutil
589         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
590         cd ../filetap
591         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
592         cd ../codecs
593         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
594         cd ../ui
595         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
596         cd gtk
597         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
598 !IFDEF QT5_BASE_DIR
599         cd ../qt
600         -$(MAKE) clean
601 !ENDIF
602         cd ../win32
603         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
604         cd ../cli
605         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
606         cd ../../epan
607         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
608         cd ../plugins
609         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
610         cd ../tools
611         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
612         cd ../image
613         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
614         cd ../doc
615         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
616         cd ../docbook
617         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
618         cd ../help
619         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
620         cd ../packaging/nsis
621         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
622         cd ../portableapps/win32
623         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
624         cd ../../..
625
626 # "distclean" removes all files not part of the distribution.
627 # It does not remove generated files that are part of the distribution.
628 distclean-local: clean-local
629 !IFDEF ADNS_DIR
630         rm -f $(ADNS_DLL) $(ADNS_LIBS)
631 !ENDIF
632 !IFDEF ZLIB_DIR
633         rm -f $(ZLIB_DLL) $(ZLIB_DIR)\zlib1.dll.manifest \
634                 $(ZLIB_DIR)\include\zlib.h $(ZLIB_DIR)\include\zconf.h \
635                 $(ZLIB_DIR)\lib\zdll.lib
636 !ENDIF
637         rm -f config.h $(BUILT_SOURCES) wireshark-pdb*.zip
638
639 distclean: distclean-local
640         cd wiretap
641         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
642         cd ../filetap
643         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
644         cd ../wsutil
645         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
646         cd ../codecs
647         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
648         cd ../ui
649         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
650         cd gtk
651         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
652 !IFDEF QT5_BASE_DIR
653         cd ../qt
654         -$(MAKE) distclean
655 !ENDIF
656         cd ../win32
657         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
658         cd ../cli
659         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
660         cd ../../epan
661         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
662         cd ../plugins
663         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
664         cd ../tools
665         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
666         cd ../image
667         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
668         cd ../doc
669         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
670         cd ../docbook
671         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
672         cd ../help
673         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
674         cd ../packaging/nsis
675         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
676         cd ../portableapps/win32
677         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
678         cd ../../..
679
680 # Make "maintainer-clean" only if you would like to remove ALL generated
681 # files.
682 # Be sure to have python and perl installed to regenerate them.
683 maintainer-clean-local: distclean-local
684         rm -f $(GENERATED_FILES)
685
686 maintainer-clean: maintainer-clean-local
687         cd wiretap
688         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
689         cd ../filetap
690         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
691         cd ../wsutil
692         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
693         cd ../codecs
694         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
695         cd ../ui
696         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
697         cd gtk
698         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
699 !IFDEF QT5_BASE_DIR
700         cd ../qt
701         -$(MAKE) distclean
702 !ENDIF
703         cd ../win32
704         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
705         cd ../cli
706         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
707         cd ../../epan
708         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
709         cd ../plugins
710         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
711         cd ../tools
712         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
713         cd ../image
714         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
715         cd ../doc
716         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
717         cd ../docbook
718         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
719         cd ../help
720         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
721         cd ../packaging/nsis
722         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
723         cd ../portableapps/win32
724         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
725         cd ../../..
726
727 tools::
728         cd tools
729         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
730         cd ..
731
732 image::
733         cd image
734         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
735         cd ..
736
737 !IFDEF ADNS_DIR
738 # MSVC variants supported by Wireshark have to avoid indirectly using msvcrt.dll,
739 # therefore compile the adns dll from source ADNS_DIR package.
740 # To avoid path problems, copy the adns sources to a temp dir,
741 # compile and copy the resulting files back to (source) ADNS_DIR
742 #
743 # Unfortunately:
744 # - we need to "patch" adns_dll.rep and adns_dll.rc (at least for MSVC2005EE)
745 #
746 $(ADNS_DLL):
747         xcopy $(ADNS_DIR) adns.tmp /D /I /E /Y
748         copy adns_dll.dep adns.tmp\adns_win32\adns_dll
749         copy adns_dll.rc adns.tmp\adns_win32\adns_dll
750         cd adns.tmp\adns_win32\adns_dll
751         set CFG=adns_dll - Win32 Release
752         $(MAKE) /$(MAKEFLAGS) -f adns_dll.mak LOC="$(LOCAL_CFLAGS)"
753         cd ..\lib
754 !IFDEF MANIFEST_INFO_REQUIRED
755         mt.exe -nologo -manifest "adns_dll.dll.manifest" -outputresource:adns_dll.dll;2
756 !ENDIF
757         if not exist "$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns" mkdir "$(WIRESHARK_LIB_DIR)\$(MSVC_VARIANT)\adns"
758         copy adns_dll.dll $(ADNS_DLL)
759         copy adns_dll.lib $(ADNS_LIBS)
760         cd ..\..\..
761         rm -r -f adns.tmp
762 !ENDIF
763
764 !IFDEF ZLIB_DIR
765 # MSVC variants supported by Wireshark have to avoid indirectly using msvcrt.dll,
766 # therefore compile the zlib dll from source ZLIB_DIR package.
767 # To avoid path problems, copy the zlib sources to a temp dir,
768 # compile and copy the resulting files back to (source) ZLIB_DIR
769 $(ZLIB_DLL):
770         xcopy $(ZLIB_DIR) zlib.tmp /D /I /E /Y
771         cd zlib.tmp
772 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
773         $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj"
774 !else
775         $(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll AS=ml64 LOC="-DASMV -DASMINF" OBJA="inffasx64.obj gvmat64.obj inffas8664.obj"
776 !endif
777         if not exist $(ZLIB_DIR) mkdir $(ZLIB_DIR)
778         if not exist $(ZLIB_DIR)\lib mkdir $(ZLIB_DIR)\lib
779         if not exist $(ZLIB_DIR)\include mkdir $(ZLIB_DIR)\include
780 !IFDEF MANIFEST_INFO_REQUIRED
781         mt.exe -nologo -manifest "zlib1.dll.manifest" -outputresource:zlib1.dll;2
782 !ENDIF
783         copy zlib1.dll $(ZLIB_DIR)
784         copy zdll.lib $(ZLIB_DIR)\lib
785         copy zconf.h $(ZLIB_DIR)\include
786         copy zlib.h $(ZLIB_DIR)\include
787         cd ..
788         rm -r -f zlib.tmp
789 !ENDIF
790
791 wsutil::
792         cd wsutil
793         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
794         cd ..
795
796 wiretap::
797         cd wiretap
798         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
799         cd ..
800
801 filetap::
802         cd filetap
803         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
804         cd ..
805
806 codecs::
807         cd codecs
808         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
809         cd ..
810
811 ui:: help config.h svnversion.h doxygen
812         cd ui
813         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
814         cd ..
815
816 gtk:: help config.h svnversion.h doxygen
817         cd ui/gtk
818         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui.lib
819         cd ../..
820
821 # The Visual C++ static analyzer currently fails with error C2171
822 # when compiling summary_dialog.cpp. If/when this ever gets fixed
823 # we can remove the ENABLE_CODE_ANALYSIS check.
824 qt:: help config.h svnversion.h doxygen
825 !IFDEF QT5_BASE_DIR
826         cd ui/qt
827         $(QT5_BASE_DIR)\bin\qmake CONFIG+=release QtShark.pro
828 !IFDEF ENABLE_CODE_ANALYSIS
829         -nmake
830 !ELSE
831         nmake
832 !ENDIF
833         cd ../..
834 !ENDIF
835
836 win32::
837         cd ui/win32
838         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui_win32.lib
839         cd ../..
840
841 cli:: help config.h svnversion.h doxygen
842         cd ui/cli
843         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libcliui.lib
844         cd ../..
845
846 epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib filetap\filetap-$(FTAP_VERSION).lib $(BUILT_SOURCES) doxygen
847         cd epan
848         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
849         cd ..
850
851 plugins::
852         cd plugins
853         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
854         cd ..
855
856 doc::
857         cd doc
858         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
859         cd ..
860
861 docbook::
862         cd docbook
863         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
864         cd ..
865
866 help::
867         cd help
868         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
869         cd ..
870
871 doxygen.cfg: config.nmake doxygen.cfg.in
872         sed -e s/@VERSION@/$(VERSION)/ \
873             < doxygen.cfg.in > $@
874
875 doxygen-run:
876 !IFDEF DOXYGEN
877         $(DOXYGEN) doxygen.cfg
878 !ENDIF
879
880 doxygen: doxygen.cfg doxygen-run
881
882 services: tools\make-services.py
883         $(PYTHON) tools/make-services.py
884
885 ################################################################################
886 # Prepare build environment by downloading and installing required libraries
887 ################################################################################
888
889 # The required tools to build Wireshark.
890 #
891 # The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
892 # We only need the cygwin version (for some shell scripts).
893 # In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
894 REQUIRED_TOOLS=\
895         $(CC) \
896         $(LINK) \
897         nmake \
898 !IFDEF MANIFEST_INFO_REQUIRED
899         --windowsonly mt        \
900 !ENDIF
901         $(SH_PROG)      \
902         $(YACC) \
903         $(LEX)  \
904         env     \
905         grep    \
906         --cygwinonly /usr/bin/find      \
907         peflags \
908         $(PERL) \
909         $(PYTHON)       \
910 !IFDEF QT5_BASE_DIR
911         --windowsonly $(QT5_BASE_DIR)\bin\qmake \
912 !ENDIF
913         sed     \
914         unzip   \
915         wget
916
917 verify_tools:
918 # As win-setup.sh assumes the dir exists create it if it doesn't
919         @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
920         @$(SH) $(WIN_SETUP) --appverify $(REQUIRED_TOOLS)
921
922 # Targets and etc used to verify or download libraries
923
924 !IFNDEF WIN_SETUP_OPT
925 WIN_SETUP_OPT=--download
926 !ENDIF
927
928 # Verify that the required library 'package' (zip) files have been downloaded.
929 # (It seems reasonable to assume that if the files have been downloaded
930 #  then they have been installed).
931 check_libs:
932         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN_SETUP_OPT=--libverify process_libs
933
934 # Verify library packages:
935 #  If $(CHECK_TAG) is non-null then checktag failed; Exit with an error message. (See beginning of this Makefile).
936 #  Otherwise do detailed library package files verification only if Makefile.nmake or config.make have been updated
937 #  (or dummy file doesn't exist because of 'make clean' or whatever).
938 #  Note that the creation/modification time of a file after an svn update of that file
939 #   is the time of the update (not the time of the file in the repository).
940 # touch is only called if libverify succeeds.
941 $(LIBS_CHECK):  $(CHECK_TAG) config.nmake Makefile.nmake
942         @echo  Verifying library package files ...
943         @$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN_SETUP_OPT=--libverify process_libs
944         @touch $@
945
946 # Target for "checktag failed" (libraries not up to date).
947 # Defined only if "checktag" failed (see beginning of this Makefile).
948 !IF "$(CHECK_TAG)" != ""
949 $(CHECK_TAG): _FORCE_
950         @echo \? Wireshark Libraries not up-to-date \?
951         @echo \? Do you need to run "nmake -f Makefile.nmake setup" \?
952         @echo.
953         @exit 1
954
955 !ENDIF
956
957 # Download (if needed) and install all the required libraries into WIRESHARK_LIB_DIR.
958 # A clean_setup is done first to ensure that the target dirs don't
959 # contain old files remaining from a previous setup run.
960 setup: verify_tools clean_setup process_libs
961
962 install_qt:
963         $(SH) $(WIN_SETUP) --download "C:\Qt" \
964                 . Qt-5.1.1-MSVC2010-$(WIRESHARK_TARGET_PLATFORM)-ws.zip
965         
966 # The process_libs target when invoked causes either a --libverify or a --download for all the required libraries.
967 # (The choice is determined by the value of the macro WIN_SETUP_OPT).
968 process_libs:
969         @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
970         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
971                 . WinPcap_$(WINPCAP_VERSION).exe
972 !IFNDEF QT5_BASE_DIR
973 !MESSAGE Can't find Qt. This will become a problem at some point.
974 !ENDIF
975 !IFDEF GTK_DIR
976         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
977                 "$(GTK_NAME)" gtk+-bundle_$(GTK_PKG)_$(WIRESHARK_TARGET_PLATFORM)$(PKG_SUFIX).zip
978 !ENDIF
979 !IFDEF KFW_DIR
980         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
981                 . kfw-3-2-2-i386-ws-vc6.zip
982 #       @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
983 #               . kfw-3-2-2.zip
984 !ENDIF
985 !IFDEF PCAP_DIR
986         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
987                 . WpdPack_$(WPD_VERSION).zip
988 !ENDIF
989 !IFDEF AIRPCAP_DIR
990         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
991                 AirPcap_Devpack_4_1_0_1622 AirPcap_Devpack_4_1_0_1622.zip
992 !ENDIF
993 !IFDEF C_ARES_DIR
994         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
995                 . c-ares-$(C_ARES_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
996 !ENDIF
997 !IFDEF ADNS_DIR
998         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
999                 . adns-1.0-win32-05ws.zip
1000 !ENDIF
1001 !IFDEF ZLIB_DIR
1002         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1003 !if "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
1004                 zlib125 zlib-1.2.5.zip
1005 !else
1006                 zlib125 zlib125ws.zip
1007 !endif
1008 !ENDIF
1009 !IFDEF LUA_DIR
1010         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1011                 lua5.1.4 lua$(LUA_DIST)_lib.zip
1012 !ENDIF
1013
1014 !IFDEF GNUTLS_PKG
1015         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1016                 . gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1017 !ENDIF
1018 !IFDEF PORTAUDIO_DIR
1019         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1020                 . portaudio_v19_2.zip
1021 !ENDIF
1022 !IFDEF SMI_DIR
1023         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1024                 . libsmi-$(SMI_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1025 !ENDIF
1026 !IFDEF GEOIP_DIR
1027         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1028                 GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws GeoIP-$(GEOIP_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
1029 !ENDIF
1030 !IFDEF WINSPARKLE_DIR
1031         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1032                 . WinSparkle-$(WINSPARKLE_PKG).zip
1033 !ENDIF
1034 !IFDEF HHC_DIR
1035         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1036                 user-guide user-guide-52567.zip
1037 !ENDIF
1038 !IFDEF UPX
1039         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1040                 . upx303w.zip
1041 !ENDIF
1042 !IFDEF NASM
1043         @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
1044                 . nasm-2.09.08-win32.zip
1045 !ENDIF
1046 !IF "$(WIN_SETUP_OPT)" == "--download"
1047         @$(SH) $(WIN_SETUP) --settag "$(WIRESHARK_LIB_DIR)"
1048 !ENDIF
1049         @echo.
1050         @echo Wireshark is ready to build.
1051
1052 # Cleanup files installed by the setup target. It will not remove the
1053 # downloaded zip files.
1054 # WHEN UPDATING LIBRARY VERSIONS, KEEP ALSO ONE FORMER VERSION SO
1055 # UPDATING REMOVES THE FORMER USER DIRS
1056 clean_setup:
1057         cd "$(WIRESHARK_LIB_DIR)"
1058         rm -r -f adns-1.0-win32-05ws
1059         rm -r -f c-ares-1.5.3ws
1060         rm -r -f c-ares-1.6.0ws
1061         rm -r -f c-ares-1.7.0-win??ws
1062         rm -r -f c-ares-1.7.1-win??ws
1063         rm -r -f c-ares-1.9.1-1-win??ws
1064         rm -r -f gettext-0.14.5
1065         rm -r -f gettext-runtime-0.17
1066         rm -r -f gettext-runtime-0.17-1
1067         rm -r -f gettext-0.17-1            # win64
1068         rm -r -f glib
1069         rm -r -f gnutls-2.8.1-1
1070         rm -r -f gnutls-2.8.5-*-win??ws
1071         rm -r -f gnutls-2.10.3-*-win??ws
1072         rm -r -f gnutls-2.12.18-*-win??ws
1073 !IF "$(GTK_NAME)" == "gtk2"
1074         rm -r -f gtk2
1075 !ELSE
1076         rm -r -f gtk3
1077 !ENDIF
1078         rm -r -f gtk+
1079         rm -r -f gtk-wimp
1080         rm -r -f kfw-2.5
1081         rm -r -f kfw-3-2-2-final
1082         rm -r -f kfw-3.2.2-ws1
1083         rm -r -f kfw-3-2-2-i386-ws-vc6
1084         rm -r -f libiconv-1.9.1.bin.woe32
1085         rm -r -f lua5.1
1086         rm -r -f lua5.1.4
1087         rm -r -f libsmi-0.4.5
1088         rm -r -f libsmi-0.4.8
1089         rm -r -f libsmi-svn-40773-win??ws
1090         rm -r -f nasm-2.00
1091         rm -r -f nasm-2.02
1092         rm -r -f nasm-2.09.08
1093         rm -r -f pcre-6.4
1094         rm -r -f pcre-7.0
1095         rm -r -f portaudio_v19
1096         rm -r -f portaudio_v19_2
1097         rm -r -f upx301w
1098         rm -r -f upx303w
1099         rm -r -f user-guide
1100         rm -r -f zlib123
1101         rm -r -f zlib125
1102         rm -r -f zlib-1.2.5
1103         rm -r -f zlib123-dll
1104         rm -r -f AirPcap_Devpack_1_0_0_594
1105         rm -r -f AirPcap_Devpack_4_0_0_1480
1106         rm -r -f AirPcap_Devpack_4_1_0_1622
1107         rm -r -f GeoIP-1.4.5ws
1108         rm -r -f GeoIP-1.4.6-win??ws
1109         rm -r -f GeoIP-1.4.8-win??ws
1110         rm -r -f GeoIP-1.4.8-*-win??ws
1111         rm -r -f GeoIP-1.5.1-*-win??ws
1112         rm -r -f WinSparkle-0.3-44-g2c8d9d3-win??ws
1113         rm -r -f WpdPack
1114         cd "$(MAKEDIR)"
1115
1116 ################################################################################
1117 # Prepare the debug trees for running Wireshark/Tshark from there.
1118 ################################################################################
1119
1120
1121 # prepare debugging of Wireshark in INSTALL_DIR
1122 debug-wireshark: wireshark.exe install-generated-files
1123
1124 # prepare debugging of tshark in INSTALL_DIR
1125 debug-tshark: tshark.exe install-generated-files
1126
1127 # prepare debugging of tfshark in INSTALL_DIR
1128 debug-tfshark: tfshark.exe install-generated-files
1129
1130 # prepare debugging of rawshark in INSTALL_DIR
1131 debug-rawshark: rawshark.exe install-generated-files
1132
1133 # prepare debugging of dumpcap in INSTALL_DIR
1134 debug-dumpcap: dumpcap.exe install-generated-files
1135
1136
1137 # install generated files (exe, "our" libs, ...)
1138 install-generated-files: doc
1139         set copycmd=/y
1140         if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
1141 !IF DEFINED (MSVCR_DLL) && "$(MSVC_VARIANT)" == "MSVC2008"
1142         xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)\*.* /d
1143 !ENDIF
1144 !IFDEF ENABLE_LIBWIRESHARK
1145         xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
1146         if exist epan\libwireshark.lib xcopy .\epan\libwireshark.lib $(INSTALL_DIR) /d
1147         if exist epan\libwireshark.pdb xcopy .\epan\libwireshark.pdb $(INSTALL_DIR) /d
1148 !ENDIF
1149         xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
1150         if exist ".\wiretap\wiretap-$(WTAP_VERSION).lib" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).lib" $(INSTALL_DIR) /d
1151         if exist ".\wiretap\wiretap-$(WTAP_VERSION).pdb" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).pdb" $(INSTALL_DIR) /d
1152         xcopy ".\filetap\filetap-$(FTAP_VERSION).dll" $(INSTALL_DIR) /d
1153         if exist ".\filetap\filetap-$(FTAP_VERSION).lib" xcopy ".\filetap\filetap-$(FTAP_VERSION).lib" $(INSTALL_DIR) /d
1154         if exist ".\filetap\filetap-$(FTAP_VERSION).pdb" xcopy ".\filetap\filetap-$(FTAP_VERSION).pdb" $(INSTALL_DIR) /d
1155         xcopy ".\wsutil\libwsutil.dll" $(INSTALL_DIR) /d
1156         if exist ".\wsutil\libwsutil.lib" xcopy ".\wsutil\libwsutil.lib" $(INSTALL_DIR) /d
1157         if exist ".\wsutil\libwsutil.pdb" xcopy ".\wsutil\libwsutil.pdb" $(INSTALL_DIR) /d
1158         if exist $(PROGRAM_NAME).exe xcopy $(PROGRAM_NAME).exe $(INSTALL_DIR) /d
1159         if exist $(PROGRAM_NAME).pdb xcopy $(PROGRAM_NAME).pdb $(INSTALL_DIR) /d
1160         if exist $(PROGRAM_NAME).bsc xcopy $(PROGRAM_NAME).bsc $(INSTALL_DIR) /d
1161         if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL_DIR) /d
1162         if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
1163         if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
1164         if exist captype.exe xcopy captype.exe $(INSTALL_DIR) /d
1165         if exist captype.pdb xcopy captype.pdb $(INSTALL_DIR) /d
1166         if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL_DIR) /d
1167         if exist dumpcap.pdb xcopy dumpcap.pdb $(INSTALL_DIR) /d
1168         if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
1169         if exist editcap.pdb xcopy editcap.pdb $(INSTALL_DIR) /d
1170         if exist mergecap.exe xcopy mergecap.exe $(INSTALL_DIR) /d
1171         if exist mergecap.pdb xcopy mergecap.pdb $(INSTALL_DIR) /d
1172         if exist reordercap.exe xcopy reordercap.exe $(INSTALL_DIR) /d
1173         if exist reordercap.pdb xcopy reordercap.pdb $(INSTALL_DIR) /d
1174         if exist rawshark.exe xcopy rawshark.exe $(INSTALL_DIR) /d
1175         if exist rawshark.pdb xcopy rawshark.pdb $(INSTALL_DIR) /d
1176         if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL_DIR) /d
1177         if exist text2pcap.pdb xcopy text2pcap.pdb $(INSTALL_DIR) /d
1178         if exist tfshark.exe xcopy tfshark.exe $(INSTALL_DIR) /d
1179         if exist tfshark.pdb xcopy tfshark.pdb $(INSTALL_DIR) /d
1180         if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
1181         if exist tshark.pdb xcopy tshark.pdb $(INSTALL_DIR) /d
1182         xcopy "doc\AUTHORS-SHORT" $(INSTALL_DIR) /d
1183         xcopy ".\manuf" $(INSTALL_DIR) /d
1184         xcopy ".\services" $(INSTALL_DIR) /d
1185         xcopy ".\pdml2html.xsl" $(INSTALL_DIR) /d
1186         $(TEXTIFY) "./COPYING" $(INSTALL_DIR)
1187         $(TEXTIFY) "./NEWS" $(INSTALL_DIR)
1188         $(TEXTIFY) "./README" $(INSTALL_DIR)
1189         $(TEXTIFY) "./README.windows" $(INSTALL_DIR)
1190         xcopy ".\cfilters" $(INSTALL_DIR) /d
1191         xcopy ".\colorfilters" $(INSTALL_DIR) /d
1192         xcopy ".\dfilters" $(INSTALL_DIR) /d
1193         xcopy ".\smi_modules" $(INSTALL_DIR) /d
1194 !IFDEF LUA_DIR
1195         xcopy ".\epan\wslua\init.lua" $(INSTALL_DIR) /d
1196         xcopy ".\epan\wslua\console.lua" $(INSTALL_DIR) /d
1197 !ENDIF
1198 !IFDEF PYTHON_DIR
1199         if not exist $(INSTALL_DIR)\python mkdir $(INSTALL_DIR)\python
1200         xcopy ".\epan\wspython\register-dissector.py" $(INSTALL_DIR)\python /d
1201         xcopy ".\epan\wspython\wspy_dissector.py" $(INSTALL_DIR)\python /d
1202         xcopy ".\epan\wspython\wspy_libws.py" $(INSTALL_DIR)\python /d
1203 !ENDIF
1204         xcopy ipmap.html $(INSTALL_DIR) /d
1205         xcopy doc\*.html $(INSTALL_DIR) /d
1206         if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
1207         xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
1208 # you can't reliably use xcopy to rename files "on the fly" (so copy first, then rename)
1209         xcopy ".\help\faq.txt" $(INSTALL_DIR) /d
1210         $(UNIX2DOS) $(INSTALL_DIR)/help/*.txt
1211         if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
1212         xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
1213         if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
1214         echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
1215         if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
1216         xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
1217         if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
1218         xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
1219         xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
1220         if not exist $(INSTALL_DIR)\tpncp mkdir $(INSTALL_DIR)\tpncp
1221         xcopy ".\tpncp\*.dat" $(INSTALL_DIR)\tpncp /d
1222         if not exist $(INSTALL_DIR)\wimaxasncp mkdir $(INSTALL_DIR)\wimaxasncp
1223         xcopy ".\wimaxasncp\*.*" $(INSTALL_DIR)\wimaxasncp /d
1224         if not exist $(INSTALL_DIR)\plugins mkdir $(INSTALL_DIR)\plugins
1225         if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
1226         cd plugins
1227         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-plugins
1228         cd ..
1229         if not exist $(INSTALL_DIR)\profiles mkdir $(INSTALL_DIR)\profiles
1230         if not exist $(INSTALL_DIR)\profiles\Bluetooth mkdir $(INSTALL_DIR)\profiles\Bluetooth
1231         xcopy ".\profiles\Bluetooth\colorfilters" $(INSTALL_DIR)\profiles\Bluetooth /d
1232         if not exist $(INSTALL_DIR)\profiles\Classic mkdir $(INSTALL_DIR)\profiles\Classic
1233         xcopy ".\profiles\Classic\colorfilters" $(INSTALL_DIR)\profiles\Classic /d
1234
1235 # "install-all" will copy all files needed to run Wireshark/Tshark
1236 # to the INSTALL_DIR, so you can run/debug Wireshark/Tshark from there.
1237 install-all: install-generated-files
1238         set copycmd=/y
1239         if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
1240 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1241         xcopy $(GTK_DIR)\bin\libgdk-3-0.dll $(INSTALL_DIR) /d
1242         xcopy $(GTK_DIR)\bin\libgtk-3-0.dll $(INSTALL_DIR) /d
1243 !ELSE
1244         xcopy $(GTK_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL_DIR) /d
1245         xcopy $(GTK_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL_DIR) /d
1246 !ENDIF
1247         xcopy $(GTK_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL_DIR) /d
1248         xcopy $(GTK_DIR)\bin\libatk-1.0-0.dll $(INSTALL_DIR) /d
1249         xcopy $(GTK_DIR)\bin\libpango-1.0-0.dll $(INSTALL_DIR) /d
1250         xcopy $(GTK_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL_DIR) /d
1251         if not exist $(INSTALL_DIR)\lib mkdir $(INSTALL_DIR)\lib
1252         if not exist $(INSTALL_DIR)\etc mkdir $(INSTALL_DIR)\etc
1253         if not exist $(INSTALL_DIR)\$(GTK_ETC_DIR) mkdir $(INSTALL_DIR)\$(GTK_ETC_DIR)
1254         xcopy $(GTK_DIR)\$(GTK_ETC_DIR)\*.* $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1255 #       if not exist $(INSTALL_DIR)\etc\pango mkdir $(INSTALL_DIR)\etc\pango
1256 #       xcopy $(GTK_DIR)\etc\pango\pango.* $(INSTALL_DIR)\etc\pango /d
1257 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1258         if not exist $(INSTALL_DIR)\lib\gtk-3.0 mkdir $(INSTALL_DIR)\lib\gtk-3.0
1259         if not exist $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR)
1260         xcopy ".\ui\win32\settings.ini" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1261 !ELSE
1262         if not exist $(INSTALL_DIR)\lib\gtk-2.0 mkdir $(INSTALL_DIR)\lib\gtk-2.0
1263         if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)
1264         if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders
1265         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
1266 !ENDIF
1267 !IFDEF GTK_ENGINES_DIR
1268         if not exist $(INSTALL_DIR)\$(GTK_ENGINES_DIR) mkdir $(INSTALL_DIR)\$(GTK_ENGINES_DIR)
1269         xcopy $(GTK_DIR)\$(GTK_ENGINES_DIR)\libpixmap.dll $(INSTALL_DIR)\$(GTK_ENGINES_DIR) /d
1270         xcopy $(GTK_DIR)\$(GTK_ENGINES_DIR)\libwimp.dll $(INSTALL_DIR)\$(GTK_ENGINES_DIR) /d
1271 !ENDIF
1272 !IFDEF GTK_THEMES_DIR
1273         xcopy "$(GTK_DIR)\$(GTK_THEMES_DIR)\gtkrc" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
1274 !ENDIF
1275 !IFDEF GTK_MODULES_DIR
1276         if not exist $(INSTALL_DIR)\$(GTK_MODULES_DIR) mkdir $(INSTALL_DIR)\$(GTK_MODULES_DIR)
1277         xcopy $(GTK_DIR)\$(GTK_MODULES_DIR)\libgail.dll $(INSTALL_DIR)\$(GTK_MODULES_DIR) /d
1278 !ENDIF
1279 !IFDEF NEED_CAIRO_GOBJECT_DLL
1280         xcopy $(GTK_DIR)\bin\libcairo-gobject-2.dll $(INSTALL_DIR)  /d
1281 !ENDIF
1282 !IFDEF NEED_CAIRO_DLL
1283         xcopy $(GTK_DIR)\bin\libcairo-2.dll $(INSTALL_DIR)  /d
1284         xcopy $(GTK_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL_DIR) /d
1285 !ENDIF
1286 !IFDEF NEED_EXPAT_DLL
1287         xcopy $(GTK_DIR)\bin\$(EXPAT_DLL) $(INSTALL_DIR) /d
1288 !ENDIF
1289 !IFDEF NEED_FFI_DLL
1290         xcopy $(GTK_DIR)\bin\$(FFI_DLL) $(INSTALL_DIR) /d
1291 !ENDIF
1292 !IFDEF NEED_FONTCONFIG_DLL
1293         xcopy $(GTK_DIR)\bin\$(FONTCONFIG_DLL) $(INSTALL_DIR) /d
1294 !ENDIF
1295 !IFDEF NEED_FREETYPE_DLL
1296         xcopy $(GTK_DIR)\bin\libpangoft2-1.0-0.dll $(INSTALL_DIR) /d
1297         xcopy $(GTK_DIR)\bin\$(FREETYPE_DLL) $(INSTALL_DIR) /d
1298 !ENDIF
1299 !IFDEF NEED_JASPER_DLL
1300         xcopy $(GTK_DIR)\bin\$(JASPER_DLL) $(INSTALL_DIR) /d
1301 !ENDIF
1302 !IFDEF NEED_JPEG_DLL
1303         xcopy $(GTK_DIR)\bin\$(JPEG_DLL) $(INSTALL_DIR) /d
1304 !ENDIF
1305 !IFDEF NEED_LZMA_DLL
1306         xcopy $(GTK_DIR)\bin\$(LZMA_DLL) $(INSTALL_DIR) /d
1307 !ENDIF
1308 !IFDEF NEED_PIXMAN_DLL
1309         xcopy $(GTK_DIR)\bin\$(PIXMAN_DLL) $(INSTALL_DIR) /d
1310 !ENDIF
1311 !IFDEF NEED_PNG_DLL
1312         xcopy $(GTK_DIR)\bin\$(PNG_DLL) $(INSTALL_DIR) /d
1313 !ENDIF
1314 !IFDEF NEED_TIFF_DLL
1315         xcopy $(GTK_DIR)\bin\$(TIFF_DLL) $(INSTALL_DIR) /d
1316 !ENDIF
1317 !IFDEF NEED_XML_DLL
1318         xcopy $(GTK_DIR)\bin\$(XML_DLL) $(INSTALL_DIR) /d
1319 !ENDIF
1320 !IFDEF GTK_SCHEMAS_DIR
1321         if not exist $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR) mkdir $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR)
1322         if not exist $(GTK_DIR)\$(GTK_SCHEMAS_DIR)\gschemas.compiled $(GTK_DIR)\bin\glib-compile-schemas $(GTK_DIR)\$(GTK_SCHEMAS_DIR)
1323         xcopy $(GTK_DIR)\$(GTK_SCHEMAS_DIR)\gschemas.compiled  $(INSTALL_DIR)\$(GTK_SCHEMAS_DIR) /d
1324 !ENDIF
1325         xcopy $(GTK_DIR)\bin\libgio-2.0-0.dll $(INSTALL_DIR) /d
1326         xcopy $(GTK_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
1327         xcopy $(GTK_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
1328         xcopy $(GTK_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
1329         xcopy $(GTK_DIR)\bin\libgthread-2.0-0.dll $(INSTALL_DIR) /d
1330         xcopy $(GTK_DIR)\bin\$(INTL_DLL) $(INSTALL_DIR) /d
1331 !IFDEF ZLIB_DIR
1332         xcopy $(ZLIB_DLL) $(INSTALL_DIR) /d
1333 !ENDIF
1334 !IFDEF C_ARES_DIR
1335         xcopy $(C_ARES_DLL) $(INSTALL_DIR) /d
1336 !ENDIF
1337 !IFDEF ADNS_DIR
1338         xcopy $(ADNS_DLL) $(INSTALL_DIR) /d
1339 !ENDIF
1340 !IFDEF KFW_DIR
1341         xcopy $(KFW_PATH)\comerr32.dll $(INSTALL_DIR) /d
1342         xcopy $(KFW_PATH)\krb5_32.dll $(INSTALL_DIR) /d
1343         xcopy $(KFW_PATH)\k5sprt32.dll $(INSTALL_DIR) /d
1344 !ENDIF
1345 !IFDEF GNUTLS_DIR
1346         xcopy $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(INSTALL_DIR) /d
1347         xcopy $(GNUTLS_DIR)\bin\libgnutls-26.dll $(INSTALL_DIR) /d
1348         xcopy $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(INSTALL_DIR) /d
1349         xcopy $(GNUTLS_DIR)\bin\libtasn1-3.dll $(INSTALL_DIR) /d
1350 ! IF "$(INTL_DLL)" != "libintl-8.dll"
1351 # The gtk+ bundle doesn't provide libintl-8.dll (which is the case
1352 # with the 32-bit package); use the GNUTLS version.
1353         xcopy $(GNUTLS_DIR)\bin\libintl-8.dll $(INSTALL_DIR) /d
1354 ! ENDIF
1355 !ENDIF
1356 !IFDEF LUA_DIR
1357         xcopy "$(LUA_DIR)\lua5.1.dll" $(INSTALL_DIR) /d
1358 !ENDIF
1359 !IFDEF SMI_DIR
1360         if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
1361         if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
1362         xcopy "$(SMI_DIR)\bin\libsmi-2.dll" $(INSTALL_DIR) /d
1363         xcopy "$(SMI_DIR)\share\mibs\iana\*" $(INSTALL_DIR)\snmp\mibs /d
1364         xcopy "$(SMI_DIR)\share\mibs\ietf\*" $(INSTALL_DIR)\snmp\mibs /d
1365         xcopy "$(SMI_DIR)\share\mibs\irtf\*" $(INSTALL_DIR)\snmp\mibs /d
1366         xcopy "$(SMI_DIR)\share\mibs\site\*" $(INSTALL_DIR)\snmp\mibs /d
1367         xcopy "$(SMI_DIR)\share\mibs\tubs\*" $(INSTALL_DIR)\snmp\mibs /d
1368         xcopy "$(SMI_DIR)\share\pibs\*" $(INSTALL_DIR)\snmp\mibs /d
1369         xcopy "$(SMI_DIR)\share\yang\*.yang" $(INSTALL_DIR)\snmp\mibs /d
1370 !ENDIF
1371 !IFDEF GEOIP_DIR
1372         xcopy "$(GEOIP_DIR)\bin\libGeoip-1.dll" $(INSTALL_DIR) /d
1373 !ENDIF
1374 !IFDEF WINSPARKLE_DIR
1375         xcopy "$(WINSPARKLE_DIR)\WinSparkle.dll" $(INSTALL_DIR) /d
1376 !ENDIF
1377         cd $(INSTALL_DIR)
1378         peflags --dynamicbase=true --nxcompat=true *.dll
1379 !IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
1380 !ELSE
1381         peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/*/engines/*.dll
1382         peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/modules/*.dll
1383 !ENDIF
1384         cd ..
1385
1386 checkapi_local:
1387         $(PERL) tools/checkAPIs.pl -build \
1388         $(WIRESHARK_COMMON_SRC) \
1389         $(TSHARK_TAP_SRC) \
1390 #       $(EXTRA_wireshark_SOURCES)
1391
1392 checkapi: checkapi_local
1393         cd wiretap
1394         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1395         cd ../filetap
1396         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1397         cd ../codecs
1398         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1399         cd ../ui
1400         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1401         cd gtk
1402         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1403         cd ../win32
1404         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1405         cd ../../epan
1406 ##      $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1407         cd ../epan/crypt
1408 ##      $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1409         cd ../dfilter
1410         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1411         cd ../ftypes
1412 ##      $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1413         cd ../wslua
1414 ##      $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1415         cd ../dissectors
1416         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1417         cd ..
1418         cd ../plugins
1419         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1420         cd ../wsutil
1421         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
1422
1423 ####
1424 _FORCE_:  ## Assumption: no file named _FORCE_ exists in the current directory