aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <lloyd@randombit.net>2009-11-19 23:52:03 +0000
committerlloyd <lloyd@randombit.net>2009-11-19 23:52:03 +0000
commitdea953ccb4b722c9cc3f4bc25c729ffcc03efb9f (patch)
tree23321bc678c55ff67485bc051a01fda08436fc61 /src
parent3786032100c34e2196bbb8af1e89226b05fbc324 (diff)
Switch from only-static with VC++ to only a DLL. The static library is
huge (60+ Mb!); the DLL should be smaller due to link-time merging making it viable to distribute binaries.
Diffstat (limited to 'src')
-rw-r--r--src/build-data/cc/msvc.txt5
-rw-r--r--src/build-data/makefile/nmake.in20
-rw-r--r--src/build-data/os/windows.txt2
3 files changed, 13 insertions, 14 deletions
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index bbc6345bc..0df8c67d6 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -8,7 +8,8 @@ add_include_dir_option "/I"
add_lib_dir_option -L
add_lib_option ""
-lib_opt_flags "/O2 /DBOTAN_DLL=__declspec(dllexport)"
+lib_opt_flags "/O2"
+shared_flags "/DBOTAN_DLL=__declspec(dllexport)"
check_opt_flags "/O2"
debug_flags "/Zi"
no_debug_flags ""
@@ -22,5 +23,5 @@ ar_command "lib"
makefile_style nmake
<so_link_flags>
-default -> "link /DLL"
+default -> "$(CXX) /LD"
</so_link_flags>
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 34c864e93..0d60c7e73 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -7,6 +7,8 @@ CHECK_OPT = %{check_opt}
MACH_OPT = %{mach_opt}
LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
+SO_OBJ_FLAGS = %{shared_flags}
+SO_LINK_CMD = %{so_link}
LINK_TO = %{link_to}
##################################################
@@ -49,13 +51,13 @@ LIBOBJS = %{lib_objs}
CHECKOBJS = %{check_objs}
-LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
+LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS)
CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
-LIBRARIES = $(STATIC_LIB)
+LIBRARIES = $(DLL)
LIBNAME = libbotan
-STATIC_LIB = $(LIBNAME).%{static_suffix}
+DLL = $(LIBNAME).%{so_suffix}
all: $(LIBRARIES)
@@ -70,20 +72,16 @@ all: $(LIBRARIES)
# Link Commands #
##################################################
-# Link for Borland?
-#ilink32 -L$(BCB)\lib -w -c -x -Gn -ap -Tpe c0x32.obj \
-# $(CHECKOBJS),check.exe,,$(LINK_TO) $(STATIC_LIB)
-
$(CHECK): $(LIBRARIES) $(CHECKOBJS)
- link /OUT:$@.exe $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO)
+ link /OUT:$@.exe $(CHECKOBJS) $(DLL) $(LINK_TO)
-$(STATIC_LIB): $(LIBOBJS)
- $(AR) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS)
+$(DLL): $(LIBOBJS)
+ $(CXX) $(SO_LINK_CMD) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS)
##################################################
# Misc Targets #
##################################################
-static: $(STATIC_LIB)
+dll: $(DLL)
##################################################
# Fake Targets #
diff --git a/src/build-data/os/windows.txt b/src/build-data/os/windows.txt
index e2e8bb665..6951937e5 100644
--- a/src/build-data/os/windows.txt
+++ b/src/build-data/os/windows.txt
@@ -15,7 +15,7 @@ win32_virtual_lock
</target_features>
<supports_shared>
-msvc
+all
</supports_shared>
<aliases>