diff --git a/Makefile.nmake b/Makefile.nmake index 00f60cc27d..a5066312db 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -143,7 +143,7 @@ RESOURCES=image\wireshark.res image\libwireshark.res image\tshark.res \ LIBS_CHECK=_libs_check_ -all: $(LIBS_CHECK) config.h tools image codecs $(ZLIB_DLL) wiretap epan $(EXECUTABLES) $(RESOURCES) doc install-all +all: $(LIBS_CHECK) config.h tools image codecs $(ADNS_DLL) $(ZLIB_DLL) wiretap epan $(EXECUTABLES) $(RESOURCES) doc install-all packaging: all cd packaging @@ -402,8 +402,11 @@ clean: clean-local # "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 + rm -f $(ADNS_DLL) $(ADNS_DIR)\adns_win32\lib\adns_dll.lib +!ENDIF !IFDEF ZLIB_DIR - rm -f $(ZLIB_DIR)\zlib1.dll $(ZLIB_DIR)\zlib1.dll.manifest \ + 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 @@ -479,30 +482,31 @@ image:: $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake cd .. - -#!IFDEF ADNS_DIR +!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 -#$(ADNS_DLL): -# xcopy $(ADNS_DIR) adns.tmp /D /I /E /Y -# cd adns.tmp\adns_win32\adns_dll -# $(MAKE) /$(MAKEFLAGS) -f adns_dll.mak LOC="-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" -# if not exist $(ADNS_DIR) mkdir $(ADNS_DIR) -# if not exist $(ADNS_DIR)\lib mkdir $(ADNS_DIR)\lib -# if not exist $(ADNS_DIR)\include mkdir $(ADNS_DIR)\include -#!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" -# mt.exe -nologo -manifest "adns.dll.manifest" -outputresource:adns.dll;2 -#!ENDIF -# copy adns.dll $(ADNS_DIR) -# copy adns.lib $(ADNS_DIR)\lib -# copy conf.h $(ADNS_DIR)\include -# copy adns.h $(ADNS_DIR)\include -# cd ..\..\.. -# rm -r -f adns.tmp -#!ENDIF - +# +# Unfortunately, we need to "patch" adns_dll.rep and adns_dll.rc +# (at least for MSVC2005EE) +$(ADNS_DLL): + 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" +!IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20" + cd ..\lib + pwd + mt.exe -nologo -manifest "adns_dll.dll.manifest" -outputresource:adns_dll.dll;2 +!ENDIF + copy adns_dll.dll $(ADNS_DLL) + copy adns_dll.lib $(ADNS_LIBS) + cd ..\..\.. + rm -r -f adns.tmp +!ENDIF !IFDEF ZLIB_DIR # Non-MSVC6 variants have to avoid indirectly using msvcrt.dll, @@ -969,10 +973,10 @@ install-all: install-generated-files !ENDIF xcopy $(GETTEXT_DIR)\bin\intl.dll $(INSTALL_DIR) /d !IFDEF ZLIB_DIR - xcopy $(ZLIB_DIR)\zlib1.dll $(INSTALL_DIR) /d + xcopy $(ZLIB_DLL) $(INSTALL_DIR) /d !ENDIF !IFDEF ADNS_DIR - xcopy $(ADNS_DIR)\adns_win32\LIB\adns_dll.dll $(INSTALL_DIR) /d + xcopy $(ADNS_DLL) $(INSTALL_DIR) /d !ENDIF !IFDEF PCRE_DIR xcopy $(PCRE_DIR)\bin\pcre3.dll $(INSTALL_DIR) /d diff --git a/adns_dll.dep b/adns_dll.dep new file mode 100644 index 0000000000..5bb32a6f89 --- /dev/null +++ b/adns_dll.dep @@ -0,0 +1,85 @@ +# Microsoft Developer Studio Generated Dependency File, included by adns_dll.mak + +.\adns_dll.cpp : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + + +..\adns_unix_calls.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + + +..\..\src\check.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + + +..\..\src\event.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + "..\..\src\tvarith.h"\ + + +..\..\src\general.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + + +..\..\src\parse.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + + +..\..\src\query.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + + +..\..\src\reply.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + + +..\..\src\setup.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + + +..\..\src\transmit.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + "..\..\src\tvarith.h"\ + + +..\..\src\types.c : \ + "..\..\src\adns.h"\ + "..\..\src\adns_win32.h"\ + "..\..\src\config.h"\ + "..\..\src\dlist.h"\ + "..\..\src\internal.h"\ + diff --git a/adns_dll.rc b/adns_dll.rc new file mode 100644 index 0000000000..cafa059f75 --- /dev/null +++ b/adns_dll.rc @@ -0,0 +1,110 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +// WIRESHARK: this makes problem on some machines +//#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Norwegian (Bokmal) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NOR) +//#ifdef _WIN32 +//LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL +//#pragma code_page(1252) +//#endif //_WIN32 + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,5 + PRODUCTVERSION 1,0,0,5 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "Comments", "Lisenced under GPL - see www.gnu.org\0" + VALUE "CompanyName", "Jgaa's Internet www.jgaa.com\0" + VALUE "FileDescription", "adns resolver library\0" + VALUE "FileVersion", "1, 0, 0, 5\0" + VALUE "InternalName", "adns-win32\0" + VALUE "LegalCopyright", "Copyright © 2000, 2001, 2002 , 2003 Ian Jackson, Jarle Aase\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "adns_dll.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "GNU adns\0" + VALUE "ProductVersion", "1, 0, 0, 5\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // !_MAC + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Norwegian (Bokmal) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/config.nmake b/config.nmake index 6be2fd3783..831681f857 100644 --- a/config.nmake +++ b/config.nmake @@ -702,6 +702,7 @@ ZLIB_CONFIG= ADNS_PATH=$(ADNS_DIR)\adns_win32\lib ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32 ADNS_LIBS=$(ADNS_DIR)\adns_win32\lib\adns_dll.lib +ADNS_DLL=$(ADNS_DIR)\adns_win32\lib\adns_dll.dll # Nmake uses carets to escape special characters ADNS_CONFIG=^#define HAVE_GNU_ADNS 1 !else