Don't define HAVE_AIRPDCAP if HAVE_AIRPCAP isn't defined. Fix a compiler
[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         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
123         cd ..
124         cd ..
125
126 separate_packaging: all
127         cd packaging
128         cd nsis
129 !IFDEF GTK1_DIR
130         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake GTK1_ONLY="USE"
131 !ENDIF
132 !IFDEF GTK2_DIR
133         $(MAKE) /$(MAKEFLAGS) -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         $(MAKE) /$(MAKEFLAGS) -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) /LARGEADDRESSAWARE /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) /LARGEADDRESSAWARE /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) /LARGEADDRESSAWARE /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_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \
253             -e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \
254             -e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \
255             -e "s/@HAVE_NET_SNMP@/$(NET_SNMP_CONFIG)/" \
256             -e "s/@HAVE_SOME_SNMP@/$(SOME_SNMP_CONFIG)/" \
257             < config.h.win32 > $@
258
259 ps.c    : rdps.exe print.ps
260         rdps print.ps ps.c
261
262
263 #
264 # Build the version string
265 #
266 !IF EXIST(".svn/entries")
267 SVNENTRIES = .svn/entries
268 !ELSE
269 SVNENTRIES =
270 !ENDIF
271 svnversion.h: $(SVNENTRIES)
272         rm -f svnversion.h
273         $(PERL) make-version.pl
274
275 #
276 # Build the short version of the authors file for the about dialog
277 #
278 AUTHORS-SHORT: AUTHORS make-authors-short.pl
279         $(PERL) perlnoutf.pl make-authors-short.pl < AUTHORS > AUTHORS-SHORT
280
281 #
282 # Build the short version of the authors file with formatting codes for
283 # the man page
284 #
285 AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
286     $(PERL) perlnoutf.pl make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
287
288 #
289 # Build "tshark-tap-register.c", which contains a function 
290 # "register_all_tap_listeners()"
291 # that calls the register routines for all tehtereal tap listeners.
292 #
293 # We do this by grepping through sources.
294 #
295 # Formatting conventions:  The name of the tap_listener_register_* 
296 # routines must start in column zero, or must be preceded only by 
297 # "void " starting in column zero, and must not be inside #if.
298 #
299 # The first argument is the name of the file to write.
300 # The second argument is the directory in which the source files live.
301 # All subsequent arguments are the files to scan.
302 #
303 tshark-tap-register.c: $(TSHARK_TAP_SRC) make-tapreg-dotc
304         @echo Making tshark-tap-register.c
305         @$(SH) make-tapreg-dotc tshark-tap-register.c . $(TSHARK_TAP_SRC)
306
307 text2pcap-scanner.c : text2pcap-scanner.l
308         $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
309
310 clean_gtk2.tmp:
311         rm -f gtk2.tmp/*.*
312         if exist gtk2.tmp rmdir gtk2.tmp
313
314 clean: clean_gtk2.tmp clean-deps
315         rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(EXTRA_OBJECTS) \
316                 $(EXECUTABLES) $(PDB_FILE) \
317                 capinfos.obj editcap.obj mergecap.obj text2pcap.obj getopt.obj\
318                 text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
319                 rdps.pdb rdps.exe rdps.ilk config.h ps.c AUTHORS-SHORT \
320                 AUTHORS-SHORT-FORMAT \
321                 dftest.obj dftest.exe randpkt.obj randpkt.ext dumpcap.obj \
322                 doxygen.cfg \
323                 $(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll
324         cd asn1
325         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
326         cd ..
327         cd wiretap
328         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
329         cd ../codecs
330         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
331         cd ../gtk
332         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
333         cd ../epan
334         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
335         cd ../plugins
336         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
337         cd ../tools
338         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
339         cd ../image
340         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
341         cd ../doc
342         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
343         cd ../help
344         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
345         cd ../packaging/nsis
346         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
347         cd ../u3/win32
348         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
349         cd ../../..
350
351 # "distclean" removes all files not part of the distribution.
352 # It does not remove generated files that are part of the distribution.
353 distclean: clean
354         rm -f config.h $(BUILT_SOURCES)
355         cd wiretap
356         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
357         cd ../codecs
358         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
359         cd ../gtk
360         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
361         cd ../epan
362         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
363         cd ../plugins
364         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
365         cd ../tools
366         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
367         cd ../image
368         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
369         cd ../doc
370         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
371         cd ../help
372         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
373         cd ../packaging/nsis
374         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
375         cd ../u3/win32
376         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
377         cd ../../..
378
379 # Make "maintainer-clean" only if you would like to remove ALL generated
380 # files.
381 # Be sure to have python and perl installed to regenerate them.
382 maintainer-clean: distclean
383         rm -f $(GENERATED_FILES)
384         cd wiretap
385         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
386         cd ../codecs
387         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
388         cd ../gtk
389         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
390         cd ../epan
391         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
392         cd ../plugins
393         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
394         cd ../tools
395         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
396         cd ../image
397         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
398         cd ../doc
399         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
400         cd ../help
401         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
402         cd ../packaging/nsis
403         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
404         cd ../u3/win32
405         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
406         cd ../../..
407
408 tools::
409         cd tools
410         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
411         cd ..
412
413 image::
414         cd image
415         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
416         cd ..
417
418 wiretap::
419         cd wiretap
420         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
421         cd ..
422
423 codecs::
424         cd codecs
425         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
426         cd ..
427
428 gtk:: help config.h svnversion.h AUTHORS-SHORT doxygen
429         cd gtk
430         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK1_CFLAGS)" GTK_LIBS="$(GTK1_LIBS)" libui.lib
431         cd ..
432
433 # copy all required files to gtk2.tmp (but only when newer than existing) and compile in that dir
434 gtk2:: help config.h svnversion.h AUTHORS-SHORT
435         if not exist gtk2.tmp mkdir gtk2.tmp
436         cd gtk
437         set copycmd=/y
438         xcopy Makefile.* ..\gtk2.tmp /d
439         xcopy *.c        ..\gtk2.tmp /d
440         xcopy *.h        ..\gtk2.tmp /d
441         cd ..\gtk2.tmp
442         $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK2_CFLAGS)" GTK_LIBS="$(GTK2_LIBS)" libui.lib
443         cd ..
444
445 epan:: $(RESOURCES) $(BUILT_SOURCES) doxygen
446         cd epan
447         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
448         cd ..
449
450 plugins::
451         cd plugins
452         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
453         cd ..
454
455 doc::
456         cd doc
457         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
458         cd ..
459
460 help::
461         cd help
462         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
463         cd ..
464
465 doxygen.cfg: config.nmake doxygen.cfg.in
466         sed -e s/@VERSION@/$(VERSION)/ \
467             < doxygen.cfg.in > $@
468
469 doxygen-run:
470 !IFDEF DOXYGEN
471         $(DOXYGEN) doxygen.cfg
472 !ENDIF
473
474 doxygen: doxygen.cfg doxygen-run
475
476 ################################################################################
477 # Prepare build environment by downloading and installing required libraries
478 ################################################################################
479
480 # The required tools to build Wireshark.
481 #
482 # The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
483 # We only need the cygwin version (for some shell scripts).
484 # In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
485 REQUIRED_TOOLS=\
486         $(CC) \
487         $(LINK) \
488         nmake \
489         $(SH_PROG)      \
490         $(YACC) \
491         $(LEX)  \
492         env     \
493         grep    \
494         /usr/bin/find   \
495         $(PERL) \
496         $(PYTHON)       \
497         sed     \
498         unzip   \
499         wget
500
501 verify_tools:
502         @$(SH) tools\win32-setup.sh --appverify $(REQUIRED_TOOLS)
503
504 # Download and install all the required libraries into WIRESHARK_LIBS.
505 # If you used this setup target before, consider doing a clean_setup.
506 setup: verify_tools
507     if not exist $(WIRESHARK_LIBS) md $(WIRESHARK_LIBS)
508 !IF "$(GTK2_INST_VERSION)" == "2.8"
509         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
510                 glib gtk2.8/glib-2.12.4.zip
511         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
512                 glib gtk2.8/glib-dev-2.12.4.zip
513 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
514         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
515                 glib gtk2.6/glib-2.6.6.zip
516         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
517                 glib gtk2.6/glib-dev-2.6.6.zip
518 !ELSEIF "$(GTK2_INST_VERSION)" == "2.4"
519         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
520                 glib gtk2.4/glib-2.4.7.zip
521         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
522                 glib gtk2.4/glib-dev-2.4.7.zip
523 !ELSE
524         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
525                 glib glib-2.2.3-20040116.zip
526         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
527                 glib glib-dev-2.2.3-20040116.zip
528 !ENDIF
529 !IFDEF GTK1_DIR
530         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
531                 gtk+ gtk+-1.3.0-20030717.zip
532         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
533                 gtk+ gtk+-dev-1.3.0-20030115.zip
534 !ENDIF
535         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
536                 libiconv-1.9.1.bin.woe32 libiconv-1.9.1.bin.woe32.zip
537         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
538                 gettext-0.14.5 gettext-0.14.5.zip
539 !IFDEF NET_SNMP_DIR
540         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
541                 . net-snmp-5.3.1.zip
542 !ENDIF
543 !IFDEF KFW_DIR
544         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
545                 kfw-2.5 kfw-2.5.zip
546 !ENDIF
547 !IFDEF PCAP_DIR
548         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
549                 . WpdPack_3_1.zip
550 !ENDIF
551 !IFDEF ADNS_DIR
552         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
553                 . adns-1.0-win32-05.zip
554 !ENDIF
555 !IFDEF PCRE_DIR
556         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
557                 pcre-6.4 pcre-6.4-bin.zip
558         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
559                 pcre-6.4 pcre-6.4-lib.zip
560 !ENDIF
561 !IFDEF ZLIB_DIR
562         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
563                 zlib123-dll zlib123-dll.zip
564 !ENDIF
565 !IFDEF LUA_DIR
566         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
567                 . lua5_1_dll.zip
568 !ENDIF
569 !IFDEF GNUTLS_DIR
570         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
571                 . gnutls-1.5.1-1.zip
572 !ENDIF
573 !IFDEF PORTAUDIO_DIR
574         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
575                 . portaudio_v18_1.zip
576 !ENDIF
577
578 !IFDEF GTK2_DIR
579 !IF "$(GTK2_INST_VERSION)" == "2.8"
580         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
581                 gtk2 gtk2.8/gtk+-2.8.20.zip
582         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
583                 gtk2 gtk2.8/gtk+-dev-2.8.20.zip
584         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
585                 gtk2 gtk2.8/cairo-1.2.6.zip
586         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
587                 gtk2 gtk2.8/cairo-dev-1.2.6.zip
588         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
589                 gtk2 gtk2.8/atk-1.10.3.zip
590         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
591                 gtk2 gtk2.8/atk-dev-1.10.3.zip
592         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
593                 gtk2 gtk2.8/libpng-1.2.8-bin.zip
594 !ELSEIF "$(GTK2_INST_VERSION)" == "2.6"
595         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
596                 gtk2 gtk2.6/gtk+-2.6.9.zip
597         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
598                 gtk2 gtk2.6/gtk+-dev-2.6.9.zip
599         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
600                 gtk2 gtk2.6/atk-1.9.0.zip
601         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
602                 gtk2 gtk2.6/atk-dev-1.9.0.zip
603 !ELSEIF "$(GTK2_INST_VERSION)" == "2.4"
604         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
605                 gtk2 gtk2.4/gtk+-2.4.14.zip
606         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
607                 gtk2 gtk2.4/gtk+-dev-2.4.14.zip
608         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
609                 gtk2 gtk2.4/atk-1.6.0.zip
610         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
611                 gtk2 gtk2.4/atk-dev-1.6.0.zip
612 !ELSE
613         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
614                 gtk2 gtk2/gtk+-2.2.4-20040124.zip
615         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
616                 gtk2 gtk2/gtk+-dev-2.2.4-20040124.zip
617         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
618                 gtk2 gtk2/atk-1.4.0.zip
619         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
620                 gtk2 gtk2/atk-dev-1.4.0.zip
621 !ENDIF
622 !IF "$(PANGO_INST_VERSION)" == "1.14"
623         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
624                 gtk2 gtk2.8/pango-1.14.5.zip
625         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
626                 gtk2 gtk2.8/pango-dev-1.14.5.zip
627 !ELSEIF "$(PANGO_INST_VERSION)" == "1.10"
628         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
629                 gtk2 gtk2.8/pango-1.10.1.zip
630         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
631                 gtk2 gtk2.8/pango-dev-1.10.1.zip
632 !ELSEIF "$(PANGO_INST_VERSION)" == "1.8"
633         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
634                 gtk2 gtk2.6/pango-1.8.2.zip
635         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
636                 gtk2 gtk2.6/pango-dev-1.8.2.zip
637 !ELSEIF "$(PANGO_INST_VERSION)" == "1.4"
638         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
639                 gtk2 gtk2.4/pango-1.4.1.zip
640         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
641                 gtk2 gtk2.4/pango-dev-1.4.1.zip
642 !ELSE
643         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
644                 gtk2 gtk2/pango-1.2.5-20040124.zip
645         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
646                 gtk2 gtk2/pango-dev-1.2.5-20040124.zip
647 !ENDIF
648 !ENDIF
649 !IFDEF GTK_WIMP_DIR
650         @$(SH) tools\win32-setup.sh --download "$(WIRESHARK_LIBS)" \
651                 gtk-wimp gtk-wimp/gtk-wimp-0.7.0-bin.zip
652 !ENDIF
653         @echo.
654         @echo Wireshark is ready to build.
655
656 # Cleanup files installed by the setup target. It will not remove the 
657 # downloaded zip files.
658 clean_setup:
659     rm -r -f $(WIRESHARK_LIBS)/adns-1.0-win32-05
660     rm -r -f $(WIRESHARK_LIBS)/gettext-0.14.5
661     rm -r -f $(WIRESHARK_LIBS)/glib
662     rm -r -f $(WIRESHARK_LIBS)/gnutls-1.5.1-1
663     rm -r -f $(WIRESHARK_LIBS)/gtk2
664     rm -r -f $(WIRESHARK_LIBS)/gtk+
665     rm -r -f $(WIRESHARK_LIBS)/gtk-wimp
666     rm -r -f $(WIRESHARK_LIBS)/kfw-2.5
667     rm -r -f $(WIRESHARK_LIBS)/libiconv-1.9.1.bin.woe32
668     rm -r -f $(WIRESHARK_LIBS)/lua5.1
669     rm -r -f $(WIRESHARK_LIBS)/net-snmp-5.3.1
670     rm -r -f $(WIRESHARK_LIBS)/pcre-6.4
671     rm -r -f $(WIRESHARK_LIBS)/portaudio_v18_1
672     rm -r -f $(WIRESHARK_LIBS)/WpdPack
673     rm -r -f $(WIRESHARK_LIBS)/zlib123-dll
674
675 ################################################################################
676 # Prepare the debug trees for running Wireshark/Tshark from there.
677 ################################################################################
678
679
680 # generate and install Wireshark GTK1 in INSTALL1_DIR
681 debug-gtk1: wireshark.exe install-files1
682
683 # generate and install Wireshark GTK2 in INSTALL2_DIR
684 debug-gtk2: wireshark-gtk2.exe install-files2
685
686 # generate and install Wireshark GTK2 in INSTALL2_DIR
687 debug-tshark: tshark.exe
688         set copycmd=/y
689         set INSTALL_DIR=$(INSTALL2_DIR)
690         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
691
692
693 # "install-deps" will copy all files needed to run Wwireshark/Tshark
694 # to the INSTALL1_DIR/INSTALL2_DIR, so you can run/debug Wireshark/Tshark from there.
695
696 install-deps: install-deps1 install-deps2 install-files1 install-files2
697
698 # install Wireshark GTK2 and other generated files
699 install-files1:
700 !IFDEF GTK1_DIR
701         set copycmd=/y
702         set INSTALL_DIR=$(INSTALL1_DIR)
703         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
704         xcopy wireshark.exe $(INSTALL1_DIR) /d
705 !ENDIF
706
707 # install Wireshark GTK2 and other generated files
708 install-files2:
709 !IFDEF GTK2_DIR
710         set INSTALL_DIR=$(INSTALL2_DIR)
711         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-files
712         copy wireshark-gtk2.exe $(INSTALL2_DIR)\wireshark.exe
713         if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL2_DIR) /d
714 !ENDIF
715
716 install-common-files:
717         set copycmd=/y
718         if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
719 !IFDEF ENABLE_LIBWIRESHARK
720         xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
721 !ENDIF
722         xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
723         xcopy ".\epan\libwireshark.dll" $(INSTALL_DIR) /d
724         if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
725         if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL2_DIR) /d
726         if exist mergecap.exe xcopy mergecap.exe $(INSTALL2_DIR) /d
727         if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL2_DIR) /d
728         if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
729         if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
730         xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
731         xcopy ".\manuf" $(INSTALL_DIR) /d
732         xcopy ".\FAQ" $(INSTALL_DIR) /d
733         xcopy ".\README" $(INSTALL_DIR) /d
734         xcopy ".\README.win32" $(INSTALL_DIR) /d
735         xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
736         xcopy ".\COPYING" $(INSTALL_DIR) /d
737         copy ".\NEWS" $(INSTALL_DIR)\NEWS.txt
738         xcopy ".\cfilters" $(INSTALL_DIR) /d
739         xcopy ".\colorfilters" $(INSTALL_DIR) /d
740         xcopy ".\dfilters" $(INSTALL_DIR) /d
741     xcopy doc\*.html $(INSTALL_DIR) /d
742 !IFDEF ETHEREAL_EUG_DIR
743     xcopy $(ETHEREAL_EUG_DIR) $(INSTALL_DIR) /d
744 !ENDIF
745         if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
746         xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
747         if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
748         xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
749         if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
750         echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
751         if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
752         xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
753         if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
754         xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
755         xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
756         if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
757         xcopy ".\plugins\agentx\agentx.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
758         xcopy ".\plugins\artnet\artnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
759         xcopy ".\plugins\asn1\asn1.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
760         xcopy ".\plugins\ciscosm\ciscosm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
761         xcopy ".\plugins\docsis\docsis.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
762         xcopy ".\plugins\enttec\enttec.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
763         xcopy ".\plugins\giop\coseventcomm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
764         xcopy ".\plugins\giop\cosnaming.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
765         xcopy ".\plugins\giop\parlay.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
766         xcopy ".\plugins\giop\tango.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
767         xcopy ".\plugins\gryphon\gryphon.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
768         xcopy ".\plugins\h223\h223.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
769         xcopy ".\plugins\irda\irda.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
770         xcopy ".\plugins\lwres\lwres.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
771         xcopy ".\plugins\mate\mate.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
772         xcopy ".\plugins\megaco\megaco.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
773         xcopy ".\plugins\mgcp\mgcp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
774         xcopy ".\plugins\opsi\opsi.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
775         xcopy ".\plugins\pcli\pcli.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
776         xcopy ".\plugins\profinet\profinet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
777         xcopy ".\plugins\rlm\rlm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
778         xcopy ".\plugins\rtnet\rtnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
779         xcopy ".\plugins\rudp\rudp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
780         xcopy ".\plugins\sbus\sbus.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
781         xcopy ".\plugins\stats_tree\stats_tree.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
782         xcopy ".\plugins\v5ua\v5ua.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
783         if exist custom-install.bat custom-install $(INSTALL_DIR) $(VERSION)
784
785 install-deps1: install-common-deps1
786 !IFDEF GTK1_DIR
787         set copycmd=/y
788         xcopy $(GTK1_DIR)\lib\libgtk-0.dll $(INSTALL1_DIR) /d
789         xcopy $(GTK1_DIR)\lib\libgdk-0.dll $(INSTALL1_DIR) /d
790 !ENDIF
791
792 install-deps2: install-common-deps2
793 !IFDEF GTK2_DIR
794         set copycmd=/y
795         xcopy $(GTK2_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL2_DIR) /d
796         xcopy $(GTK2_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL2_DIR) /d
797         xcopy $(GTK2_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL2_DIR) /d
798         xcopy $(GTK2_DIR)\bin\libatk-1.0-0.dll $(INSTALL2_DIR) /d
799         xcopy $(GTK2_DIR)\bin\libpango-1.0-0.dll $(INSTALL2_DIR) /d
800         xcopy $(GTK2_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL2_DIR) /d
801         if not exist $(INSTALL2_DIR)\etc mkdir $(INSTALL2_DIR)\etc
802         if not exist $(INSTALL2_DIR)\etc\gtk-2.0 mkdir $(INSTALL2_DIR)\etc\gtk-2.0
803         if not exist $(INSTALL2_DIR)\etc\pango mkdir $(INSTALL2_DIR)\etc\pango
804         if not exist $(INSTALL2_DIR)\lib mkdir $(INSTALL2_DIR)\lib
805         if not exist $(INSTALL2_DIR)\lib\gtk-2.0 mkdir $(INSTALL2_DIR)\lib\gtk-2.0
806         if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR) mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)
807         if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders
808         if not exist $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules mkdir $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules
809 #       if not exist $(INSTALL2_DIR)\lib\pango mkdir $(INSTALL2_DIR)\lib\pango
810 #       if not exist $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR) mkdir $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)
811 #       if not exist $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules mkdir $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules
812         xcopy $(GTK2_DIR)\etc\gtk-2.0\*.* $(INSTALL2_DIR)\etc\gtk-2.0 /d
813         xcopy $(GTK2_DIR)\etc\pango\pango.* $(INSTALL2_DIR)\etc\pango /d
814         xcopy $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders\libpixbufloader-*.dll $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders /d
815         xcopy $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules\im-*.dll $(INSTALL2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules /d
816 #       xcopy $(GTK2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules\pango-*.dll $(INSTALL2_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules /d
817 !IFDEF NEED_LIBPNG_DLL
818         xcopy $(GTK2_DIR)\bin\libpng13.dll $(INSTALL2_DIR) /d
819 !ENDIF
820 !IFDEF NEED_CAIRO_DLL
821         xcopy $(GTK2_DIR)\bin\libcairo-2.dll $(INSTALL2_DIR)  /d
822         xcopy $(GTK2_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL2_DIR) /d
823 !ENDIF
824 !IFDEF GTK_WIMP_DIR
825         if not exist $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR) mkdir $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR)
826         xcopy "$(GTK_WIMP_DLLSRC_DIR)\libwimp.dll" $(INSTALL2_DIR)\$(GTK_WIMP_DLLDST_DIR) /d
827         if not exist $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR) mkdir $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR)
828         xcopy "$(GTK_WIMP_RCSRC_DIR)\gtkrc" $(INSTALL2_DIR)\$(GTK_WIMP_RCDST_DIR) /d
829 !ENDIF
830 !ENDIF
831
832 install-common-deps1:
833 !IFDEF GTK1_DIR
834         set INSTALL_DIR=$(INSTALL1_DIR)
835         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-deps
836 !ENDIF
837
838 install-common-deps2:
839 !IFDEF GTK2_DIR
840         set INSTALL_DIR=$(INSTALL2_DIR)
841         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-common-deps
842 !ENDIF
843
844 install-common-deps:
845         set copycmd=/y
846         if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
847         xcopy $(GLIB_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
848         xcopy $(GLIB_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
849         xcopy $(GLIB_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
850         xcopy $(ICONV_DIR)\bin\iconv.dll $(INSTALL_DIR) /d
851         xcopy $(GETTEXT_DIR)\bin\intl.dll $(INSTALL_DIR) /d
852 !IFDEF ZLIB_DIR
853         xcopy $(ZLIB_DIR)\zlib1.dll $(INSTALL_DIR) /d
854 !ENDIF
855 !IFDEF ADNS_DIR
856         xcopy $(ADNS_DIR)\adns_win32\LIB\adns_dll.dll $(INSTALL_DIR) /d
857 !ENDIF
858 !IFDEF PCRE_DIR
859         xcopy $(PCRE_DIR)\bin\pcre.dll $(INSTALL_DIR) /d
860         xcopy $(PCRE_DIR)\man\cat3\pcrepattern.3.txt $(INSTALL_DIR) /d
861 !ENDIF
862 !IFDEF KFW_DIR
863         xcopy $(KFW_DIR)\bin\comerr32.dll $(INSTALL_DIR) /d
864         xcopy $(KFW_DIR)\bin\krb5_32.dll $(INSTALL_DIR) /d
865 !ENDIF
866 !IFDEF GNUTLS_DIR
867         xcopy $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(INSTALL_DIR) /d
868         xcopy $(GNUTLS_DIR)\bin\libgnutls-14.dll $(INSTALL_DIR) /d
869         xcopy $(GNUTLS_DIR)\bin\libgnutls-extra-14.dll $(INSTALL_DIR) /d
870         xcopy $(GNUTLS_DIR)\bin\libgnutls-openssl-14.dll $(INSTALL_DIR) /d
871         xcopy $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(INSTALL_DIR) /d
872         xcopy $(GNUTLS_DIR)\bin\libtasn1-3.dll $(INSTALL_DIR) /d
873 !ENDIF
874 !IFDEF NET_SNMP_DIR
875         if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
876         if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
877         xcopy "$(NET_SNMP_DIR)\mibs\*.txt" $(INSTALL_DIR)\snmp\mibs /d
878 !ENDIF
879 !IFDEF LUA_DIR
880         xcopy "$(LUA_DIR)\lib\dll\lua5.1.dll" $(INSTALL_DIR) /d
881 !ENDIF
882
883 clean-deps1:
884         rm -rf $(INSTALL1_DIR)
885         cd plugins
886         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
887         cd ..
888
889 clean-deps2:
890         rm -rf $(INSTALL2_DIR)
891         cd plugins
892         $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
893         cd ..
894
895 clean-deps: clean-deps1 clean-deps2
896