rerun pidl
[metze/wireshark/wip.git] / Makefile.nmake
index 364fca4fae1a5bc0746a38fec6e920ab902f2036..99ce77398114377965f4e023cccaa4c616e6934a 100644 (file)
@@ -51,21 +51,22 @@ CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS)
 .c.obj::
        $(CC) $(CFLAGS) -Fd.\ -c $<
 
-PLATFORM_SRC = capture-wpcap.c capture_wpcap_packet.c capture_win_ifnames.c
-
-WTAP_PLUGIN_SOURCES = \
-       epan/plugins.c \
-       epan/filesystem.c
+PLATFORM_PCAP_SRC = \
+       capture-wpcap.c \
+       capture_wpcap_packet.c \
+       capture_win_ifnames.c
 
 include Makefile.common
 
 wireshark_OBJECTS = $(WIRESHARK_COMMON_SRC:.c=.obj)
 tshark_OBJECTS = $(tshark_SOURCES:.c=.obj)
+tfshark_OBJECTS = $(tfshark_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)
+captype_OBJECTS = $(captype_SOURCES:.c=.obj)
 dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
 dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
@@ -115,6 +116,24 @@ tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        $(ZLIB_LIBS)
 !ENDIF
 
+tfshark_LIBS= filetap\filetap-$(FTAP_VERSION).lib \
+       wiretap\wiretap-$(WTAP_VERSION).lib \
+       wsock32.lib user32.lib psapi.lib \
+       $(GLIB_LIBS) \
+       $(GTHREAD_LIBS) \
+       wsutil\libwsutil.lib \
+       $(GNUTLS_LIBS) \
+       $(PYTHON_LIBS) \
+!IFDEF ENABLE_LIBWIRESHARK
+       epan\libwireshark.lib \
+!ELSE
+       epan\dissectors\dissectors.lib \
+       epan\wireshark.lib \
+       epan\dfilter\dfilter.lib \
+       epan\ftypes\ftypes.lib \
+       epan\wmem\wmem.lib
+!ENDIF
+
 rawshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        wsock32.lib user32.lib psapi.lib \
        $(GLIB_LIBS) \
@@ -140,6 +159,11 @@ capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        $(GLIB_LIBS) \
        $(GCRYPT_LIBS)
 
+captype_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 \
@@ -188,22 +212,22 @@ randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        wsutil\libwsutil.lib \
        $(GLIB_LIBS)
 
-EXECUTABLES=wireshark.exe tshark.exe rawshark.exe \
-       capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe \
-       reordercap.exe dumpcap.exe dftest.exe
+EXECUTABLES=wireshark.exe tshark.exe tfshark.exe rawshark.exe \
+       capinfos.exe captype.exe editcap.exe mergecap.exe text2pcap.exe \
+       randpkt.exe reordercap.exe dumpcap.exe dftest.exe
 
 !IFDEF QT5_BASE_DIR
 EXECUTABLES=$(EXECUTABLES) qtshark.exe
 !ENDIF
 
 RESOURCES=image\wireshark.res image\file_dlg_win32.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\reordercap.res image\libwsutil.res
+       image\libwireshark.res image\tshark.res image\tfshark.res image\capinfos.res \
+       image\captype.res image\editcap.res image\mergecap.res \
+       image\text2pcap.res image\wiretap.res image\filetap.res image\dumpcap.res \
+       image\rawshark.res image\reordercap.res image\libwsutil.res
 
 
-all: $(LIBS_CHECK) config.h ui\qt\config.pri tools image codecs $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil wiretap epan $(EXECUTABLES) wireshark.bsc $(RESOURCES) help install-all
+all: $(LIBS_CHECK) config.h ui\qt\config.pri tools image codecs $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil wiretap filetap epan $(EXECUTABLES) wireshark.bsc $(RESOURCES) help install-all
 
 !IFDEF MAKENSIS
 packaging: all
@@ -255,6 +279,7 @@ wireshark.bsc: \
        epan\dissectors\*.sbr           \
        epan\ftypes\*.sbr               \
        epan\wslua\*.sbr                \
+       filetap\*.sbr                   \
        plugins\asn1\*.sbr              \
        plugins\docsis\*.sbr            \
        plugins\ethercat\*.sbr          \
@@ -293,6 +318,7 @@ $(RESOURCES): image
 ## Note: The proper "SUBSYSTEM" link option to be used for linking each of the Wireshark executables
 ##       is specified in '$(guiflags)' or '$(conflags)' as used as part of the link options.
 ##       (These variables are defined in win32.mak).
+filetap\filetap-$(FTAP_VERSION).lib: image $(ZLIB_DLL) filetap
 wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
 
 wireshark.exe  : $(LIBS_CHECK) config.h $(wireshark_OBJECTS) codecs epan ui gtk win32 image\wireshark.res image\file_dlg_win32.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib ui\libui.lib ui\gtk\libgtkui.lib ui\win32\libgtkui_win32.lib plugins
@@ -315,6 +341,15 @@ tshark.exe : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan ui cli image\tshark.r
        mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
 !ENDIF
 
+tfshark.exe    : $(LIBS_CHECK) config.h $(tfshark_OBJECTS) epan ui cli image\tfshark.res wsutil\libwsutil.lib filetap\filetap-$(FTAP_VERSION).lib plugins
+       @echo Linking $@
+       $(LINK) @<<
+               /OUT:tfshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE $(tfshark_LIBS) $(tfshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tfshark.res
+<<
+!IFDEF MANIFEST_INFO_REQUIRED
+       mt.exe -nologo -manifest "tfshark.exe.manifest" -outputresource:tfshark.exe;1
+!ENDIF
+
 rawshark.exe   : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan ui image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
        @echo Linking $@
        $(LINK) @<<
@@ -324,8 +359,6 @@ rawshark.exe        : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan ui image\rawshark
        mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
 !ENDIF
 
-# 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').
 # Linking with setargv.obj enables "wildcard expansion" of command-line arguments
 capinfos.exe   : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
        @echo Linking $@
@@ -336,8 +369,16 @@ capinfos.exe       : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsutil\libwsutil.lib w
        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').
+# Linking with setargv.obj enables "wildcard expansion" of command-line arguments
+captype.exe    : $(LIBS_CHECK) config.h $(captype_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\captype.res
+       @echo Linking $@
+       $(LINK) @<<
+               /OUT:captype.exe $(conflags) $(conlibsdll) $(LDFLAGS) $(captype_OBJECTS) $(captype_LIBS) setargv.obj image\captype.res
+<<
+!IFDEF MANIFEST_INFO_REQUIRED
+       mt.exe -nologo -manifest "captype.exe.manifest" -outputresource:captype.exe;1
+!ENDIF
+
 editcap.exe    : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
        @echo Linking $@
        $(LINK) @<<
@@ -479,6 +520,9 @@ guilibsdll = $(guilibsdll)
 
 HHC_LIBS = $(HHC_LIBS)
 
+SH = $(SH)
+PYTHON = $(PYTHON)
+
 MSVC_VARIANT = $(MSVC_VARIANT)
 MSVCR_DLL = "$(MSVCR_DLL:\=/)"
 
@@ -515,13 +559,15 @@ text2pcap-scanner.obj : text2pcap-scanner.c
 # The following targets will rebuild their respective objs
 # if and when svnversion.h should change.
 #
-text2pcap.obj mergecap.obj capinfos.obj editcap.obj reordercap.obj version_info.obj: svnversion.h
+text2pcap.obj mergecap.obj capinfos.obj captype.obj editcap.obj reordercap.obj version_info.obj: svnversion.h
 
 
 clean-local:
-       rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
+       rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(tfshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
                $(EXECUTABLES) *.pdb *.sbr *.exe.manifest \
-               capinfos.obj capinfos.exp capinfos.lib editcap.obj editcap.exp editcap.lib \
+               capinfos.obj capinfos.exp capinfos.lib \
+               captype.obj captype.exp captype.lib \
+               editcap.obj editcap.exp editcap.lib \
                mergecap.obj text2pcap.obj \
                reordercap.obj nio-ie5.obj update.obj \
                text2pcap-scanner.obj text2pcap-scanner.c \
@@ -541,6 +587,8 @@ clean: clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../wsutil
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+       cd ../filetap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../ui
@@ -591,6 +639,8 @@ distclean-local: clean-local
 distclean: distclean-local
        cd wiretap
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+       cd ../filetap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../wsutil
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../codecs
@@ -636,6 +686,8 @@ maintainer-clean-local: distclean-local
 maintainer-clean: maintainer-clean-local
        cd wiretap
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+       cd ../filetap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../wsutil
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../codecs
@@ -746,6 +798,11 @@ wiretap::
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
 
+filetap::
+       cd filetap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
+       cd ..
+
 codecs::
        cd codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
@@ -786,7 +843,7 @@ cli:: help config.h svnversion.h doxygen
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libcliui.lib
        cd ../..
 
-epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib $(BUILT_SOURCES) doxygen
+epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib filetap\filetap-$(FTAP_VERSION).lib $(BUILT_SOURCES) doxygen
        cd epan
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
@@ -911,7 +968,7 @@ install_qt:
 process_libs:
        @if not exist "$(WIRESHARK_LIB_DIR)" md "$(WIRESHARK_LIB_DIR)"
        @$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIB_DIR)" \
-               . WinPcap_$(PCAP_VERSION).exe
+               . WinPcap_$(WINPCAP_VERSION).exe
 !IFNDEF QT5_BASE_DIR
 !MESSAGE Can't find Qt. This will become a problem at some point.
 !ENDIF
@@ -1067,6 +1124,9 @@ debug-wireshark: wireshark.exe install-generated-files
 # prepare debugging of tshark in INSTALL_DIR
 debug-tshark: tshark.exe install-generated-files
 
+# prepare debugging of tfshark in INSTALL_DIR
+debug-tfshark: tfshark.exe install-generated-files
+
 # prepare debugging of rawshark in INSTALL_DIR
 debug-rawshark: rawshark.exe install-generated-files
 
@@ -1089,6 +1149,9 @@ install-generated-files: doc
        xcopy ".\wiretap\wiretap-$(WTAP_VERSION).dll" $(INSTALL_DIR) /d
        if exist ".\wiretap\wiretap-$(WTAP_VERSION).lib" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).lib" $(INSTALL_DIR) /d
        if exist ".\wiretap\wiretap-$(WTAP_VERSION).pdb" xcopy ".\wiretap\wiretap-$(WTAP_VERSION).pdb" $(INSTALL_DIR) /d
+       xcopy ".\filetap\filetap-$(FTAP_VERSION).dll" $(INSTALL_DIR) /d
+       if exist ".\filetap\filetap-$(FTAP_VERSION).lib" xcopy ".\filetap\filetap-$(FTAP_VERSION).lib" $(INSTALL_DIR) /d
+       if exist ".\filetap\filetap-$(FTAP_VERSION).pdb" xcopy ".\filetap\filetap-$(FTAP_VERSION).pdb" $(INSTALL_DIR) /d
        xcopy ".\wsutil\libwsutil.dll" $(INSTALL_DIR) /d
        if exist ".\wsutil\libwsutil.lib" xcopy ".\wsutil\libwsutil.lib" $(INSTALL_DIR) /d
        if exist ".\wsutil\libwsutil.pdb" xcopy ".\wsutil\libwsutil.pdb" $(INSTALL_DIR) /d
@@ -1098,6 +1161,8 @@ install-generated-files: doc
        if exist ".\docbook\user-guide.chm" xcopy ".\docbook\user-guide.chm" $(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 captype.exe xcopy captype.exe $(INSTALL_DIR) /d
+       if exist captype.pdb xcopy captype.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 editcap.exe xcopy editcap.exe $(INSTALL_DIR) /d
@@ -1110,6 +1175,8 @@ install-generated-files: doc
        if exist rawshark.pdb xcopy rawshark.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 tfshark.exe xcopy tfshark.exe $(INSTALL_DIR) /d
+       if exist tfshark.pdb xcopy tfshark.pdb $(INSTALL_DIR) /d
        if exist tshark.exe xcopy tshark.exe $(INSTALL_DIR) /d
        if exist tshark.pdb xcopy tshark.pdb $(INSTALL_DIR) /d
        xcopy "doc\AUTHORS-SHORT" $(INSTALL_DIR) /d
@@ -1170,7 +1237,7 @@ install-generated-files: doc
 install-all: install-generated-files
        set copycmd=/y
        if not exist $(INSTALL_DIR) mkdir $(INSTALL_DIR)
-!IF "$(GTK_INST_VERSION)" == "3.4"
+!IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
        xcopy $(GTK_DIR)\bin\libgdk-3-0.dll $(INSTALL_DIR) /d
        xcopy $(GTK_DIR)\bin\libgtk-3-0.dll $(INSTALL_DIR) /d
 !ELSE
@@ -1187,7 +1254,7 @@ install-all: install-generated-files
        xcopy $(GTK_DIR)\$(GTK_ETC_DIR)\*.* $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
 #      if not exist $(INSTALL_DIR)\etc\pango mkdir $(INSTALL_DIR)\etc\pango
 #      xcopy $(GTK_DIR)\etc\pango\pango.* $(INSTALL_DIR)\etc\pango /d
-!IF "$(GTK_INST_VERSION)" == "3.4"
+!IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
        if not exist $(INSTALL_DIR)\lib\gtk-3.0 mkdir $(INSTALL_DIR)\lib\gtk-3.0
        if not exist $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR) mkdir $(INSTALL_DIR)\lib\gtk-3.0\$(GTK_LIB_DIR)
        xcopy ".\ui\win32\settings.ini" $(INSTALL_DIR)\$(GTK_ETC_DIR) /d
@@ -1309,7 +1376,7 @@ install-all: install-generated-files
 !ENDIF
        cd $(INSTALL_DIR)
        peflags --dynamicbase=true --nxcompat=true *.dll
-!IF "$(GTK_INST_VERSION)" == "3.4"
+!IF "$(GTK_INST_VERSION)" == "3.4" || "$(GTK_INST_VERSION)" == "3.6"
 !ELSE
        peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/*/engines/*.dll
        peflags --dynamicbase=true --nxcompat=true lib/gtk-2.0/modules/*.dll
@@ -1325,6 +1392,8 @@ checkapi_local:
 checkapi: checkapi_local
        cd wiretap
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
+       cd ../filetap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
        cd ../ui