wireshark/Makefile.nmake

1096 lines
41 KiB
Makefile

## Makefile for building wireshark.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id$
include config.nmake
include <win32.mak>
############### no need to modify below this line #########
CC = cl
LINK= link
BSCMAKE= bscmake
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
CFLAGS=-WX -DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
$(AIRPCAP_CFLAGS) \
$(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(LUA_CFLAGS) $(SMI_CFLAGS) \
-D_U_="" -D_NEED_VAR_IMPORT_
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
PLATFORM_SRC = capture-wpcap.c capture_wpcap_packet.c
WTAP_PLUGIN_SOURCES = \
epan/plugins.c \
epan/report_err.c \
epan/filesystem.c
include Makefile.common
wireshark_OBJECTS = $(wireshark_SOURCES:.c=.obj)
tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
rawshark_OBJECTS = $(rawshark_SOURCES:.c=.obj)
###text2pcap_OBJECTS = $(text2pcap_SOURCES:.c=.obj)
###mergecap_OBJECTS = $(mergecap_SOURCES:.c=.obj)
editcap_OBJECTS = $(editcap_SOURCES:.c=.obj)
capinfos_OBJECTS = $(capinfos_SOURCES:.c=.obj)
dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
EXTRA_OBJECTS = \
getopt.obj \
inet_ntop.obj \
inet_pton.obj \
mkstemp.obj \
strptime.obj
wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib shell32.lib comctl32.lib \
$(HHC_LIBS) \
wsutil\libwsutil.lib \
!IFDEF ENABLE_LIBWIRESHARK
epan\libwireshark.lib \
!ELSE
epan\dissectors\dissectors.lib \
epan\wireshark.lib \
epan\crypt\airpdcap.lib \
epan\dfilter\dfilter.lib \
epan\ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(GNUTLS_LIBS)
!ENDIF
tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
wsutil\libwsutil.lib \
!IFDEF ENABLE_LIBWIRESHARK
epan\libwireshark.lib \
!ELSE
epan\dissectors\dissectors.lib \
epan\wireshark.lib \
epan\crypt\airpdcap.lib \
epan\dfilter\dfilter.lib \
epan\ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(GNUTLS_LIBS)
!ENDIF
rawshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
wsutil\libwsutil.lib \
!IFDEF ENABLE_LIBWIRESHARK
epan\libwireshark.lib \
!ELSE
epan\dissectors\dissectors.lib \
epan\wireshark.lib \
epan\crypt\airpdcap.lib \
epan\dfilter\dfilter.lib \
epan\ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(GNUTLS_LIBS)
!ENDIF
capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib shell32.lib \
wsutil\libwsutil.lib \
$(GLIB_LIBS)
editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib shell32.lib \
wsutil\libwsutil.lib \
$(GLIB_LIBS)
mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
wsutil\libwsutil.lib \
$(GLIB_LIBS)
text2pcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
wsutil\libwsutil.lib \
$(GLIB_LIBS)
dumpcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
wsutil\libwsutil.lib \
$(GLIB_LIBS)
dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
wsutil\libwsutil.lib \
!IFDEF ENABLE_LIBWIRESHARK
epan\libwireshark.lib \
!ELSE
epan\dissectors\dissectors.lib \
epan\wireshark.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
$(ZLIB_LIBS) \
$(SMI_LIBS) \
$(GNUTLS_LIBS)
!ENDIF
randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
user32.lib \
wsutil\libwsutil.lib \
$(GLIB_LIBS)
EXECUTABLES=wireshark.exe tshark.exe rawshark.exe \
capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe dumpcap.exe
RESOURCES=image\wireshark.res image\libwireshark.res image\tshark.res \
image\capinfos.res image\editcap.res image\mergecap.res \
image\text2pcap.res image\wiretap.res image\dumpcap.res \
image\rawshark.res image\libwsutil.res
LIBS_CHECK=_libs_check_
all: $(LIBS_CHECK) config.h tools image codecs $(ADNS_DLL) $(ZLIB_DLL) wsutil wiretap epan $(EXECUTABLES) $(RESOURCES) doc install-all
packaging: all
cd packaging
cd nsis
$(MAKE) /$(MAKEFLAGS) -f makefile.nmake
cd ..
cd ..
packaging_u3: all
cd packaging
cd u3
cd win32
$(MAKE) /$(MAKEFLAGS) -f makefile.nmake
cd ..
cd ..
cd ..
packaging_papps: all
cd packaging
cd portableapps
cd win32
$(MAKE) /$(MAKEFLAGS) -f makefile.nmake
cd ..
cd ..
cd ..
# use (info-)zip from cygwin to pack things
packaging_zip: all
!IFDEF MSVCR_DLL
xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)
!ENDIF
!IFDEF VCREDIST_EXE
@echo Including vcredist_x86.exe -- your recipient may need to run it!
xcopy "$(VCREDIST_EXE)" $(INSTALL_DIR)
!ENDIF
rm -f wireshark.zip
zip -r -9 wireshark.zip $(INSTALL_DIR)/
wireshark.bsc: *.sbr epan\*.sbr epan\dfilter\*.sbr epan\ftypes\*.sbr epan\wslua\*.sbr epan\dissectors\*.sbr gtk\*.sbr wiretap\*.sbr
rm -f $@
$(BSCMAKE) @<<
/o $@ $?
<<
xcopy $@ wireshark-gtk2\ /d
$(RESOURCES): image
wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
wireshark.exe : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj inet_ntop.obj inet_pton.obj $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:wireshark.exe;1
!ENDIF
tshark.exe : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj inet_ntop.obj epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj inet_ntop.obj image\tshark.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
!ENDIF
rawshark.exe : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.obj inet_ntop.obj epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) getopt.obj inet_ntop.obj image\rawshark.res
<<
# XXX: This makefile does not properly handle doing a 'nmake ... capinfos.exe' directly since some of the .objs
# (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
@echo Linking $@
$(LINK) @<<
/OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) getopt.obj $(capinfos_LIBS) image\capinfos.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
!ENDIF
# XXX: This makefile does not properly handle doing a 'nmake ... editcap.exe' directly since some of the .objs
# (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) getopt.obj strptime.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
@echo Linking $@
$(LINK) @<<
/OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) getopt.obj strptime.obj $(editcap_LIBS) image\editcap.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
!ENDIF
mergecap.exe : $(LIBS_CHECK) config.h svnversion.h mergecap.obj merge.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
@echo Linking $@
$(LINK) @<<
/OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
!ENDIF
text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
@echo Linking $@
$(LINK) @<<
/OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj $(text2pcap_LIBS) strptime.obj image\text2pcap.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
!ENDIF
dftest.exe : $(dftest_OBJECTS) epan
@echo Linking $@
$(LINK) @<<
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS)
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
!ENDIF
randpkt.exe : $(randpkt_OBJECTS) getopt.obj
@echo Linking $@
$(LINK) @<<
/OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) getopt.obj
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
!ENDIF
dumpcap.exe : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj mkstemp.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
@echo Linking $@
$(LINK) @<<
/OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj mkstemp.obj image\dumpcap.res
<<
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "dumpcap.exe.manifest" -outputresource:dumpcap.exe;1
!ENDIF
config.h : config.h.win32 config.nmake
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
-e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
-e "s/@HAVE_KFW@/$(KFW_CONFIG)/" \
-e "s/@HAVE_NETTLE@/$(NETTLE_CONFIG)/" \
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
-e "s/@HAVE_PCAP_DATALINK_NAME_TO_VAL@/$(PCAP_DATALINK_NAME_TO_VAL_CONFIG)/" \
-e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
-e "s/@HAVE_PCAP_BREAKLOOP@/$(PCAP_BREAKLOOP_CONFIG)/" \
-e "s/@HAVE_REMOTE@/$(PCAP_HAVE_REMOTE_CONFIG)/" \
-e "s/@HAVE_PCAP_REMOTE@/$(PCAP_REMOTE_CONFIG)/" \
-e "s/@HAVE_PCAP_OPEN@/$(PCAP_OPEN_CONFIG)/" \
-e "s/@HAVE_PCAP_LIST_DATALINKS@/$(PCAP_LIST_DATALINKS_CONFIG)/" \
-e "s/@HAVE_PCAP_SET_DATALINK@/$(PCAP_SET_DATALINK_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS_EX@/$(PCAP_FINDALLDEVS_EX_CONFIG)/" \
-e "s/@HAVE_PCAP_CREATESRCSTR@/$(PCAP_CREATESRCSTR_CONFIG)/" \
-e "s/@HAVE_PCAP_SETSAMPLING@/$(PCAP_SETSAMPLING_CONFIG)/" \
-e "s/@HAVE_LIBWIRESHARKDLL@/$(LIBWIRESHARK_CONFIG)/" \
-e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
-e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \
-e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \
-e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \
-e "s/@HAVE_LUA_5_1@/$(LUA_VERSION)/" \
-e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \
-e "s/@HAVE_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \
-e "s/@HAVE_LIBPORTAUDIO@/$(PORTAUDIO_CONFIG)/" \
-e "s/@PORTAUDIO_API_1@/$(PORTAUDIO_API_CONFIG)/" \
-e "s/@HAVE_SMI@/$(SMI_CONFIG)/" \
< config.h.win32 > $@
ps.c : rdps.exe print.ps
rdps print.ps ps.c
#
# Build the version string
#
!IF EXIST(".svn/entries")
SVNENTRIES = .svn/entries
!ELSE
SVNENTRIES =
!ENDIF
svnversion.h: $(SVNENTRIES)
rm -f svnversion.h
$(PERL) make-version.pl
#
# Build the short version of the authors file for the about dialog
#
AUTHORS-SHORT: AUTHORS make-authors-short.pl
$(PERL) perlnoutf.pl make-authors-short.pl < AUTHORS > AUTHORS-SHORT
#
# Build the short version of the authors file with formatting codes for
# the man page
#
AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
$(PERL) perlnoutf.pl make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
#
# Build "tshark-tap-register.c", which contains a function
# "register_all_tap_listeners()"
# that calls the register routines for all TShark tap listeners.
#
# We do this by grepping through sources.
#
# Formatting conventions: The name of the tap_listener_register_*
# routines must start in column zero, or must be preceded only by
# "void " starting in column zero, and must not be inside #if.
#
# The first argument is the name of the file to write.
# The second argument is the directory in which the source files live.
# All subsequent arguments are the files to scan.
#
tshark-tap-register.c: $(TSHARK_TAP_SRC) make-tapreg-dotc
@echo Making tshark-tap-register.c
@$(SH) make-tapreg-dotc tshark-tap-register.c . $(TSHARK_TAP_SRC)
text2pcap-scanner.c : text2pcap-scanner.l
$(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
clean-local: clean-deps
rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
$(EXTRA_OBJECTS) $(EXECUTABLES) *.pdb *.exe.manifest \
capinfos.obj editcap.obj mergecap.obj text2pcap.obj \
nio-ie5.obj update.obj \
text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
rdps.pdb rdps.exe rdps.ilk config.h ps.c AUTHORS-SHORT \
AUTHORS-SHORT-FORMAT $(LIBS_CHECK) \
dftest.obj dftest.exe randpkt.obj randpkt.ext \
doxygen.cfg \
$(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll \
libwsutil.dll \
wireshark.bsc
clean: clean-local
cd asn1
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../wsutil
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../codecs
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../u3/win32
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../../portableapps/win32
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../../..
# "distclean" removes all files not part of the distribution.
# It does not remove generated files that are part of the distribution.
distclean-local: clean-local
!IFDEF ADNS_DIR
!IF "$(MSVC_VARIANT)" != "MSVC6"
rm -f $(ADNS_DLL) $(ADNS_LIBS)
!ENDIF
!ENDIF
!IFDEF ZLIB_DIR
rm -f $(ZLIB_DLL) $(ZLIB_DIR)\zlib1.dll.manifest \
$(ZLIB_DIR)\include\zlib.h $(ZLIB_DIR)\include\zconf.h \
$(ZLIB_DIR)\lib\zdll.lib
!ENDIF
rm -f config.h $(BUILT_SOURCES)
distclean: distclean-local
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../wsutil
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../codecs
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../u3/win32
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../../portableapps/win32
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../../..
# Make "maintainer-clean" only if you would like to remove ALL generated
# files.
# Be sure to have python and perl installed to regenerate them.
maintainer-clean-local: distclean-local
rm -f $(GENERATED_FILES)
maintainer-clean: maintainer-clean-local
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../wsutil
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../codecs
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../u3/win32
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../../portableapps/win32
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
cd ../../..
tools::
cd tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
image::
cd image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
!IFDEF ADNS_DIR
# Non-MSVC6 variants have to avoid indirectly using msvcrt.dll,
# therefore compile the adns dll from source ADNS_DIR package.
# To avoid path problems, copy the adns sources to a temp dir,
# compile and copy the resulting files back to (source) ADNS_DIR
#
# Unfortunately:
# - we need to "patch" adns_dll.rep and adns_dll.rc (at least for MSVC2005EE)
# - on MSVC6 we can't easily rebuild, because iphlpapi.h is needed
#
$(ADNS_DLL):
!IF "$(MSVC_VARIANT)" == "MSVC6"
if not exist $(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns mkdir $(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns
copy $(ADNS_DIR)\adns_win32\lib\adns_dll.dll $(ADNS_DLL)
copy $(ADNS_DIR)\adns_win32\lib\adns_dll.lib $(ADNS_LIBS)
!ELSE
xcopy $(ADNS_DIR) adns.tmp /D /I /E /Y
copy adns_dll.dep adns.tmp\adns_win32\adns_dll
copy adns_dll.rc adns.tmp\adns_win32\adns_dll
cd adns.tmp\adns_win32\adns_dll
set CFG=adns_dll - Win32 Release
$(MAKE) /$(MAKEFLAGS) -f adns_dll.mak LOC="-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE"
cd ..\lib
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "adns_dll.dll.manifest" -outputresource:adns_dll.dll;2
!ENDIF
if not exist $(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns mkdir $(WIRESHARK_LIBS)\$(MSVC_VARIANT)\adns
copy adns_dll.dll $(ADNS_DLL)
copy adns_dll.lib $(ADNS_LIBS)
cd ..\..\..
rm -r -f adns.tmp
!ENDIF
!ENDIF
!IFDEF ZLIB_DIR
# Non-MSVC6 variants have to avoid indirectly using msvcrt.dll,
# therefore compile the zlib dll from source ZLIB_DIR package.
# To avoid path problems, copy the zlib sources to a temp dir,
# compile and copy the resulting files back to (source) ZLIB_DIR
$(ZLIB_DLL):
xcopy $(ZLIB_DIR) zlib.tmp /D /I /E /Y
cd zlib.tmp
$(MAKE) /$(MAKEFLAGS) -f win32/Makefile.msc zlib1.dll LOC="-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE"
if not exist $(ZLIB_DIR) mkdir $(ZLIB_DIR)
if not exist $(ZLIB_DIR)\lib mkdir $(ZLIB_DIR)\lib
if not exist $(ZLIB_DIR)\include mkdir $(ZLIB_DIR)\include
!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
mt.exe -nologo -manifest "zlib1.dll.manifest" -outputresource:zlib1.dll;2
!ENDIF
copy zlib1.dll $(ZLIB_DIR)
copy zdll.lib $(ZLIB_DIR)\lib
copy zconf.h $(ZLIB_DIR)\include
copy zlib.h $(ZLIB_DIR)\include
cd ..
rm -r -f zlib.tmp
!ENDIF
wsutil::
cd wsutil
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
wiretap::
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
codecs::
cd codecs
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
gtk:: help config.h svnversion.h AUTHORS-SHORT doxygen
cd gtk
$(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
cd ..
epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib $(BUILT_SOURCES) doxygen
cd epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
plugins::
cd plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
doc::
cd doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
help::
cd help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
doxygen.cfg: config.nmake doxygen.cfg.in
sed -e s/@VERSION@/$(VERSION)/ \
< doxygen.cfg.in > $@
doxygen-run:
!IFDEF DOXYGEN
$(DOXYGEN) doxygen.cfg
!ENDIF
doxygen: doxygen.cfg doxygen-run
################################################################################
# Prepare build environment by downloading and installing required libraries
################################################################################
# The required tools to build Wireshark.
#
# The 'find' tool is available both in \WINNT\System32 and in cygwin's /usr/bin.
# We only need the cygwin version (for some shell scripts).
# In the PATH, System32 is before cygwin's dir, so explicitly check for /usr/bin/find.
REQUIRED_TOOLS=\
$(CC) \
$(LINK) \
nmake \
$(SH_PROG) \
$(YACC) \
$(LEX) \
env \
grep \
/usr/bin/find \
$(PERL) \
$(PYTHON) \
sed \
unzip \
wget
verify_tools:
@$(SH) tools\win32-setup.sh --appverify $(REQUIRED_TOOLS)
# Targets and etc used to verify or download libraries
!IFNDEF WIN32_SETUP_OPT
WIN32_SETUP_OPT=--download
!ENDIF
# Verify that the required library 'package' (zip) files have been downloaded.
# (It seems reasonable to assume that if the files have been downloaded
# then they have been installed).
check_libs:
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN32_SETUP_OPT=--libverify process_libs
# Verify library packages only if Makefile.nmake has been updated
# (or dummy file doesn't exist because of 'make clean' or whatever)
# (To disable library verification when Makefile.nmake changes,
# comment out the commands for the following target).
# touch is only called if libverify succeeds
$(LIBS_CHECK): Makefile.nmake
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake WIN32_SETUP_OPT=--libverify process_libs
@touch --reference=Makefile.nmake $@
# Download (if needed) and install all the required libraries into WIRESHARK_LIBS.
# A clean_setup is done first to ensure that the target dirs don't
# contain old files remaining from a previous setup run.
setup: verify_tools clean_setup process_libs
# The process_libs target when invoked causes either a --libverify or a --download for all the required libraries.
# (The choice is determined by the value of the macro WIN32_SETUP_OPT).
process_libs:
if not exist $(WIRESHARK_LIBS) md $(WIRESHARK_LIBS)
!IF "$(GTK_INST_VERSION)" == "2.12"
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
glib gtk2.12/glib-2.16.3.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
glib gtk2.12/glib-dev-2.16.3.zip
!ELSEIF "$(GTK_INST_VERSION)" == "2.10"
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
glib gtk2.10/glib-2.12.13.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
glib gtk2.10/glib-dev-2.12.13.zip
!ELSE
!ERROR ? Unknown or invalid GTK_INST_VERSION
!ENDIF
!IFDEF ICONV_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
libiconv-1.9.1.bin.woe32 libiconv-1.9.1.bin.woe32.zip
!ENDIF
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gettext-runtime-0.17-1 gettext-runtime-0.17-1.zip
!IFDEF KFW_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
kfw-2.5 kfw-2.5.zip
!ENDIF
!IFDEF PCAP_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. WpdPack_4_0_2.zip
!ENDIF
!IFDEF AIRPCAP_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
AirPcap_Devpack_1_0_0_594 AirPcap_Devpack_1_0_0_594.zip
!ENDIF
!IFDEF ADNS_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. adns-1.0-win32-05.zip
!ENDIF
!IFDEF PCRE_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
pcre-7.0 pcre-7.0-bin.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
pcre-7.0 pcre-7.0-lib.zip
!ENDIF
!IFDEF ZLIB_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
zlib123 zlib123ws.zip
!ENDIF
!IFDEF LUA_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. lua5_1_dll.zip
!ENDIF
!IFDEF GNUTLS_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. gnutls-2.3.8-1.zip
!ENDIF
!IFDEF PORTAUDIO_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. portaudio_v19_2.zip
!ENDIF
!IFDEF SMI_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. libsmi-0.4.8.zip
!ENDIF
!IFDEF GTK_DIR
!IF "$(GTK_INST_VERSION)" == "2.12"
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/gtk+-2.12.10.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/gtk+-dev-2.12.10.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/cairo-1.6.4-2.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/cairo-dev-1.6.4-2.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/atk-1.22.0.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/atk-dev-1.22.0.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/libpng-1.2.29.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/tiff-3.8.2-1-bin.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/jpeg-6b-4-bin.zip
!ELSEIF "$(GTK_INST_VERSION)" == "2.10"
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/gtk+-2.10.14.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/gtk+-dev-2.10.14.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/cairo-1.4.8.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/cairo-dev-1.4.8.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/atk-1.18.0.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/atk-dev-1.18.0.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/libpng-1.2.8-bin.zip
!ELSE
!ERROR ? Unknown or invalid GTK_INST_VERSION
!ENDIF
!IF "$(PANGO_INST_VERSION)" == "1.20"
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/pango-1.20.3.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.12/pango-dev-1.20.3.zip
!ELSEIF "$(PANGO_INST_VERSION)" == "1.16"
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/pango-1.16.4.zip
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
gtk2 gtk2.10/pango-dev-1.16.4.zip
!ELSE
!ERROR ? Unknown or invalid PANGO_INST_VERSION
!ENDIF
!ENDIF
!IFDEF HHC_DIR
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
user-guide user-guide-24665.zip
!ENDIF
!IFDEF UPX
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. upx301w.zip
!ENDIF
!IFDEF NASM
@$(SH) tools\win32-setup.sh "$(WIN32_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
. nasm-2.02-win32.zip
!ENDIF
@echo.
@echo Wireshark is ready to build.
# Cleanup files installed by the setup target. It will not remove the
# downloaded zip files.
# WHEN UPDATING LIBRARY VERSIONS, KEEP ALSO ONE FORMER VERSION SO
# UPDATING REMOVES THE FORMER USER DIRS
clean_setup:
rm -r -f $(WIRESHARK_LIBS)/adns-1.0-win32-05
rm -r -f $(WIRESHARK_LIBS)/gettext-0.14.5
rm -r -f $(WIRESHARK_LIBS)/gettext-runtime-0.17
rm -r -f $(WIRESHARK_LIBS)/gettext-runtime-0.17-1
rm -r -f $(WIRESHARK_LIBS)/glib
rm -r -f $(WIRESHARK_LIBS)/gnutls-1.6.1-1
rm -r -f $(WIRESHARK_LIBS)/gnutls-2.3.8-1
rm -r -f $(WIRESHARK_LIBS)/gtk2
rm -r -f $(WIRESHARK_LIBS)/gtk+
rm -r -f $(WIRESHARK_LIBS)/gtk-wimp
rm -r -f $(WIRESHARK_LIBS)/kfw-2.5
rm -r -f $(WIRESHARK_LIBS)/libiconv-1.9.1.bin.woe32
rm -r -f $(WIRESHARK_LIBS)/lua5.1
rm -r -f $(WIRESHARK_LIBS)/libsmi-0.4.5
rm -r -f $(WIRESHARK_LIBS)/libsmi-0.4.8
rm -r -f $(WIRESHARK_LIBS)/nasm-2.00
rm -r -f $(WIRESHARK_LIBS)/nasm-2.02
rm -r -f $(WIRESHARK_LIBS)/pcre-6.4
rm -r -f $(WIRESHARK_LIBS)/pcre-7.0
rm -r -f $(WIRESHARK_LIBS)/portaudio_v19
rm -r -f $(WIRESHARK_LIBS)/portaudio_v19_2
rm -r -f $(WIRESHARK_LIBS)/user-guide
rm -r -f $(WIRESHARK_LIBS)/WpdPack
rm -r -f $(WIRESHARK_LIBS)/AirPcap_Devpack_1_0_0_594
rm -r -f $(WIRESHARK_LIBS)/zlib123
rm -r -f $(WIRESHARK_LIBS)/zlib123-dll
rm -r -f $(WIRESHARK_LIBS)/upx301w
################################################################################
# Prepare the debug trees for running Wireshark/Tshark from there.
################################################################################
# prepare debugging of Wireshark in INSTALL_DIR
debug-wireshark: wireshark.exe install-generated-files
# prepare debugging of tshark in INSTALL_DIR
debug-tshark: tshark.exe install-generated-files
# prepare debugging of rawshark in INSTALL_DIR
debug-rawshark: rawshark.exe install-generated-files
# prepare debugging of dumpcap in INSTALL_DIR
debug-dumpcap: dumpcap.exe install-generated-files
# install generated files (exe, "our" libs, ...)
install-generated-files:
set copycmd=/y
!IF "$(MSVC_VARIANT)" == "MSVC2008EE"
xcopy "$(MSVCR_DLL)" $(INSTALL_DIR)
!ENDIF
if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
!IFDEF ENABLE_LIBWIRESHARK
xcopy epan\libwireshark.dll $(INSTALL_DIR) /d
!ENDIF
xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
if exist ".\wiretap\wiretap-$(WTAP_VERSION).pdb" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).pdb" $(INSTALL_DIR) /d
xcopy ".\epan\libwireshark.dll" $(INSTALL_DIR) /d
xcopy ".\wsutil\libwsutil.dll" $(INSTALL_DIR) /d
if exist ".\epan\libwireshark.pdb" xcopy ".\epan\libwireshark.pdb" $(INSTALL_DIR) /d
if exist wireshark.exe copy wireshark.exe $(INSTALL_DIR)\wireshark.exe
if exist wireshark.pdb copy wireshark.pdb $(INSTALL_DIR)\wireshark.pdb
if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(INSTALL_DIR) /d
if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
if exist tshark.pdb xcopy tshark.pdb $(INSTALL_DIR) /d
if exist rawshark.exe xcopy rawshark.exe $(INSTALL_DIR) /d
if exist rawshark.exe.manifest xcopy rawshark.exe.manifest $(INSTALL_DIR) /d
if exist rawshark.pdb xcopy rawshark.pdb $(INSTALL_DIR) /d
if exist dumpcap.exe xcopy dumpcap.exe $(INSTALL_DIR) /d
if exist dumpcap.pdb xcopy dumpcap.pdb $(INSTALL_DIR) /d
if exist mergecap.exe xcopy mergecap.exe $(INSTALL_DIR) /d
if exist mergecap.pdb xcopy mergecap.pdb $(INSTALL_DIR) /d
if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL_DIR) /d
if exist text2pcap.pdb xcopy text2pcap.pdb $(INSTALL_DIR) /d
if exist capinfos.exe xcopy capinfos.exe $(INSTALL_DIR) /d
if exist capinfos.pdb xcopy capinfos.pdb $(INSTALL_DIR) /d
if exist editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
if exist editcap.pdb xcopy editcap.pdb $(INSTALL_DIR) /d
xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
xcopy ".\manuf" $(INSTALL_DIR) /d
xcopy ".\services" $(INSTALL_DIR) /d
xcopy ".\FAQ" $(INSTALL_DIR) /d
xcopy ".\README" $(INSTALL_DIR) /d
xcopy ".\README.win32" $(INSTALL_DIR) /d
xcopy ".\AUTHORS-SHORT" $(INSTALL_DIR) /d
xcopy ".\COPYING" $(INSTALL_DIR) /d
copy ".\NEWS" $(INSTALL_DIR)\NEWS.txt
xcopy ".\cfilters" $(INSTALL_DIR) /d
xcopy ".\colorfilters" $(INSTALL_DIR) /d
xcopy ".\dfilters" $(INSTALL_DIR) /d
xcopy ".\smi_modules" $(INSTALL_DIR) /d
!IFDEF LUA_DIR
xcopy ".\epan\wslua\init.lua" $(INSTALL_DIR) /d
xcopy ".\epan\wslua\console.lua" $(INSTALL_DIR) /d
!ENDIF
xcopy doc\*.html $(INSTALL_DIR) /d
if not exist $(INSTALL_DIR)\help mkdir $(INSTALL_DIR)\help
xcopy ".\help\*.*" $(INSTALL_DIR)\help /d
if not exist $(INSTALL_DIR)\dtds mkdir $(INSTALL_DIR)\dtds
xcopy ".\dtds\*.*" $(INSTALL_DIR)\dtds /d
if not exist $(INSTALL_DIR)\asn1 mkdir $(INSTALL_DIR)\asn1
echo create empty asn1 default.tt file to prevent problems 2> $(INSTALL_DIR)\asn1\default.tt
if not exist $(INSTALL_DIR)\radius mkdir $(INSTALL_DIR)\radius
xcopy ".\radius\*.*" $(INSTALL_DIR)\radius /d
if not exist $(INSTALL_DIR)\diameter mkdir $(INSTALL_DIR)\diameter
xcopy ".\diameter\*.dtd" $(INSTALL_DIR)\diameter /d
xcopy ".\diameter\*.xml" $(INSTALL_DIR)\diameter /d
if not exist $(INSTALL_DIR)\tpncp mkdir $(INSTALL_DIR)\tpncp
xcopy ".\tpncp\*.dat" $(INSTALL_DIR)\tpncp /d
if not exist $(INSTALL_DIR)\wimaxasncp mkdir $(INSTALL_DIR)\wimaxasncp
xcopy ".\wimaxasncp\*.*" $(INSTALL_DIR)\wimaxasncp /d
if not exist $(INSTALL_DIR)\plugins mkdir $(INSTALL_DIR)\plugins
if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
xcopy ".\plugins\agentx\agentx.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\artnet\artnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\asn1\asn1.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\ciscosm\ciscosm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\docsis\docsis.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\enttec\enttec.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\ethercat\ethercat.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\giop\coseventcomm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\giop\cosnaming.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\giop\parlay.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\giop\tango.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\gryphon\gryphon.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\infiniband\infiniband.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\irda\irda.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\lwres\lwres.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\m2m\m2m.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\mate\mate.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\opcua\opcua.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\opsi\opsi.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\pcli\pcli.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\profinet\profinet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\rlm\rlm.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\rtnet\rtnet.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\rudp\rudp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\sbus\sbus.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\sercosiii\sercosiii.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\stats_tree\stats_tree.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\unistim\unistim.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\v5ua\v5ua.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\wimax\wimax.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
xcopy ".\plugins\wimaxasncp\wimaxasncp.dll" $(INSTALL_DIR)\plugins\$(VERSION) /d
if exist custom-install.bat custom-install $(INSTALL_DIR) $(VERSION)
# "install-all" will copy all files needed to run Wireshark/Tshark
# to the INSTALL_DIR, so you can run/debug Wireshark/Tshark from there.
install-all: install-generated-files
set copycmd=/y
if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
xcopy $(GTK_DIR)\bin\libgdk-win32-2.0-0.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libgtk-win32-2.0-0.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libatk-1.0-0.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libpango-1.0-0.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libpangowin32-1.0-0.dll $(INSTALL_DIR) /d
if not exist $(INSTALL_DIR)\etc mkdir $(INSTALL_DIR)\etc
if not exist $(INSTALL_DIR)\etc\gtk-2.0 mkdir $(INSTALL_DIR)\etc\gtk-2.0
if not exist $(INSTALL_DIR)\etc\pango mkdir $(INSTALL_DIR)\etc\pango
if not exist $(INSTALL_DIR)\lib mkdir $(INSTALL_DIR)\lib
if not exist $(INSTALL_DIR)\lib\gtk-2.0 mkdir $(INSTALL_DIR)\lib\gtk-2.0
if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)
if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders
if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\immodules mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\immodules
if not exist $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\immodules mkdir $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\engines
# if not exist $(INSTALL_DIR)\lib\pango mkdir $(INSTALL_DIR)\lib\pango
# if not exist $(INSTALL_DIR)\lib\pango\$(PANGO_LIB_DIR) mkdir $(INSTALL_DIR)\lib\pango\$(PANGO_LIB_DIR)
# if not exist $(INSTALL_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules mkdir $(INSTALL_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules
xcopy $(GTK_DIR)\etc\gtk-2.0\*.* $(INSTALL_DIR)\etc\gtk-2.0 /d
xcopy $(GTK_DIR)\etc\pango\pango.* $(INSTALL_DIR)\etc\pango /d
xcopy $(GTK_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders\libpixbufloader-*.dll $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\loaders /d
xcopy $(GTK_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\immodules\im-*.dll $(INSTALL_DIR)\lib\gtk-2.0\$(GTK_LIB_DIR)\immodules /d
# xcopy $(GTK_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules\pango-*.dll $(INSTALL_DIR)\lib\pango\$(PANGO_LIB_DIR)\modules /d
!IFDEF NEED_LIBPNG_DLL
# xcopy $(GTK_DIR)\bin\libpng13.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libpng12-0.dll $(INSTALL_DIR) /d
!ENDIF
!IFDEF NEED_LIBTIFF_DLL
xcopy $(GTK_DIR)\bin\libtiff3.dll $(INSTALL_DIR) /d
!ENDIF
!IFDEF NEED_LIBJPEG_DLL
xcopy $(GTK_DIR)\bin\jpeg62.dll $(INSTALL_DIR) /d
!ENDIF
!IFDEF NEED_CAIRO_DLL
xcopy $(GTK_DIR)\bin\libcairo-2.dll $(INSTALL_DIR) /d
xcopy $(GTK_DIR)\bin\libpangocairo-1.0-0.dll $(INSTALL_DIR) /d
!ENDIF
if not exist $(INSTALL_DIR)\$(GTK_WIMP_DLLDST_DIR) mkdir $(INSTALL_DIR)\$(GTK_WIMP_DLLDST_DIR)
xcopy "$(GTK_WIMP_DLLSRC_DIR)\libwimp.dll" $(INSTALL_DIR)\$(GTK_WIMP_DLLDST_DIR) /d
if not exist $(INSTALL_DIR)\$(GTK_WIMP_RCDST_DIR) mkdir $(INSTALL_DIR)\$(GTK_WIMP_RCDST_DIR)
xcopy "$(GTK_WIMP_RCSRC_DIR)\gtkrc" $(INSTALL_DIR)\$(GTK_WIMP_RCDST_DIR) /d
xcopy $(GLIB_DIR)\bin\libglib-2.0-0.dll $(INSTALL_DIR) /d
xcopy $(GLIB_DIR)\bin\libgobject-2.0-0.dll $(INSTALL_DIR) /d
xcopy $(GLIB_DIR)\bin\libgmodule-2.0-0.dll $(INSTALL_DIR) /d
!IFDEF ICONV_DIR
xcopy $(ICONV_DIR)\bin\iconv.dll $(INSTALL_DIR) /d
!ENDIF
xcopy $(GETTEXT_DIR)\bin\intl.dll $(INSTALL_DIR) /d
!IFDEF ZLIB_DIR
xcopy $(ZLIB_DLL) $(INSTALL_DIR) /d
!ENDIF
!IFDEF ADNS_DIR
xcopy $(ADNS_DLL) $(INSTALL_DIR) /d
!ENDIF
!IFDEF PCRE_DIR
xcopy $(PCRE_DIR)\bin\pcre3.dll $(INSTALL_DIR) /d
xcopy $(PCRE_DIR)\man\cat3\pcrepattern.3.txt $(INSTALL_DIR) /d
!ENDIF
!IFDEF KFW_DIR
xcopy $(KFW_DIR)\bin\comerr32.dll $(INSTALL_DIR) /d
xcopy $(KFW_DIR)\bin\krb5_32.dll $(INSTALL_DIR) /d
!ENDIF
!IFDEF GNUTLS_DIR
xcopy $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(INSTALL_DIR) /d
xcopy $(GNUTLS_DIR)\bin\libgnutls-26.dll $(INSTALL_DIR) /d
xcopy $(GNUTLS_DIR)\bin\libgnutls-extra-26.dll $(INSTALL_DIR) /d
xcopy $(GNUTLS_DIR)\bin\libgnutls-openssl-26.dll $(INSTALL_DIR) /d
xcopy $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(INSTALL_DIR) /d
xcopy $(GNUTLS_DIR)\bin\libtasn1-3.dll $(INSTALL_DIR) /d
!ENDIF
!IFDEF LUA_DIR
xcopy "$(LUA_DIR)\lib\dll\lua5.1.dll" $(INSTALL_DIR) /d
!ENDIF
!IFDEF SMI_DIR
if not exist $(INSTALL_DIR)\snmp mkdir $(INSTALL_DIR)\snmp
if not exist $(INSTALL_DIR)\snmp\mibs mkdir $(INSTALL_DIR)\snmp\mibs
xcopy "$(SMI_DIR)\lib\smi.dll" $(INSTALL_DIR) /d
xcopy "$(SMI_DIR)\mibs\*" $(INSTALL_DIR)\snmp\mibs /d
!ENDIF
clean-deps:
rm -rf $(INSTALL_DIR)
cd plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean-deps
cd ..
checkapi_local:
$(PERL) tools/checkAPIs.pl \
# $(wireshark_SOURCES) \
$(TSHARK_TAP_SRC) \
# $(EXTRA_wireshark_SOURCES)
checkapi: checkapi_local
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../codecs
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../gtk
## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../epan
## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../epan/crypt
## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../dfilter
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../ftypes
## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../wslua
## $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../dissectors
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ..
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
cd ../wsutil
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi