Fix compilation of extcap programs with NMake
authorPascal Quantin <pascal.quantin@gmail.com>
Wed, 17 Feb 2016 22:18:55 +0000 (23:18 +0100)
committerGuy Harris <guy@alum.mit.edu>
Thu, 18 Feb 2016 00:01:00 +0000 (00:01 +0000)
Change-Id: I80e17aeeab5bf747c6ba06168245d38d6d78efa9
Reviewed-on: https://code.wireshark.org/review/13986
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Makefile.nmake
extcap/Makefile.nmake

index 9d296a7831c88a50c31b54addc04b6122d7d9834..da01d9c84cd4541b822c8d2bea9ca00cfc4ee43d 100644 (file)
@@ -218,7 +218,7 @@ RESOURCES=image\wireshark.res image\file_dlg_win32.res \
        image\rawshark.res image\reordercap.res image\libwsutil.res
 
 
-all: $(LIBS_CHECK) config.h ui\qt\config.pri tools image $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil codecs wiretap epan randpkt_core $(EXECUTABLES) wireshark.bsc $(RESOURCES) help install-all
+all: $(LIBS_CHECK) config.h ui\qt\config.pri tools image $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil codecs wiretap epan randpkt_core extcap $(EXECUTABLES) wireshark.bsc $(RESOURCES) help install-all
 
 !IFDEF MAKENSIS
 packaging: all
@@ -565,7 +565,6 @@ test-programs:
 clean-local:
        rm -f $(wireshark_gtk_OBJECTS) $(tshark_OBJECTS) $(tfshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
                $(EXECUTABLES) *.nativecodeanalysis.xml *.pdb *.sbr *.exe.manifest \
-               androiddump.obj sshdump.obj randpktdump.obj \
                capinfos.obj capinfos.exp capinfos.lib \
                captype.obj captype.exp captype.lib \
                editcap.obj editcap.exp editcap.lib \
@@ -594,6 +593,8 @@ clean: clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../randpkt_core
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+       cd ../extcap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../ui
@@ -652,6 +653,8 @@ distclean: distclean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../randpkt_core
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+       cd ../extcap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../ui
@@ -703,6 +706,8 @@ maintainer-clean: maintainer-clean-local
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../randpkt_core
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+       cd ../extcap
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../ui
@@ -826,6 +831,11 @@ randpkt_core:: help config.h version.h doxygen
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake librandpkt_core.lib
        cd ..
 
+extcap::
+       cd extcap
+       $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake all
+       cd ..
+
 codecs::
        cd codecs
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
index e85096164d40366cbe54a98c2222a95eff0d5be9..7845326ec6cb790c17a979bee13f05e230306de6 100644 (file)
@@ -17,7 +17,7 @@ LDFLAGS = /NOLOGO /INCREMENTAL:NO $(LOCAL_LDFLAGS)
 # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
 GENERATED_CFLAGS=\
        $(STANDARD_CFLAGS) \
-       /I.  /Iwiretap $(GLIB_CFLAGS) \
+       /I. /I.. /Iwiretap $(GLIB_CFLAGS) \
        $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
        $(C_ARES_CFLAGS) $(ADNS_CFLAGS) $(GNUTLS_CFLAGS) \
        $(SMI_CFLAGS) $(GEOIP_CFLAGS) $(LIBSSH_CFLAGS) $(WINSPARKLE_CFLAGS)
@@ -42,7 +42,7 @@ androiddump_LIBS = $(anddroiddump_WSLIBS) \
 randpktdump_OBJECTS = $(randpktdump_SOURCES:.c=.obj)
 
 randpktdump_WSLIBS = \
-       ..\randpkt_core\randpkt_core.lib \
+       ..\randpkt_core\librandpkt_core.lib \
        ..\wiretap\wiretap-$(WTAP_VERSION).lib \
        ..\wsutil\libwsutil.lib
 
@@ -67,7 +67,9 @@ EXECUTABLES=androiddump.exe randpktdump.exe
 EXECUTABLES += sshdump.exe
 !ENDIF
 
-androiddump.exe        : $(LIBS_CHECK) config.h androiddump.obj $(anddroiddump_WSLIBS)
+all: $(EXECUTABLES)
+
+androiddump.exe        : $(LIBS_CHECK) ..\config.h androiddump.obj $(anddroiddump_WSLIBS)
        @echo Linking $@
        $(LINK) @<<
                /OUT:androiddump.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:WINDOWS androiddump.obj $(androiddump_LIBS)
@@ -76,7 +78,7 @@ androiddump.exe       : $(LIBS_CHECK) config.h androiddump.obj $(anddroiddump_WSLIBS)
        mt.exe -nologo -manifest "androiddump.exe.manifest" -outputresource:androiddump.exe;1
 !ENDIF
 
-randpktdump.exe        : $(LIBS_CHECK) config.h randpktdump.obj $(randpktdump_WSLIBS)
+randpktdump.exe        : $(LIBS_CHECK) ..\config.h randpktdump.obj $(randpktdump_WSLIBS)
        @echo Linking $@
        $(LINK) @<<
                /OUT:randpktdump.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:WINDOWS randpktdump.obj $(randpktdump_LIBS)
@@ -86,7 +88,7 @@ randpktdump.exe       : $(LIBS_CHECK) config.h randpktdump.obj $(randpktdump_WSLIBS)
 !ENDIF
 
 !IFDEF LIBSSH_DIR
-sshdump.exe    : $(LIBS_CHECK) config.h sshdump.obj $(sshdump_WSLIBS)
+sshdump.exe    : $(LIBS_CHECK) ..\config.h sshdump.obj $(sshdump_WSLIBS)
        @echo Linking $@
        $(LINK) @<<
                /OUT:sshdump.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:WINDOWS sshdump.obj $(sshdump_LIBS)