Remove an extraneous backslash
[obnox/wireshark/wip.git] / Makefile.nmake
index 02639e7e7328a09b79ec84a0685766984373d1bb..f592d4307a181c1289b7d907a0450068d9e349d8 100644 (file)
@@ -36,7 +36,7 @@ CHECK_TAG=
 !ENDIF
 # -------------
 
-LDFLAGS = /NOLOGO /INCREMENTAL:no $(LOCAL_LDFLAGS)
+LDFLAGS = /NOLOGO /INCREMENTAL:NO $(LOCAL_LDFLAGS)
 
 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
 GENERATED_CFLAGS=\
@@ -189,7 +189,7 @@ RESOURCES=image\wireshark.res image\libwireshark.res image\tshark.res \
        image\rawshark.res image\libwsutil.res
 
 
-all: $(LIBS_CHECK) config.h tools image codecs $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil wiretap epan $(EXECUTABLES) $(RESOURCES) doc help install-all
+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) doc help install-all
 
 !IFDEF MAKENSIS
 packaging: all
@@ -235,12 +235,42 @@ packaging_zip: all
        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 ui\gtk\*.sbr win32\*.sbr wiretap\*.sbr
-       rm -f $@
+!IFDEF WIRESHARK_GENERATE_BSC_FILE
+# FIXME: Add epan\wspython\*.sbr when we support Python embedding
+# Note: Certain .sbr files which cause bscmake warning "too many references... ignoring ..."
+wireshark.bsc: \
+       *.sbr                           \
+       codecs\*.sbr                    \
+       epan\*.sbr                      \
+       epan\crypt\*.sbr                \
+       epan\dfilter\*.sbr              \
+       epan\dissectors\*.sbr           \
+       epan\ftypes\*.sbr               \
+       epan\wslua\*.sbr                \
+       ui\*.sbr                        \
+       ui\gtk\*.sbr                    \
+       plugins\asn1\*.sbr              \
+       plugins\docsis\*.sbr            \
+       plugins\ethercat\*.sbr          \
+       plugins\giop\*.sbr              \
+       plugins\gryphon\*.sbr           \
+       plugins\irda\*.sbr              \
+       plugins\m2m\*.sbr               \
+       plugins\mate\*.sbr              \
+       plugins\opcua\*.sbr             \
+       plugins\profinet\*.sbr          \
+       lugins\stats_tree\*.sbr         \
+       plugins\unistim\*.sbr           \
+       plugins\wimax\*.sbr             \
+       plugins\wimaxasncp\*.sbr        \
+       wiretap\*.sbr                   \
+       wsutil\*.sbr
        $(BSCMAKE) @<<
                /o $@ $?
 <<
-       xcopy $@ $(INSTALL_DIR)\ /d
+!ELSE
+wireshark.bsc:
+!ENDIF
 
 pdb_zip: all
        cd $(INSTALL_DIR)
@@ -252,28 +282,28 @@ $(RESOURCES): image
 
 wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
 
-wireshark.exe  : $(LIBS_CHECK) config.h $(wireshark_OBJECTS) codecs epan gtk win32 image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib ui\gtk\libui.lib win32\libui_win32.lib plugins
+wireshark.exe  : $(LIBS_CHECK) config.h $(wireshark_OBJECTS) codecs epan gtk ui win32 image\wireshark.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
        @echo Linking $@
        $(LINK) @<<
-               /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) $(GTK_LIBS) codecs\codecs.lib ui\gtk\libui.lib ui\win32\libui_win32.lib $(wireshark_OBJECTS) image\wireshark.res
+               /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) $(GTK_LIBS) codecs\codecs.lib ui\gtk\libgtkui.lib ui\win32\libgtkui_win32.lib ui\libui.lib $(wireshark_OBJECTS) image\wireshark.res
 <<
 !IFDEF MANIFEST_INFO_REQUIRED
        mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:wireshark.exe;1
 !ENDIF
 
-tshark.exe     : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
+tshark.exe     : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan cli ui 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) image\tshark.res
+               /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) ui\cli\libcliui.lib ui\libui.lib image\tshark.res
 <<
 !IFDEF MANIFEST_INFO_REQUIRED
        mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
 !ENDIF
 
-rawshark.exe   : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
+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) @<<
-               /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) image\rawshark.res
+               /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) ui\libui.lib image\rawshark.res
 <<
 !IFDEF MANIFEST_INFO_REQUIRED
        mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
@@ -321,10 +351,10 @@ text2pcap.exe     : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj wsuti
        mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
 !ENDIF
 
-dftest.exe     : $(dftest_OBJECTS) epan
+dftest.exe     : $(dftest_OBJECTS) epan ui
        @echo Linking $@
        $(LINK) @<<
-               /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS)
+               /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) ui\libui.lib $(dftest_OBJECTS)
 <<
 !IFDEF MANIFEST_INFO_REQUIRED
        mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
@@ -390,6 +420,32 @@ config.h   : config.h.win32 config.nmake
            -e "s/@WANT_PACKET_EDITOR@/$(WANT_PACKET_EDITOR)/" \
            < config.h.win32 > $@
 
+ui\qt\config.pri: config.nmake Makefile.nmake
+       @echo Creating <<ui\qt\config.pri
+# Automatically generated from Makefile.nmake. Edit there, not here.
+VERSION = $(VERSION)
+!IFDEF MANIFEST_INFO_REQUIRED
+CONFIG += wireshark_manifest_info_required
+!ENDIF
+WIRESHARK_LIB_DIR = $(WIRESHARK_LIB_DIR:\=/)
+GLIB_DIR = $(GTK_DIR:\=/)
+C_ARES_DIR = $(C_ARES_DIR:\=/)
+ZLIB_DIR = $(ZLIB_DIR:\=/)
+GNUTLS_DIR = $(GNUTLS_DIR:\=/)
+SMI_DIR = $(SMI_DIR:\=/)
+KFW_DIR = $(KFW_DIR:\=/)
+LUA_DIR = $(LUA_DIR:\=/)
+PORTAUDIO_DIR = $(PORTAUDIO_DIR:\=/)
+
+MSVC_VARIANT = $(MSVC_VARIANT)
+
+QMAKE_CFLAGS         *= $(STANDARD_CFLAGS) $(PORTAUDIO_CFLAGS:\=/)
+QMAKE_CXXFLAGS       *= $(STANDARD_CFLAGS) $(PORTAUDIO_CFLAGS:\=/)
+QMAKE_LFLAGS         *= /LARGEADDRESSAWARE $(LDFLAGS)
+
+DEFINES += _NEED_VAR_IMPORT_
+
+<<KEEP
 
 ps.c: tools\rdps.py print.ps
        $(PYTHON) tools\rdps.py print.ps ps.c
@@ -408,25 +464,6 @@ svnversion.h: $(SVNENTRIES)
        $(PERL) make-version.pl
 
 
-#
-# 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) tools\make-tapreg-dotc
-       @echo Making tshark-tap-register.c
-       @$(SH) tools/make-tapreg-dotc tshark-tap-register.c . $(TSHARK_TAP_SRC)
-
 text2pcap-scanner.c : text2pcap-scanner.l
        $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
 
@@ -442,7 +479,7 @@ text2pcap.obj mergecap.obj capinfos.obj editcap.obj version_info.obj: svnversion
 
 clean-local:
        rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
-               $(EXECUTABLES) *.pdb *.exe.manifest \
+               $(EXECUTABLES) *.pdb *.sbr *.exe.manifest \
                capinfos.obj editcap.obj mergecap.obj text2pcap.obj \
                nio-ie5.obj update.obj \
                text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
@@ -463,10 +500,14 @@ clean: clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
-       cd ../ui/gtk
+       cd ../ui
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+       cd gtk
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+       cd ../cli
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../../epan
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../plugins
@@ -509,10 +550,14 @@ distclean: distclean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
-       cd ../ui/gtk
+       cd ../ui
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+       cd gtk
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+       cd ../cli
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../../epan
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../plugins
@@ -548,10 +593,14 @@ maintainer-clean: maintainer-clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
-       cd ../ui/gtk
+       cd ../ui
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+       cd gtk
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+       cd ../cli
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../../epan
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../plugins
@@ -653,14 +702,24 @@ codecs::
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
 
+ui:: help config.h svnversion.h doxygen
+       cd ui
+       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
+       cd ..
+
 gtk:: help config.h svnversion.h doxygen
        cd ui/gtk
-       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui.lib
+       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui.lib
        cd ../..
 
 win32::
        cd ui/win32
-       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libui_win32.lib
+       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libgtkui_win32.lib
+       cd ../..
+
+cli:: help config.h svnversion.h doxygen
+       cd ui/cli
+       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake libcliui.lib
        cd ../..
 
 epan:: $(RESOURCES) $(ZLIB_DLL) wiretap\wiretap-$(WTAP_VERSION).lib $(BUILT_SOURCES) doxygen
@@ -944,6 +1003,7 @@ install-generated-files:
        if exist ".\wsutil\libwsutil.pdb" xcopy ".\wsutil\libwsutil.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 wireshark.bsc copy wireshark.bsc $(INSTALL_DIR)\wireshark.bsc
        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
@@ -1123,7 +1183,9 @@ checkapi: checkapi_local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
-       cd ../ui/gtk
+       cd ../ui
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
+       cd gtk
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi
        cd ../win32
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake checkapi