Adding ISC Object Management API dissector
[obnox/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 include config.nmake
7 include <win32.mak>
8
9 ############### no need to modify below this line #########
10
11 CC = cl          
12 LINK= link
13          
14 LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
15
16 CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
17         $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
18         $(NET_SNMP_CFLAGS) \
19         $(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(LUA_CFLAGS) \
20         -D_U_="" -D_NEED_VAR_IMPORT_
21
22 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
23
24 .c.obj::
25         $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
26
27 PLATFORM_SRC = capture-wpcap.c capture_wpcap_packet.c
28
29 include Makefile.common
30
31 wireshark_OBJECTS = $(wireshark_SOURCES:.c=.obj)
32 tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
33 dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
34 dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
35 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
36
37 EXTRA_OBJECTS = \
38         mkstemp.obj     \
39         strptime.obj
40
41 wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
42         wsock32.lib user32.lib shell32.lib comctl32.lib \
43         $(NET_SNMP_LIBS) \
44         $(HHC_LIBS) \
45 !IFDEF ENABLE_LIBWIRESHARK
46         epan\libwireshark.lib \
47 !ELSE
48         epan\dissectors\dissectors.lib \
49         epan\wireshark.lib \
50         epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
51         $(ADNS_LIBS) \
52         $(PCRE_LIBS) \
53         $(ZLIB_LIBS) \
54         $(GNUTLS_LIBS) 
55 !ENDIF
56
57 tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
58         wsock32.lib user32.lib \
59         $(GLIB_LIBS) \
60         $(NET_SNMP_LIBS) \
61 !IFDEF ENABLE_LIBWIRESHARK
62         epan\libwireshark.lib \
63 !ELSE
64         epan\dissectors\dissectors.lib \
65         epan\wireshark.lib \
66         epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
67         $(ADNS_LIBS) \
68         $(PCRE_LIBS) \
69         $(ZLIB_LIBS) \
70         $(GNUTLS_LIBS)
71 !ENDIF
72
73 capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
74         wsock32.lib user32.lib \
75         $(GLIB_LIBS)
76
77 editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
78         wsock32.lib user32.lib \
79         $(GLIB_LIBS)
80
81 mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
82         wsock32.lib user32.lib \
83         $(GLIB_LIBS)
84
85 dumpcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
86         wsock32.lib user32.lib \
87         $(GLIB_LIBS)
88
89 dftest_LIBS=  wiretap\wiretap-$(WTAP_VERSION).lib \
90         wsock32.lib user32.lib \
91         $(GLIB_LIBS) \
92         $(NET_SNMP_LIBS) \
93 !IFDEF ENABLE_LIBWIRESHARK
94         epan\libwireshark.lib \
95 !ELSE
96         epan\dissectors\dissectors.lib \
97         epan\wireshark.lib \
98         epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
99         $(ADNS_LIBS) \
100         $(PCRE_LIBS) \
101         $(ZLIB_LIBS) \
102         $(GNUTLS_LIBS)  
103 !ENDIF
104
105 randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
106         user32.lib \
107         $(GLIB_LIBS) \
108         $(NET_SNMP_LIBS)
109
110 EXECUTABLES=wireshark.exe wireshark-gtk2.exe tshark.exe \
111         capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe dumpcap.exe
112
113 RESOURCES=image\wireshark.res image\libwireshark.res image\tshark.res \
114         image\capinfos.res image\editcap.res image\mergecap.res \
115         image\text2pcap.res image\wiretap.res image\dumpcap.res
116
117 all: config.h tools image codecs wiretap epan $(EXECUTABLES) $(RESOURCES) doc install-deps
118
119 packaging: all
120         cd packaging
121         cd nsis
122         nmake -f makefile.nmake
123         cd ..
124         cd ..
125
126 separate_packaging: all
127         cd packaging
128         cd nsis
129 !IFDEF GTK1_DIR
130         nmake -f makefile.nmake GTK1_ONLY="USE"
131 !ENDIF
132 !IFDEF GTK2_DIR
133         nmake -f makefile.nmake GTK2_ONLY="USE"
134 !ENDIF
135         cd ..
136         cd ..
137
138 packaging_u3: all
139         cd packaging
140         cd u3
141         cd win32
142         nmake -f makefile.nmake
143         cd ..
144         cd ..
145         cd ..
146
147 # use (info-)zip from cygwin to pack things
148 packaging_zip1: all
149         rm -f wireshark-gtk1.zip
150         zip -r -9 wireshark-gtk1.zip $(INSTALL1_DIR)/*.*
151
152 # use (info-)zip from cygwin to pack things
153 packaging_zip2: all
154         rm -f wireshark-gtk2.zip
155         zip -r -9 wireshark-gtk2.zip $(INSTALL2_DIR)/*.*
156
157 packaging_zip: packaging_zip1 packaging_zip2
158
159
160 $(RESOURCES): image
161
162 wiretap\wiretap-$(WTAP_VERSION).lib: image wiretap
163
164 !IFNDEF GTK1_DIR
165 wireshark.exe   : 
166 !ELSE
167 wireshark.exe   : config.h svnversion.h $(wireshark_OBJECTS) getopt.obj codecs epan gtk image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
168         @echo Linking $@
169         $(LINK) @<<
170                 /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj $(GTK1_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
171 <<
172 !ENDIF
173
174 !IFNDEF GTK2_DIR
175 wireshark-gtk2.exe      : 
176 !ELSE
177 wireshark-gtk2.exe      : config.h svnversion.h $(wireshark_OBJECTS) getopt.obj codecs epan gtk2 image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk2.tmp\libui.lib plugins
178         @echo Linking $@
179         $(LINK) @<<
180                 /OUT:wireshark-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj $(GTK2_LIBS) codecs\codecs.lib gtk2.tmp\libui.lib $(wireshark_OBJECTS) image\wireshark.res
181 <<
182 !ENDIF
183
184 tshark.exe      : config.h svnversion.h $(tshark_OBJECTS) getopt.obj epan image\tshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
185         @echo Linking $@
186         $(LINK) @<<
187                 /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj image\tshark.res
188 <<
189
190 capinfos.exe    : config.h capinfos.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
191         @echo Linking $@
192         $(LINK) @<<
193                 /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console capinfos.obj getopt.obj $(capinfos_LIBS) image\capinfos.res
194 <<
195
196 editcap.exe     : config.h editcap.obj getopt.obj strptime.obj epan\crypt-md5.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
197         @echo Linking $@
198         $(LINK) @<<
199                 /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj strptime.obj epan\crypt-md5.obj $(editcap_LIBS) image\editcap.res
200 <<
201
202 mergecap.exe    : config.h svnversion.h mergecap.obj merge.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
203         @echo Linking $@
204         $(LINK) @<<
205                 /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
206 <<
207
208 text2pcap.exe   : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
209         @echo Linking $@
210         $(LINK) @<<
211                 /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
212 <<
213
214 dftest.exe      : $(dftest_OBJECTS) epan
215         @echo Linking $@
216         $(LINK) @<<
217                 /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS)
218 <<
219
220 randpkt.exe     : $(randpkt_OBJECTS) getopt.obj
221         @echo Linking $@
222         $(LINK) @<<
223                 /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) getopt.obj
224 <<
225
226 dumpcap.exe     : config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj mkstemp.obj wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res 
227         @echo Linking $@
228         $(LINK) @<<
229                 /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) getopt.obj mkstemp.obj image\dumpcap.res
230 <<
231
232
233 config.h        : config.h.win32 config.nmake
234         sed -e s/@VERSION@/$(VERSION)/ \
235             -e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
236             -e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
237             -e "s/@HAVE_KFW@/$(KFW_CONFIG)/" \
238             -e "s/@HAVE_NETTLE@/$(NETTLE_CONFIG)/" \
239             -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
240             -e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
241             -e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
242             -e "s/@HAVE_PCAP_DATALINK_NAME_TO_VAL@/$(PCAP_DATALINK_NAME_TO_VAL_CONFIG)/" \
243             -e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
244             -e "s/@HAVE_PCAP_BREAKLOOP@/$(PCAP_BREAKLOOP_CONFIG)/" \
245             -e "s/@HAVE_LIBWIRESHARKDLL@/$(LIBWIRESHARK_CONFIG)/" \
246             -e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
247             -e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \
248             -e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \
249             -e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \
250             -e "s/@HAVE_LUA_5_1@/$(LUA_VERSION)/" \
251             -e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \
252             -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \
253             -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \
254             -e "s/@HAVE_NET_SNMP@/$(NET_SNMP_CONFIG)/" \
255             -e "s/@HAVE_SOME_SNMP@/$(SOME_SNMP_CONFIG)/" \
256             < config.h.win32 > $@
257
258 ps.c    : rdps.exe print.ps
259         rdps print.ps ps.c
260
261
262 #
263 # Build the version string
264 #
265 !IF EXIST(".svn/entries")
266 SVNENTRIES = .svn/entries
267 !ELSE
268 SVNENTRIES =
269 !ENDIF
270 svnversion.h: $(SVNENTRIES)
271         rm -f svnversion.h
272         $(PERL) make-version.pl
273
274 #
275 # Build the short version of the authors file for the about dialog
276 #
277 AUTHORS-SHORT: AUTHORS make-authors-short.pl
278         $(PERL) perlnoutf.pl make-authors-short.pl < AUTHORS > AUTHORS-SHORT
279
280 #
281 # Build the short version of the authors file with formatting codes for
282 # the man page
283 #
284 AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
285     $(PERL) perlnoutf.pl make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
286
287 #
288 # Build "tshark-tap-register.c", which contains a function 
289 # "register_all_tap_listeners()"
290 # that calls the register routines for all tehtereal tap listeners.
291 #
292 # We do this by grepping through sources.
293 #
294 # Formatting conventions:  The name of the tap_listener_register_* 
295 # routines must start in column zero, or must be preceded only by 
296 # "void " starting in column zero, and must not be inside #if.
297 #
298 # The first argument is the name of the file to write.
299 # The second argument is the directory in which the source files live.
300 # All subsequent arguments are the files to scan.
301 #
302 tshark-tap-register.c: $(TSHARK_TAP_SRC) make-tapreg-dotc
303         @echo Making tshark-tap-register.c
304         @$(SH) make-tapreg-dotc tshark-tap-register.c . $(TSHARK_TAP_SRC)
305
306 text2pcap-scanner.c : text2pcap-scanner.l
307         $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
308
309 clean_gtk2.tmp:
310         rm -f gtk2.tmp/*.*
311         if exist gtk2.tmp rmdir gtk2.tmp
312
313 clean: clean_gtk2.tmp clean-deps
314         rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(EXTRA_OBJECTS) \
315                 $(EXECUTABLES) $(PDB_FILE) \
316                 capinfos.obj editcap.obj mergecap.obj text2pcap.obj getopt.obj\
317                 text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
318                 rdps.pdb rdps.exe rdps.ilk config.h ps.c AUTHORS-SHORT \
319                 AUTHORS-SHORT-FORMAT \
320                 dftest.obj dftest.exe randpkt.obj randpkt.ext dumpcap.obj \
321                 doxygen.cfg \
322                 $(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll
323         cd asn1
324         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
325         cd ..
326         cd wiretap
327         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
328         cd ../codecs
329         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
330         cd ../gtk
331         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
332         cd ../epan
333         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
334         cd ../plugins
335         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
336         cd ../tools
337         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
338         cd ../image
339         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
340         cd ../doc
341         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
342         cd ../help
343         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
344         cd ../packaging/nsis
345         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
346         cd ../u3/win32
347         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
348         cd ../../..
349
350 # "distclean" removes all files not part of the distribution.
351 # It does not remove generated files that are part of the distribution.
352 distclean: clean
353         rm -f config.h $(BUILT_SOURCES)
354         cd wiretap
355         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
356         cd ../codecs
357         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
358         cd ../gtk
359         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
360         cd ../epan
361         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
362         cd ../plugins
363         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
364         cd ../tools
365         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
366         cd ../image
367         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
368         cd ../doc
369         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
370         cd ../help
371         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
372         cd ../packaging/nsis
373         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
374         cd ../u3/win32
375         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
376         cd ../../..
377
378 # Make "maintainer-clean" only if you would like to remove ALL generated
379 # files.
380 # Be sure to have python and perl installed to regenerate them.
381 maintainer-clean: distclean
382         rm -f $(GENERATED_FILES)
383         cd wiretap
384         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
385         cd ../codecs
386         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
387         cd ../gtk
388         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
389         cd ../epan
390         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
391         cd ../plugins
392         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
393         cd ../tools
394         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
395         cd ../image
396         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
397         cd ../doc
398         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
399         cd ../help
400         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
401         cd ../packaging/nsis
402         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
403         cd ../u3/win32
404         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
405         cd ../../..
406
407 tools::
408         cd tools
409         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
410         cd ..
411
412 image::
413         cd image
414         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
415         cd ..
416
417 wiretap::
418         cd wiretap
419         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
420         cd ..
421
422 codecs::
423         cd codecs
424         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
425         cd ..
426
427 gtk:: help config.h svnversion.h AUTHORS-SHORT doxygen
428         cd gtk
429         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK1_CFLAGS)" GTK_LIBS="$(GTK1_LIBS)" libui.lib
430         cd ..
431
432 # copy all required files to gtk2.tmp (but only when newer than existing) and compile in that dir
433 gtk2:: help config.h svnversion.h AUTHORS-SHORT
434         if not exist gtk2.tmp mkdir gtk2.tmp
435         cd gtk
436         set copycmd=/y
437         xcopy Makefile.* ..\gtk2.tmp /d
438         xcopy *.c        ..\gtk2.tmp /d
439         xcopy *.h        ..\gtk2.tmp /d
440         cd ..\gtk2.tmp
441         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK2_CFLAGS)" GTK_LIBS="$(GTK2_LIBS)" libui.lib
442         cd ..
443
444 epan:: $(RESOURCES) $(BUILT_SOURCES) doxygen
445         cd epan
446         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
447         cd ..
448
449 plugins::
450         cd plugins
451         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
452         cd ..
453
454 doc::
455         cd doc
456         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
457         cd ..
458
459 help::
460         cd help
461         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
462         cd ..
463
464 doxygen.cfg: config.nmake doxygen.cfg.in
465         sed -e s/@VERSION@/$(VERSION)/ \
466             < doxygen.cfg.in > $@
467
468 doxygen-run:
469 !IFDEF DOXYGEN
470         $(DOXYGEN) doxygen.cfg
471 !ENDIF
472
473 doxygen: doxygen.cfg doxygen-run
474
475 ################################################################################
476 # Prepare build environment by downloading and installing required libraries
477 ################################################################################
478
479 # The required tools to build Wireshark.
480 #
481 # The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
482 # We only need the cygwin version (for some shell scripts).
483 # In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
484 REQUIRED_TOOLS=\
485         $(CC) \
486         $(LINK) \
487         nmake \
488         $(SH)   \
489         $(YACC) \
490         $(LEX)  \
491         env     \
492         grep    \
493         /usr/bin/find   \
494         $(PERL) \
495         $(PYTHON)       \
496         sed     \
497         unzip   \
498         wget
499
500 verify_tools:
501         $(SH) tools\win32-setup.sh --appverify $(REQUIRED_TOOLS)
502
503 # Download and install all the required libraries into WIRESHARK_LIBS.
504 # If you used this setup target before, consider doing a clean_setup.
505 setup: verify_tools
506 !IF "$(GTK2_INST_VERSION)" == "2.8"
507         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
508                 glib gtk2.8/glib-2.12.4.zip
509         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
510                 glib gtk2.8/glib-dev-2.12.4.zip
511 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
512         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
513                 glib gtk2.6/glib-2.6.6.zip
514         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
515                 glib gtk2.6/glib-dev-2.6.6.zip
516 !ELSEIF "$(GTK2_INST_VERSION)" == "2.4"
517         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
518                 glib gtk2.4/glib-2.4.7.zip
519         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
520                 glib gtk2.4/glib-dev-2.4.7.zip
521 !ELSE
522         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
523                 glib glib-2.2.3-20040116.zip
524         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
525                 glib glib-dev-2.2.3-20040116.zip
526 !ENDIF
527 !IFDEF GTK1_DIR
528         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
529                 gtk+ gtk+-1.3.0-20030717.zip
530         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
531                 gtk+ gtk+-dev-1.3.0-20030115.zip
532 !ENDIF
533         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
534                 libiconv-1.9.1.bin.woe32 libiconv-1.9.1.bin.woe32.zip
535         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
536                 gettext-0.14.5 gettext-0.14.5.zip
537 !IFDEF NET_SNMP_DIR
538         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
539                 . net-snmp-5.3.1.zip
540 !ENDIF
541 !IFDEF KFW_DIR
542         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
543                 kfw-2.5 kfw-2.5.zip
544 !ENDIF
545 !IFDEF PCAP_DIR
546         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
547                 . WpdPack_3_1.zip
548 !ENDIF
549 !IFDEF ADNS_DIR
550         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
551                 . adns-1.0-win32-05.zip
552 !ENDIF
553 !IFDEF PCRE_DIR
554         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
555                 pcre-6.4 pcre-6.4-bin.zip
556         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
557                 pcre-6.4 pcre-6.4-lib.zip
558 !ENDIF
559 !IFDEF ZLIB_DIR
560         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
561                 zlib123-dll zlib123-dll.zip
562 !ENDIF
563 !IFDEF LUA_DIR
564         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
565                 . lua5_1_dll.zip
566 !ENDIF
567 !IFDEF GNUTLS_DIR
568         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
569                 . gnutls-1.5.1-1.zip
570 !ENDIF
571 !IFDEF PORTAUDIO_DIR
572         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
573                 . portaudio_v18_1.zip
574 !ENDIF
575
576 !IFDEF GTK2_DIR
577 !IF "$(GTK2_INST_VERSION)" == "2.8"
578         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
579                 gtk2 gtk2.8/gtk+-2.8.20.zip
580         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
581                 gtk2 gtk2.8/gtk+-dev-2.8.20.zip
582         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
583                 gtk2 gtk2.8/cairo-1.2.6.zip
584         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
585                 gtk2 gtk2.8/cairo-dev-1.2.6.zip
586         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
587                 gtk2 gtk2.8/atk-1.10.3.zip
588         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
589                 gtk2 gtk2.8/atk-dev-1.10.3.zip
590         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
591                 gtk2 gtk2.8/libpng-1.2.8-bin.zip
592 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
593         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
594                 gtk2 gtk2.6/gtk+-2.6.9.zip
595         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
596                 gtk2 gtk2.6/gtk+-dev-2.6.9.zip
597         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
598                 gtk2 gtk2.6/atk-1.9.0.zip
599         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
600                 gtk2 gtk2.6/atk-dev-1.9.0.zip
601 !ELSEIF "$(GTK2_INST_VERSION)" == "2.4"
602         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
603                 gtk2 gtk2.4/gtk+-2.4.14.zip
604         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
605                 gtk2 gtk2.4/gtk+-dev-2.4.14.zip
606         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
607                 gtk2 gtk2.4/atk-1.6.0.zip
608         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
609                 gtk2 gtk2.4/atk-dev-1.6.0.zip
610 !ELSE
611         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
612                 gtk2 gtk2/gtk+-2.2.4-20040124.zip
613         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
614                 gtk2 gtk2/gtk+-dev-2.2.4-20040124.zip
615         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
616                 gtk2 gtk2/atk-1.4.0.zip
617         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
618                 gtk2 gtk2/atk-dev-1.4.0.zip
619 !ENDIF
620 !IF "$(PANGO_INST_VERSION)" == "1.14"
621         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
622                 gtk2 gtk2.8/pango-1.14.5.zip
623         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
624                 gtk2 gtk2.8/pango-dev-1.14.5.zip
625 !ELSEIF "$(PANGO_INST_VERSION)" == "1.10"
626         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
627                 gtk2 gtk2.8/pango-1.10.1.zip
628         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
629                 gtk2 gtk2.8/pango-dev-1.10.1.zip
630 !ELSEIF "$(PANGO_INST_VERSION)" == "1.8"
631         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
632                 gtk2 gtk2.6/pango-1.8.2.zip
633         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
634                 gtk2 gtk2.6/pango-dev-1.8.2.zip
635 !ELSEIF "$(PANGO_INST_VERSION)" == "1.4"
636         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
637                 gtk2 gtk2.4/pango-1.4.1.zip
638         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
639                 gtk2 gtk2.4/pango-dev-1.4.1.zip
640 !ELSE
641         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
642                 gtk2 gtk2/pango-1.2.5-20040124.zip
643         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
644                 gtk2 gtk2/pango-dev-1.2.5-20040124.zip
645 !ENDIF
646 !ENDIF
647 !IFDEF GTK_WIMP_DIR
648         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
649                 gtk-wimp gtk-wimp/gtk-wimp-0.7.0-bin.zip
650 !ENDIF
651         @echo.
652         @echo Wireshark is ready to build.
653
654 # Cleanup files installed by the setup target. It will not remove the 
655 # downloaded zip files.
656 clean_setup:
657     rm -r -f $(WIRESHARK_LIBS)/adns-1.0-win32-05
658     rm -r -f $(WIRESHARK_LIBS)/gettext-0.14.5
659     rm -r -f $(WIRESHARK_LIBS)/glib
660     rm -r -f $(WIRESHARK_LIBS)/gnutls-1.5.0-1
661     rm -r -f $(WIRESHARK_LIBS)/gtk2
662     rm -r -f $(WIRESHARK_LIBS)/gtk+
663     rm -r -f $(WIRESHARK_LIBS)/gtk-wimp
664     rm -r -f $(WIRESHARK_LIBS)/kfw-2.5
665     rm -r -f $(WIRESHARK_LIBS)/libiconv-1.9.1.bin.woe32
666     rm -r -f $(WIRESHARK_LIBS)/lua5.1
667     rm -r -f $(WIRESHARK_LIBS)/net-snmp-5.3.1
668     rm -r -f $(WIRESHARK_LIBS)/pcre-6.4
669     rm -r -f $(WIRESHARK_LIBS)/portaudio_v18_1
670     rm -r -f $(WIRESHARK_LIBS)/WpdPack
671     rm -r -f $(WIRESHARK_LIBS)/zlib123-dll
672
673 ################################################################################
674 # Prepare the debug trees for running Wireshark/Tshark from there.
675 ################################################################################
676
677
678 # generate and install Wireshark GTK1 in INSTALL1_DIR
679 debug-gtk1: wireshark.exe install-files1
680
681 # generate and install Wireshark GTK2 in INSTALL2_DIR
682 debug-gtk2: wireshark-gtk2.exe install-files2
683
684 # generate and install Wireshark GTK2 in INSTALL2_DIR
685 debug-tshark: tshark.exe
686         set copycmd=/y
687         set INSTALL_DIR=$(INSTALL2_DIR)
688         nmake -f Makefile.nmake install-common-files
689
690
691 # "install-deps" will copy all files needed to run Wwireshark/Tshark
692 # to the INSTALL1_DIR/INSTALL2_DIR, so you can run/debug Wireshark/Tshark from there.
693
694 install-deps: install-deps1 install-deps2 install-files1 install-files2
695
696 # install Wireshark GTK2 and other generated files
697 install-files1:
698 !IFDEF GTK1_DIR
699         set copycmd=/y
700         set INSTALL_DIR=$(INSTALL1_DIR)
701         nmake -f Makefile.nmake install-common-files
702         xcopy wireshark.exe $(INSTALL1_DIR) /d
703 !ENDIF
704
705 # install Wireshark GTK2 and other generated files
706 install-files2:
707 !IFDEF GTK2_DIR
708         set INSTALL_DIR=$(INSTALL2_DIR)
709         nmake -f Makefile.nmake install-common-files
710         copy wireshark-gtk2.exe $(INSTALL2_DIR)\wireshark.exe
711         if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL2_DIR) /d
712 !ENDIF
713
714 install-common-files:
715         set copycmd=/y
716         if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
717 !IFDEF ENABLE_LIBWIRESHARK
718         xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
719 !ENDIF
720         xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
721         xcopy ".\epan\libwireshark.dll" $(INSTALL_DIR) /d
722         if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
723         if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL2_DIR) /d
724         if exist mergecap.exe xcopy mergecap.exe $(INSTALL2_DIR) /d
725         if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL2_DIR) /d
726         if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
727         if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
728         xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
729         xcopy ".\manuf" $(INSTALL_DIR) /d
730         xcopy ".\FAQ" $(INSTALL_DIR) /d
731         xcopy ".\README" $(INSTALL_DIR) /d
732         xcopy ".\README.win32" $(INSTALL_DIR) /d
733         xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
734         xcopy ".\COPYING" $(INSTALL_DIR) /d
735         copy ".\NEWS" $(INSTALL_DIR)\NEWS.txt
736         xcopy ".\cfilters" $(INSTALL_DIR) /d
737         xcopy ".\colorfilters" $(INSTALL_DIR) /d
738         xcopy ".\dfilters" $(INSTALL_DIR) /d
739     xcopy doc\*.html $(INSTALL_DIR) /d
740 !IFDEF ETHEREAL_EUG_DIR
741     xcopy $(ETHEREAL_EUG_DIR) $(INSTALL_DIR) /d
742 !ENDIF
743         if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
744         xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
745         if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
746         xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
747         if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
748         echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
749         if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
750         xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
751         if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
752         xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
753         xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
754         if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
755         xcopy ".\plugins\agentx\agentx.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
756         xcopy ".\plugins\artnet\artnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
757         xcopy ".\plugins\asn1\asn1.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
758         xcopy ".\plugins\ciscosm\ciscosm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
759         xcopy ".\plugins\docsis\docsis.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
760         xcopy ".\plugins\enttec\enttec.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
761         xcopy ".\plugins\giop\coseventcomm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
762         xcopy ".\plugins\giop\cosnaming.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
763         xcopy ".\plugins\giop\parlay.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
764         xcopy ".\plugins\giop\tango.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
765         xcopy ".\plugins\gryphon\gryphon.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
766         xcopy ".\plugins\h223\h223.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
767         xcopy ".\plugins\irda\irda.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
768         xcopy ".\plugins\lwres\lwres.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
769         xcopy ".\plugins\mate\mate.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
770         xcopy ".\plugins\megaco\megaco.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
771         xcopy ".\plugins\mgcp\mgcp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
772         xcopy ".\plugins\opsi\opsi.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
773         xcopy ".\plugins\pcli\pcli.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
774         xcopy ".\plugins\profinet\profinet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
775         xcopy ".\plugins\rlm\rlm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
776         xcopy ".\plugins\rtnet\rtnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
777         xcopy ".\plugins\rudp\rudp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
778         xcopy ".\plugins\sbus\sbus.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
779         xcopy ".\plugins\stats_tree\stats_tree.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
780         xcopy ".\plugins\v5ua\v5ua.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
781         if exist custom-install.bat custom-install $(INSTALL_DIR) $(VERSION)
782
783 install-deps1: install-common-deps1
784 !IFDEF GTK1_DIR
785         set copycmd=/y
786         xcopy $(GTK1_DIR)\lib\libgtk-0.dll $(INSTALL1_DIR) /d
787         xcopy $(GTK1_DIR)\lib\libgdk-0.dll $(INSTALL1_DIR) /d
788 !ENDIF
789
790 install-deps2: install-common-deps2
791 !IFDEF GTK2_DIR
792         set copycmd=/y
793         xcopy $(GTK2_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL2_DIR) /d
794         xcopy $(GTK2_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL2_DIR) /d
795         xcopy $(GTK2_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL2_DIR) /d
796         xcopy $(GTK2_DIR)\bin\libatk-1.0-0.dll $(INSTALL2_DIR) /d
797         xcopy $(GTK2_DIR)\bin\libpango-1.0-0.dll $(INSTALL2_DIR) /d
798         xcopy $(GTK2_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL2_DIR) /d
799         if not exist $(INSTALL2_DIR)\etc mkdir $(INSTALL2_DIR)\etc
800         if not exist $(INSTALL2_DIR)\etc\gtk-2.0 mkdir $(INSTALL2_DIR)\etc\gtk-2.0
801         if not exist $(INSTALL2_DIR)\etc\pango mkdir $(INSTALL2_DIR)\etc\pango
802         if not exist $(INSTALL2_DIR)\lib mkdir $(INSTALL2_DIR)\lib
803         if not exist $(INSTALL2_DIR)\lib\gtk-2.0 mkdir $(INSTALL2_DIR)\lib\gtk-2.0
804         if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR) mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)
805         if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders
806         if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules
807 #       if not exist $(INSTALL2_DIR)\lib\pango mkdir $(INSTALL2_DIR)\lib\pango
808 #       if not exist $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR) mkdir $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)
809 #       if not exist $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules mkdir $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules
810         xcopy $(GTK2_DIR)\etc\gtk-2.0\*.* $(INSTALL2_DIR)\etc\gtk-2.0 /d
811         xcopy $(GTK2_DIR)\etc\pango\pango.* $(INSTALL2_DIR)\etc\pango /d
812         xcopy $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders\libpixbufloader-*.dll $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders /d
813         xcopy $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules\im-*.dll $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules /d
814 #       xcopy $(GTK2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules\pango-*.dll $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules /d
815 !IFDEF NEED_LIBPNG_DLL
816         xcopy $(GTK2_DIR)\bin\libpng13.dll $(INSTALL2_DIR) /d
817 !ENDIF
818 !IFDEF NEED_CAIRO_DLL
819         xcopy $(GTK2_DIR)\bin\libcairo-2.dll $(INSTALL2_DIR)  /d
820         xcopy $(GTK2_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL2_DIR) /d
821 !ENDIF
822 !IFDEF GTK_WIMP_DIR
823         if not exist $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR) mkdir $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR)
824         xcopy "$(GTK_WIMP_DLLSRC_DIR)\libwimp.dll" $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR) /d
825         if not exist $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR) mkdir $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR)
826         xcopy "$(GTK_WIMP_RCSRC_DIR)\gtkrc" $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR) /d
827 !ENDIF
828 !ENDIF
829
830 install-common-deps1:
831 !IFDEF GTK1_DIR
832         set INSTALL_DIR=$(INSTALL1_DIR)
833         nmake -f Makefile.nmake install-common-deps
834 !ENDIF
835
836 install-common-deps2:
837 !IFDEF GTK2_DIR
838         set INSTALL_DIR=$(INSTALL2_DIR)
839         nmake -f Makefile.nmake install-common-deps
840 !ENDIF
841
842 install-common-deps:
843         set copycmd=/y
844         if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
845         xcopy $(GLIB_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
846         xcopy $(GLIB_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
847         xcopy $(GLIB_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
848         xcopy $(ICONV_DIR)\bin\iconv.dll $(INSTALL_DIR) /d
849         xcopy $(GETTEXT_DIR)\bin\intl.dll $(INSTALL_DIR) /d
850 !IFDEF ZLIB_DIR
851         xcopy $(ZLIB_DIR)\zlib1.dll $(INSTALL_DIR) /d
852 !ENDIF
853 !IFDEF ADNS_DIR
854         xcopy $(ADNS_DIR)\adns_win32\LIB\adns_dll.dll $(INSTALL_DIR) /d
855 !ENDIF
856 !IFDEF PCRE_DIR
857         xcopy $(PCRE_DIR)\bin\pcre.dll $(INSTALL_DIR) /d
858         xcopy $(PCRE_DIR)\man\cat3\pcrepattern.3.txt $(INSTALL_DIR) /d
859 !ENDIF
860 !IFDEF KFW_DIR
861         xcopy $(KFW_DIR)\bin\comerr32.dll $(INSTALL_DIR) /d
862         xcopy $(KFW_DIR)\bin\krb5_32.dll $(INSTALL_DIR) /d
863 !ENDIF
864 !IFDEF GNUTLS_DIR
865         xcopy $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(INSTALL_DIR) /d
866         xcopy $(GNUTLS_DIR)\bin\libgnutls-14.dll $(INSTALL_DIR) /d
867         xcopy $(GNUTLS_DIR)\bin\libgnutls-extra-14.dll $(INSTALL_DIR) /d
868         xcopy $(GNUTLS_DIR)\bin\libgnutls-openssl-14.dll $(INSTALL_DIR) /d
869         xcopy $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(INSTALL_DIR) /d
870         xcopy $(GNUTLS_DIR)\bin\libtasn1-3.dll $(INSTALL_DIR) /d
871 !ENDIF
872 !IFDEF NET_SNMP_DIR
873         if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
874         if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
875         xcopy "$(NET_SNMP_DIR)\mibs\*.txt" $(INSTALL_DIR)\snmp\mibs /d
876 !ENDIF
877 !IFDEF LUA_DIR
878         xcopy "$(LUA_DIR)\lib\dll\lua5.1.dll" $(INSTALL_DIR) /d
879 !ENDIF
880
881 clean-deps1:
882         rm -rf $(INSTALL1_DIR)
883         cd plugins
884         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
885         cd ..
886
887 clean-deps2:
888         rm -rf $(INSTALL2_DIR)
889         cd plugins
890         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
891         cd ..
892
893 clean-deps: clean-deps1 clean-deps2
894