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