diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-09-11 22:47:57 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-09-11 22:47:57 +0000 |
commit | 9fee393b87a89bef651213ebc951f6562ffbb753 (patch) | |
tree | 6f40aef1a8149d4ba3271041cb6e1b43e4dc7131 | |
parent | 1d1f90432111abf1d16e760ea860060d9b8e3d37 (diff) |
tweak the nmake build so the NET-SNMP library is in fact optional (as it is in the UNIX builds)
svn path=/trunk/; revision=19196
-rw-r--r-- | Makefile.nmake | 26 | ||||
-rw-r--r-- | config.h.win32 | 4 | ||||
-rw-r--r-- | config.nmake | 11 | ||||
-rw-r--r-- | epan/Makefile.nmake | 2 |
4 files changed, 28 insertions, 15 deletions
diff --git a/Makefile.nmake b/Makefile.nmake index 7d18ea80ca..5a17c81774 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -47,7 +47,7 @@ EXTRA_OBJECTS = \ wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ wsock32.lib user32.lib shell32.lib comctl32.lib \ - $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \ + $(NET_SNMP_LIBS) \ !IFDEF HHC_DIR $(HHC_DIR)\lib\htmlhelp.lib \ !ENDIF @@ -67,7 +67,7 @@ wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ tshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ wsock32.lib user32.lib \ $(GLIB_LIBS) \ - $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \ + $(NET_SNMP_LIBS) \ !IFDEF ENABLE_LIBWIRESHARK epan\libwireshark.lib \ !ELSE @@ -99,7 +99,7 @@ dumpcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ wsock32.lib user32.lib \ $(GLIB_LIBS) \ - $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \ + $(NET_SNMP_LIBS) \ !IFDEF ENABLE_LIBWIRESHARK epan\libwireshark.lib \ !ELSE @@ -115,7 +115,7 @@ dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ user32.lib \ $(GLIB_LIBS) \ - $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib + $(NET_SNMP_LIBS) EXECUTABLES=wireshark.exe wireshark-gtk2.exe tshark.exe \ capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe dumpcap.exe @@ -152,27 +152,27 @@ wiretap\wiretap-$(WTAP_VERSION).lib: wiretap !IFNDEF GTK1_DIR wireshark.exe : !ELSE -wireshark.exe : config.h svnversion.h $(wireshark_OBJECTS) $(command_line_OBJECTS) epan gtk image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins +wireshark.exe : config.h svnversion.h $(wireshark_OBJECTS) getopt.obj $(command_line_OBJECTS) epan gtk image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins @echo Linking $@ $(LINK) @<< - /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(wireshark_LIBS) $(GTK1_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res + /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj $(GTK1_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res << !ENDIF !IFNDEF GTK2_DIR wireshark-gtk2.exe : !ELSE -wireshark-gtk2.exe : config.h svnversion.h $(wireshark_OBJECTS) $(command_line_OBJECTS) codecs epan gtk2 image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk2.tmp\libui.lib plugins +wireshark-gtk2.exe : config.h svnversion.h $(wireshark_OBJECTS) getopt.obj $(command_line_OBJECTS) codecs epan gtk2 image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk2.tmp\libui.lib plugins @echo Linking $@ $(LINK) @<< - /OUT:wireshark-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(wireshark_LIBS) $(GTK2_LIBS) codecs\codecs.lib gtk2.tmp\libui.lib $(wireshark_OBJECTS) image\wireshark.res + /OUT:wireshark-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj $(GTK2_LIBS) codecs\codecs.lib gtk2.tmp\libui.lib $(wireshark_OBJECTS) image\wireshark.res << !ENDIF -tshark.exe : config.h svnversion.h $(tshark_OBJECTS) $(command_line_OBJECTS) epan image\tshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins +tshark.exe : config.h svnversion.h $(tshark_OBJECTS) getopt.obj $(command_line_OBJECTS) epan image\tshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins @echo Linking $@ $(LINK) @<< - /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) $(command_line_OBJECTS) image\tshark.res + /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj $(command_line_OBJECTS) image\tshark.res << capinfos.exe : config.h capinfos.obj getopt.obj $(command_line_OBJECTS) wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res @@ -205,10 +205,10 @@ dftest.exe : $(dftest_OBJECTS) epan /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) << -randpkt.exe : $(randpkt_OBJECTS) $(command_line_OBJECTS) +randpkt.exe : $(randpkt_OBJECTS) getopt.obj $(command_line_OBJECTS) @echo Linking $@ $(LINK) @<< - /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) $(command_line_OBJECTS) + /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) getopt.obj $(command_line_OBJECTS) << dumpcap.exe : config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj mkstemp.obj $(command_line_OBJECTS) wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res @@ -239,6 +239,8 @@ config.h : config.h.win32 config.nmake -e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \ -e "s/@HAVE_PORTAUDIO@/$(PORTAUDIO_CONFIG)/" \ -e "s/@HAVE_PORTAUDIO_API@/$(PORTAUDIO_API_CONFIG)/" \ + -e "s/@HAVE_NET_SNMP@/$(HAVE_NET_SNMP)/" \ + -e "s/@HAVE_SOME_SNMP@/$(HAVE_SOME_SNMP)/" \ < config.h.win32 > $@ ps.c : rdps.exe print.ps diff --git a/config.h.win32 b/config.h.win32 index 9e52bc159a..3ded8d6e2b 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -75,8 +75,8 @@ # define WS_VAR_IMPORT extern #endif -#define HAVE_NET_SNMP 1 -#define HAVE_SOME_SNMP 1 +@HAVE_NET_SNMP@ +@HAVE_SOME_SNMP@ /* Define if you have the gethostbyname2 function. */ /* #undef HAVE_GETHOSTBYNAME2 */ diff --git a/config.nmake b/config.nmake index 39b28da4ad..19ab41b8b5 100644 --- a/config.nmake +++ b/config.nmake @@ -481,6 +481,17 @@ ZLIB_LIBS= ZLIB_CONFIG= !ENDIF +!IFDEF NET_SNMP_DIR +# Nmake uses carets to escape special characters +NET_SNMP_CONFIG=^#define HAVE_NET_SNMP 1 +NET_SNMP_LIBS=$(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib +SOME_SNMP_CONFIG=^#define HAVE_SOME_SNMP 1 +!else +NET_SNMP_CONFIG= +NET_SNMP_LIBS= +SOME_SNMP_CONFIG= +!ENDIF + !IFDEF ADNS_DIR ADNS_PATH=$(ADNS_DIR)\adns_win32\lib ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32 diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index 37005fa2d2..14b4829bd6 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -25,7 +25,7 @@ libwireshark_LIBS = \ $(NETTLE_LIBS) \ $(ZLIB_LIBS) \ $(GNUTLS_LIBS) \ - $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \ + $(NET_SNMP_LIBS) \ $(ICONV_DIR)\lib\iconv.lib \ ftypes\ftypes.lib \ dfilter\dfilter.lib \ |