aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/asn1/info.txt1
-rw-r--r--src/benchmark/benchmark.h8
-rw-r--r--src/build-data/buildh.in2
-rw-r--r--src/build-data/cc/ekopath.txt3
-rw-r--r--src/build-data/cc/gcc.txt3
-rw-r--r--src/build-data/cc/hpcc.txt3
-rw-r--r--src/build-data/cc/icc.txt3
-rw-r--r--src/build-data/cc/msvc.txt8
-rw-r--r--src/build-data/cc/open64.txt3
-rw-r--r--src/build-data/cc/pgi.txt3
-rw-r--r--src/build-data/cc/sunwspro.txt3
-rw-r--r--src/build-data/cc/xlc.txt3
-rw-r--r--src/build-data/innosetup.in25
-rw-r--r--src/build-data/makefile/nmake.in67
-rw-r--r--src/build-data/os/windows.txt4
-rw-r--r--src/libstate/scan_name.h2
16 files changed, 61 insertions, 80 deletions
diff --git a/src/asn1/info.txt b/src/asn1/info.txt
index d836b4c0b..621b8b628 100644
--- a/src/asn1/info.txt
+++ b/src/asn1/info.txt
@@ -26,4 +26,5 @@ alloc
bigint
filters
oid_lookup
+timer
</requires>
diff --git a/src/benchmark/benchmark.h b/src/benchmark/benchmark.h
index a9c3fc01e..cc13ae58d 100644
--- a/src/benchmark/benchmark.h
+++ b/src/benchmark/benchmark.h
@@ -25,10 +25,10 @@ namespace Botan {
* @return results a map from provider to speed in mebibytes per second
*/
std::map<std::string, double>
-algorithm_benchmark(const std::string& name,
- u32bit milliseconds,
- RandomNumberGenerator& rng,
- Algorithm_Factory& af);
+BOTAN_DLL algorithm_benchmark(const std::string& name,
+ u32bit milliseconds,
+ RandomNumberGenerator& rng,
+ Algorithm_Factory& af);
}
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index e0d8368ed..37ff06f9d 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -9,7 +9,7 @@
#define BOTAN_VERSION_PATCH %{version_patch}
#ifndef BOTAN_DLL
- #define BOTAN_DLL %{dll_export_flags}
+ #define BOTAN_DLL %{dll_import_flags}
#endif
/* Chunk sizes */
diff --git a/src/build-data/cc/ekopath.txt b/src/build-data/cc/ekopath.txt
index bff1ff460..ac514261e 100644
--- a/src/build-data/cc/ekopath.txt
+++ b/src/build-data/cc/ekopath.txt
@@ -18,9 +18,6 @@ ar_command "pathCC -ar -o"
shared_flags "-fPIC"
debug_flags -g
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<so_link_flags>
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index be111fafc..c977b9df4 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -18,9 +18,6 @@ shared_flags "-fPIC"
debug_flags -g
no_debug_flags "-finline-functions"
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<so_link_flags>
diff --git a/src/build-data/cc/hpcc.txt b/src/build-data/cc/hpcc.txt
index 614830f9e..4b21a03de 100644
--- a/src/build-data/cc/hpcc.txt
+++ b/src/build-data/cc/hpcc.txt
@@ -16,9 +16,6 @@ lang_flags "-AA -ext +eh -z"
warning_flags "" # +w
shared_flags "+Z"
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<mach_abi_linking>
diff --git a/src/build-data/cc/icc.txt b/src/build-data/cc/icc.txt
index 8a546018e..c3a5130bb 100644
--- a/src/build-data/cc/icc.txt
+++ b/src/build-data/cc/icc.txt
@@ -16,9 +16,6 @@ lang_flags ""
warning_flags "-w1"
shared_flags "-fPIC"
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<mach_opt>
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index 805093ce5..278aaadf4 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -9,6 +9,7 @@ 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 ""
@@ -16,12 +17,15 @@ lang_flags "/EHsc /GR /D_CONSOLE"
warning_flags ""
dll_import_flags "__declspec(dllimport)"
-dll_export_flags "__declspec(dllexport)"
ar_command "lib"
makefile_style nmake
<so_link_flags>
-default -> "link /DLL"
+default -> "$(CXX) /LD"
</so_link_flags>
+
+<mach_abi_linking>
+all -> "/MD"
+</mach_abi_linking>
diff --git a/src/build-data/cc/open64.txt b/src/build-data/cc/open64.txt
index 275d25f72..34359ef63 100644
--- a/src/build-data/cc/open64.txt
+++ b/src/build-data/cc/open64.txt
@@ -16,9 +16,6 @@ shared_flags "-fPIC"
lang_flags "-ansi -LANG:ansi-for-init-scope=ON"
warning_flags "-Wall -W"
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<so_link_flags>
diff --git a/src/build-data/cc/pgi.txt b/src/build-data/cc/pgi.txt
index 99f7bcea5..0e4f8baf2 100644
--- a/src/build-data/cc/pgi.txt
+++ b/src/build-data/cc/pgi.txt
@@ -12,9 +12,6 @@ lib_opt_flags "-fast -Minline"
check_opt_flags "-fast"
shared_flags "-fPIC"
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<so_link_flags>
diff --git a/src/build-data/cc/sunwspro.txt b/src/build-data/cc/sunwspro.txt
index ee41ebeca..bd86ade33 100644
--- a/src/build-data/cc/sunwspro.txt
+++ b/src/build-data/cc/sunwspro.txt
@@ -18,9 +18,6 @@ shared_flags "-KPIC"
warning_flags "+w"
lang_flags "+p -D__EXTENSIONS__"
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<so_link_flags>
diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt
index e9ae41c1a..87b32746b 100644
--- a/src/build-data/cc/xlc.txt
+++ b/src/build-data/cc/xlc.txt
@@ -14,9 +14,6 @@ lang_flags ""
debug_flags -g
no_debug_flags ""
-dll_import_flags ""
-dll_export_flags ""
-
makefile_style unix
<mach_opt>
diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in
new file mode 100644
index 000000000..ffe780979
--- /dev/null
+++ b/src/build-data/innosetup.in
@@ -0,0 +1,25 @@
+; A script for packaging botan with InnoSetup
+
+[Setup]
+AppName=Botan
+AppVerName=Botan %{version}
+
+AppPublisher=Jack Lloyd
+AppCopyright=Copyright (C) 1999-2009 Jack Lloyd and others
+AppPublisherURL=http://botan.randombit.net/
+AppVersion=%{version}
+
+DefaultDirName={pf}\botan
+DefaultGroupName=botan
+
+SolidCompression=yes
+
+OutputDir=.
+OutputBaseFilename=botan-%{version}
+
+[Files]
+Source: "..\botan.dll"; DestDir: "{app}"
+Source: "..\botan.dll.manifest"; DestDir: "{app}"
+Source: "..\botan.exp"; DestDir: "{app}"
+Source: "..\botan.lib"; DestDir: "{app}"
+Source: "include\botan\*"; DestDir: "{app}\include\botan"
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 34c864e93..2604a3459 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -1,31 +1,25 @@
-##################################################
-# Compiler Options #
-##################################################
+### Compiler Options
CXX = %{cc}
LIB_OPT = %{lib_opt}
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}
-##################################################
-# Version Numbers #
-##################################################
+### Version Numbers
VERSION = %{version}
-##################################################
-# Installation Settings #
-##################################################
+### Installation Settings
DESTDIR = %{prefix}
LIBDIR = $(DESTDIR)\%{libdir}
HEADERDIR = $(DESTDIR)\%{includedir}\botan
DOCDIR = $(DESTDIR)\%{docdir}\Botan-$(VERSION)
-##################################################
-# Aliases for Common Programs #
-##################################################
+### Aliases for Common Programs
AR = %{ar_command}
CD = @cd
ECHO = @echo
@@ -34,11 +28,10 @@ INSTALL_CMD = %{install_cmd_exec}
MKDIR = @md
MKDIR_INSTALL = @md
RM = @del /Q
+RM_R = $(RM) /S
RMDIR = @rmdir
-##################################################
-# File Lists #
-##################################################
+### File Lists
CHECK = check
DOCS = %{doc_files}
@@ -49,59 +42,41 @@ 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
+LIBNAME = botan
+DLL = $(LIBNAME).%{so_suffix}
STATIC_LIB = $(LIBNAME).%{static_suffix}
all: $(LIBRARIES)
-##################################################
-# Build Commands #
-##################################################
+### Build Commands
%{lib_build_cmds}
%{check_build_cmds}
-##################################################
-# Link Commands #
-##################################################
-
-# Link for Borland?
-#ilink32 -L$(BCB)\lib -w -c -x -Gn -ap -Tpe c0x32.obj \
-# $(CHECKOBJS),check.exe,,$(LINK_TO) $(STATIC_LIB)
-
+### Link Commands
$(CHECK): $(LIBRARIES) $(CHECKOBJS)
- link /OUT:[email protected] $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO)
-
-$(STATIC_LIB): $(LIBOBJS)
- $(AR) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS)
+ $(CXX) /Fe$@ $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO)
-##################################################
-# Misc Targets #
-##################################################
-static: $(STATIC_LIB)
+$(DLL): $(LIBOBJS)
+ $(SO_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO)
-##################################################
-# Fake Targets #
-##################################################
+### Fake Targets
clean:
$(RM) %{build_dir}\lib\* %{build_dir}\checks\*
$(RM) $(LIBRARIES) $(CHECK)
distclean: clean
- $(RM) %{build_dir}\build.h
- $(RM) %{build_dir}\include\botan\*
+ $(RM_R) %{build_dir}
$(RMDIR) %{build_dir}\include\botan %{build_dir}\include
$(RMDIR) %{build_dir}\lib %{build_dir}\checks
$(RMDIR) %{build_dir}
- $(RM) Makefile
+ $(RM) Makefile $(LIBNAME).* $(CHECK).*
-##################################################
-# Install Commands #
-##################################################
+### Install Commands
install: $(LIBRARIES)
$(ECHO) "Install command not implemented"
diff --git a/src/build-data/os/windows.txt b/src/build-data/os/windows.txt
index e2e8bb665..e72931c98 100644
--- a/src/build-data/os/windows.txt
+++ b/src/build-data/os/windows.txt
@@ -4,7 +4,7 @@ obj_suffix obj
so_suffix dll
static_suffix lib
-install_root c:\Botan
+install_root c:\\Botan
doc_dir docs
install_cmd_data "copy"
@@ -15,7 +15,7 @@ win32_virtual_lock
</target_features>
<supports_shared>
-msvc
+all
</supports_shared>
<aliases>
diff --git a/src/libstate/scan_name.h b/src/libstate/scan_name.h
index ced5f3e15..7992d7498 100644
--- a/src/libstate/scan_name.h
+++ b/src/libstate/scan_name.h
@@ -19,7 +19,7 @@ namespace Botan {
A class encapsulating a SCAN name (similar to JCE conventions)
http://www.users.zetnet.co.uk/hopwood/crypto/scan/
*/
-class SCAN_Name
+class BOTAN_DLL SCAN_Name
{
public:
/**