summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--Makefile.msvc35
-rw-r--r--README.msvc24
-rw-r--r--RELEASE-NOTES1
4 files changed, 61 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index fb69eef..7c52ad4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,7 @@ Fixed:
o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_ntop affected by potential out of bounds write
+ o added install target to Makefile.msvc
Version 1.7.4 (December 9, 2010)
diff --git a/Makefile.msvc b/Makefile.msvc
index 7a2fce0..f72b1be 100644
--- a/Makefile.msvc
+++ b/Makefile.msvc
@@ -139,6 +139,22 @@ BASE_DIR = .\$(CC_VERS_STR)
SRCDIR = .
+# -----------------------------
+# Default installation subdirs
+# -----------------------------
+
+!IFNDEF INSTALL_DIR
+INSTALL_DIR = .
+!ENDIF
+
+!IFNDEF INSTALL_DIR_LIB
+INSTALL_DIR_LIB = $(INSTALL_DIR)\lib
+!ENDIF
+
+!IFNDEF INSTALL_DIR_INC
+INSTALL_DIR_INC = $(INSTALL_DIR)\include
+!ENDIF
+
# -------------------------
# Configuration validation
# -------------------------
@@ -397,6 +413,12 @@ ALL:
clean:
@-RMDIR /S /Q $(BASE_DIR) >NUL 2>&1
+install:
+ @$(MAKE) /nologo /f .\Makefile.msvc CFG=lib-release install
+ @$(MAKE) /nologo /f .\Makefile.msvc CFG=lib-debug install
+ @$(MAKE) /nologo /f .\Makefile.msvc CFG=dll-release install
+ @$(MAKE) /nologo /f .\Makefile.msvc CFG=dll-debug install
+
!ENDIF
# ---------------------------------------------------------------------
@@ -456,6 +478,19 @@ clean:
@-RMDIR /S /Q $(PROG2_OUTDIR) >NUL 2>&1
@-RMDIR /S /Q $(PROG3_OUTDIR) >NUL 2>&1
+install:
+ @if not exist $(CARES_OUTDIR)\$(CARES_TARGET) \
+ $(MAKE) /f .\Makefile.msvc CFG=$(CFG) c-ares
+ @if not exist "$(INSTALL_DIR)" mkdir "$(INSTALL_DIR)"
+ @if not exist "$(INSTALL_DIR_LIB)" mkdir "$(INSTALL_DIR_LIB)"
+ @if not exist "$(INSTALL_DIR_INC)" mkdir "$(INSTALL_DIR_INC)"
+ @copy /y $(CARES_OUTDIR)\*.* "$(INSTALL_DIR_LIB)" >NUL
+ @copy /y $(SRCDIR)\ares.h "$(INSTALL_DIR_INC)" >NUL
+ @copy /y $(SRCDIR)\ares_build.h "$(INSTALL_DIR_INC)" >NUL
+ @copy /y $(SRCDIR)\ares_rules.h "$(INSTALL_DIR_INC)" >NUL
+ @copy /y $(SRCDIR)\ares_version.h "$(INSTALL_DIR_INC)" >NUL
+ @echo Installed c-ares $(CFG)
+
!ENDIF
$(BASE_DIR):
diff --git a/README.msvc b/README.msvc
index 9c1163a..4ff8700 100644
--- a/README.msvc
+++ b/README.msvc
@@ -40,6 +40,30 @@
library version it is using.
+ How to install using MSVC from the command line
+ -----------------------------------------------
+
+ In order to allow easy usage of c-ares libraries it may be convenient to
+ install c-ares libraries and header files to a common subdirectory tree.
+
+ Once that c-ares libraries have been built using procedure described above,
+ use same command prompt window to define environment variable INSTALL_DIR
+ to designate the top subdirectory where installation of c-ares libraries and
+ header files will be done.
+
+ > set INSTALL_DIR=c:\c-ares
+
+ Afterwards, run following command to actually perform the installation:
+
+ > nmake -f Makefile.msvc install
+
+ Installation procedure will copy c-ares libraries to subdirectory 'lib' and
+ c-ares header files to subdirectory 'include' below the INSTALL_DIR subdir.
+
+ When environment variable INSTALL_DIR is not defined, installation is done
+ to c-ares source folder where Makefile.msvc file is located.
+
+
How to build using Visual Studio 6 IDE
--------------------------------------
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index c325d83..db2c2fc 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -10,6 +10,7 @@ Fixed:
o avoid using system's inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_net_pton affected by the WLB-2008080064 advisory
o replacement ares_inet_ntop affected by potential out of bounds write
+ o added install target to Makefile.msvc
Thanks go to these friendly people for their efforts and contributions: