aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-20 16:11:55 +0000
committerlloyd <[email protected]>2009-11-20 16:11:55 +0000
commit8f966fab28227c7fb33136efc4ce7170f36c1523 (patch)
tree16e7767f9aee08e6868a91686324e95e677f1fad /src
parentf31a7b20519016474a996554f418bdfd16dd5460 (diff)
Various fixes for Visual C++ per bug 63 - --enable-debug sets debug options,
--disable-shared disables DLL options, and don't define _CONSOLE in the library build.
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/msvc.txt18
-rw-r--r--src/build-data/makefile/nmake.in15
2 files changed, 17 insertions, 16 deletions
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index 278aaadf4..892e80c4b 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -1,6 +1,6 @@
macro_name MSVC
-binary_name cl.exe
+binary_name cl
compile_option "/nologo /c "
output_to_option "/Fo"
@@ -8,17 +8,16 @@ add_include_dir_option "/I"
add_lib_dir_option -L
add_lib_option ""
-lib_opt_flags "/O2"
-shared_flags "/DBOTAN_DLL=__declspec(dllexport)"
-check_opt_flags "/O2"
-debug_flags "/Zi"
-no_debug_flags ""
-lang_flags "/EHsc /GR /D_CONSOLE"
+no_debug_flags "/O2"
+debug_flags "/Od /Zi /DDEBUG"
+check_opt_flags "/O2 /D_CONSOLE"
+lang_flags "/EHsc /GR"
warning_flags ""
+shared_flags "/DBOTAN_DLL=__declspec(dllexport)"
dll_import_flags "__declspec(dllimport)"
-ar_command "lib"
+ar_command lib
makefile_style nmake
@@ -27,5 +26,6 @@ default -> "$(CXX) /LD"
</so_link_flags>
<mach_abi_linking>
-all -> "/MD"
+all -> "/MD"
+all-debug -> "/MDd"
</mach_abi_linking>
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 2604a3459..7b7d2285b 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -6,7 +6,7 @@ MACH_OPT = %{mach_opt}
LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
SO_OBJ_FLAGS = %{shared_flags}
-SO_LINK_CMD = %{so_link}
+LIB_LINK_CMD = %{so_link}
LINK_TO = %{link_to}
### Version Numbers
@@ -45,11 +45,12 @@ CHECKOBJS = %{check_objs}
LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS)
CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
-LIBRARIES = $(DLL)
-
LIBNAME = botan
-DLL = $(LIBNAME).%{so_suffix}
-STATIC_LIB = $(LIBNAME).%{static_suffix}
+
+LIBRARIES = $(LIB)
+
+# This will either be a static lib or the DLL linking lib
+LIB = $(LIBNAME).%{static_suffix}
all: $(LIBRARIES)
@@ -62,8 +63,8 @@ all: $(LIBRARIES)
$(CHECK): $(LIBRARIES) $(CHECKOBJS)
$(CXX) /Fe$@ $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO)
-$(DLL): $(LIBOBJS)
- $(SO_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO)
+$(LIB): $(LIBOBJS)
+ $(LIB_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO)
### Fake Targets
clean: