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