diff options
Diffstat (limited to 'src')
49 files changed, 1465 insertions, 0 deletions
diff --git a/src/build-data/arch/alpha b/src/build-data/arch/alpha new file mode 100644 index 000000000..60b264396 --- /dev/null +++ b/src/build-data/arch/alpha @@ -0,0 +1,31 @@ +realname "DEC Alpha" + +default_submodel alpha-ev4 +endian little + +<aliases> +axp +alphaaxp +</aliases> + +<submodels> +alpha-ev4 +alpha-ev5 +alpha-ev56 +alpha-pca56 +alpha-ev6 +alpha-ev67 +alpha-ev68 +alpha-ev7 +</submodels> + +<submodel_aliases> +alphaev4 -> alpha-ev4 +alphaev5 -> alpha-ev5 +alphaev56 -> alpha-ev56 +alphapca56 -> alpha-pca56 +alphaev6 -> alpha-ev6 +alphaev67 -> alpha-ev67 +alphaev68 -> alpha-ev68 +alphaev7 -> alpha-ev7 +</submodel_aliases> diff --git a/src/build-data/arch/amd64 b/src/build-data/arch/amd64 new file mode 100644 index 000000000..750a12827 --- /dev/null +++ b/src/build-data/arch/amd64 @@ -0,0 +1,26 @@ +realname "x86-64" + +default_submodel amd64 + +endian little +unaligned ok + +<aliases> +x86-64 +x86_64 # for RPM +</aliases> + +<submodels> +opteron +em64t +core2 +</submodels> + +<submodel_aliases> +core -> core2 +core2duo -> core2 +intelcore2 -> core2 +intelcore2duo -> core2 +athlon64 -> opteron +k8 -> opteron +</submodel_aliases> diff --git a/src/build-data/arch/arm b/src/build-data/arch/arm new file mode 100644 index 000000000..73cd02f05 --- /dev/null +++ b/src/build-data/arch/arm @@ -0,0 +1,22 @@ +realname "ARM" + +default_submodel arm2 + +<submodels> +arm2 +arm3 +arm6 +arm7 +arm8 +arm9 +strongarm +strongarm110 +strongarm1100 +xscale +</submodels> + +<submodel_aliases> +sa110 -> strongarm110 +sa1100 -> strongarm1100 +strongarm1110 -> strongarm1100 +</submodel_aliases> diff --git a/src/build-data/arch/hppa b/src/build-data/arch/hppa new file mode 100644 index 000000000..4cdd40889 --- /dev/null +++ b/src/build-data/arch/hppa @@ -0,0 +1,17 @@ +realname "HP-PA" + +default_submodel hppa1.0 + +<aliases> +hp-pa +parisc +pa-risc +hp-parisc +hp-pa-risc +</aliases> + +<submodels> +hppa1.0 +hppa1.1 +hppa2.0 +</submodels> diff --git a/src/build-data/arch/ia32 b/src/build-data/arch/ia32 new file mode 100644 index 000000000..5976c5c78 --- /dev/null +++ b/src/build-data/arch/ia32 @@ -0,0 +1,40 @@ +realname "IA-32" + +default_submodel i386 + +endian little +unaligned ok + +<aliases> +x86 +ix86 +80x86 +i86pc # for Solaris +</aliases> + +<submodels> +i386 +i486 +i586 +i686 +pentium4 +pentium-m +k6 +athlon +</submodels> + +<submodel_aliases> +pentium -> i586 +pentiumpro -> i686 +pentium_pro -> i686 +pentium2 -> i686 +pentium3 -> i686 + +duron -> athlon +athlon-xp -> athlon +k7 -> athlon + +p2 -> i686 +p3 -> i686 +p4 -> pentium4 +</submodel_aliases> diff --git a/src/build-data/arch/ia64 b/src/build-data/arch/ia64 new file mode 100644 index 000000000..73b42a8c8 --- /dev/null +++ b/src/build-data/arch/ia64 @@ -0,0 +1,14 @@ +realname "IA-64" + +default_submodel itanium1 + +<aliases> +merced +itanium +</aliases> + +<submodels> +itanium1 +itanium2 +mckinley +</submodels> diff --git a/src/build-data/arch/m68k b/src/build-data/arch/m68k new file mode 100644 index 000000000..27f246abc --- /dev/null +++ b/src/build-data/arch/m68k @@ -0,0 +1,15 @@ +realname "Motorola 680x0" + +default_submodel 68020 + +<aliases> +680x0 +68k +</aliases> + +<submodels> +68020 +68030 +68040 +68060 +</submodels> diff --git a/src/build-data/arch/mips32 b/src/build-data/arch/mips32 new file mode 100644 index 000000000..a07a0a145 --- /dev/null +++ b/src/build-data/arch/mips32 @@ -0,0 +1,23 @@ +realname "MIPS" + +default_submodel r3000 + +<aliases> +mips +</aliases> + +<submodels> +mip32-r3000 +mip32-r6000 +</submodels> + +<submodel_aliases> +r3k -> mips32-r3000 +r6k -> mips32-r6000 + +r3000 -> mips32-r3000 +r6000 -> mips32-r6000 + +mipsbe -> mips3000 # For RPM +mipsle -> mips3000 # For RPM +</submodel_aliases> diff --git a/src/build-data/arch/mips64 b/src/build-data/arch/mips64 new file mode 100644 index 000000000..228083848 --- /dev/null +++ b/src/build-data/arch/mips64 @@ -0,0 +1,32 @@ +realname "MIPS64" + +default_submodel r4400 + +<submodels> +mips64-r4000 +mips64-r4100 +mips64-r4300 +mips64-r4400 +mips64-r4600 +mips64-r4560 +mips64-r5000 +mips64-r8000 +mips64-r10000 +</submodels> + +<submodel_aliases> +r4k -> mips64-r4000 +r5k -> mips64-r5000 +r8k -> mips64-r8000 +r10k -> mips64-r10000 + +r4000 -> mips64-r4000 +r4100 -> mips64-r4100 +r4300 -> mips64-r4300 +r4400 -> mips64-r4400 +r4600 -> mips64-r4600 +r4560 -> mips64-r4560 +r5000 -> mips64-r5000 +r8000 -> mips64-r8000 +r10000 -> mips64-r10000 +</submodel_aliases> diff --git a/src/build-data/arch/ppc b/src/build-data/arch/ppc new file mode 100644 index 000000000..16112f389 --- /dev/null +++ b/src/build-data/arch/ppc @@ -0,0 +1,24 @@ +realname "PowerPC" + +endian big + +default_submodel ppc604 + +<aliases> +powerpc +</aliases> + +<submodel_aliases> +g3 -> ppc740 +g4 -> ppc7450 +</submodel_aliases> + +<submodels> +ppc601 +ppc603 +ppc604 +ppc740 +ppc750 +ppc7400 +ppc7450 +</submodels> diff --git a/src/build-data/arch/ppc64 b/src/build-data/arch/ppc64 new file mode 100644 index 000000000..f5926b789 --- /dev/null +++ b/src/build-data/arch/ppc64 @@ -0,0 +1,18 @@ +realname "PowerPC 64" + +endian big + +default_submodel power4 + +<submodel_aliases> +g5 -> ppc970 +</submodel_aliases> + +<submodels> +rs64a +ppc970 +power3 +power4 +power5 +cellppu +</submodels> diff --git a/src/build-data/arch/s390 b/src/build-data/arch/s390 new file mode 100644 index 000000000..392f51397 --- /dev/null +++ b/src/build-data/arch/s390 @@ -0,0 +1,7 @@ +realname "S/390 31-bit" + +default_submodel s390 + +<submodels> +s390 +</submodels> diff --git a/src/build-data/arch/s390x b/src/build-data/arch/s390x new file mode 100644 index 000000000..49fb0bda7 --- /dev/null +++ b/src/build-data/arch/s390x @@ -0,0 +1,7 @@ +realname "S/390 64-bit" + +default_submodel s390x + +<submodels> +s390x +</submodels> diff --git a/src/build-data/arch/sh b/src/build-data/arch/sh new file mode 100644 index 000000000..8f0998fd6 --- /dev/null +++ b/src/build-data/arch/sh @@ -0,0 +1,11 @@ +realname "Hitachi SH" + +default_submodel sh1 + +<submodels> +sh1 +sh2 +sh3 +sh3e +sh4 +</submodels> diff --git a/src/build-data/arch/sparc32 b/src/build-data/arch/sparc32 new file mode 100644 index 000000000..6b752df87 --- /dev/null +++ b/src/build-data/arch/sparc32 @@ -0,0 +1,34 @@ +realname "SPARC" + +# V7 doesn't have integer multiply, so it will be bitterly slow for some things +# (especially BigInt). Also, it's fairly rare nowadays, so we default to V8. +default_submodel sparc32-v8 + +endian big + +<aliases> +sparc +</aliases> + +<submodels> +sparc32-v7 +sparc32-v8 +sparc32-v9 +</submodels> + +<submodel_aliases> +cypress -> sparc32-v7 +supersparc -> sparc32-v8 +hypersparc -> sparc32-v8 +microsparc -> sparc32-v8 +sparclite -> sparc32-v8 + +sparcv7 -> sparc32-v7 +sparcv8 -> sparc32-v8 +sparcv9 -> sparc32-v9 + +sparc-v7 -> sparc32-v7 +sparc-v8 -> sparc32-v8 +sparc-v9 -> sparc32-v9 +</submodel_aliases> + diff --git a/src/build-data/arch/sparc64 b/src/build-data/arch/sparc64 new file mode 100644 index 000000000..c0575efc4 --- /dev/null +++ b/src/build-data/arch/sparc64 @@ -0,0 +1,15 @@ +realname "SPARC64" + +default_submodel sparc64-ultra + +<submodels> +sparc64-ultra +sparc64-ultra2 +sparc64-ultra3 +</submodels> + +<submodel_aliases> +ultrasparc -> sparc64-ultra +ultrasparc2 -> sparc64-ultra2 +ultrasparc3 -> sparc64-ultra3 +</submodel_aliases> diff --git a/src/build-data/botan-config.in b/src/build-data/botan-config.in new file mode 100644 index 000000000..ef2b5fe4d --- /dev/null +++ b/src/build-data/botan-config.in @@ -0,0 +1,57 @@ +#!/bin/sh + +guess_prefix=`dirname \`dirname $0\`` +install_prefix=@{var:prefix} +prefix= +includedir=@{var:includedir} +libdir=@{var:libdir} + +usage() +{ + echo "botan-config [--prefix[=DIR]] [--version] [--libs] [--cflags]" + exit 1 +} + +if test $# -eq 0; then + usage +fi + +if test `echo $guess_prefix | cut -c 1` = "/"; then + prefix=$guess_prefix +else + prefix=$install_prefix +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + case "$1" in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo $prefix + ;; + --version) + echo @{var:version} + exit 0 + ;; + --cflags) + if [ $prefix != "/usr" -a $prefix != "/usr/local" ] + then + echo -I$prefix/$includedir + fi + ;; + --libs) + echo -L$prefix/$libdir @{var:link_to} -lbotan + ;; + *) + usage + ;; + esac + shift +done + +exit 0 diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in new file mode 100644 index 000000000..b0ffc87a1 --- /dev/null +++ b/src/build-data/buildh.in @@ -0,0 +1,43 @@ + +#ifndef BOTAN_BUILD_CONFIG_H__ +#define BOTAN_BUILD_CONFIG_H__ + +/* +This file was automatically generated + +@{var:timestamp} UTC + +by @{var:user} on @{var:hostname} + +@{var:command-line} + +Target +------- +Compiler: @{var:cc} @{var:lib_opt} @{var:mach_opt} +Arch: @{var:submodel}/@{var:arch} +OS: @{var:os} + +Modules +------- +@{var:mod-list} +*/ + +#define BOTAN_VERSION_MAJOR @{var:version_major} +#define BOTAN_VERSION_MINOR @{var:version_minor} +#define BOTAN_VERSION_PATCH @{var:version_patch} + +#define BOTAN_MP_WORD_BITS @{var:mp_bits} +#define BOTAN_DEFAULT_BUFFER_SIZE 4096 +#define BOTAN_MEM_POOL_CHUNK_SIZE 64*1024 +#define BOTAN_PRIVATE_KEY_OP_BLINDING_BITS 64 + +#define BOTAN_KARAT_MUL_THRESHOLD 32 +#define BOTAN_KARAT_SQR_THRESHOLD 32 + +#ifndef BOTAN_DLL + #define BOTAN_DLL @{var:dll_export_flags} +#endif + +@{var:defines} +@{var:local_config} +#endif diff --git a/src/build-data/cc/bcc b/src/build-data/cc/bcc new file mode 100644 index 000000000..df09daff0 --- /dev/null +++ b/src/build-data/cc/bcc @@ -0,0 +1,31 @@ +realname "Borland C++" + +binary_name "bcc32" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O2" +check_opt_flags "-O2" +debug_flags "" +no_debug_flags "" +lang_flags "-tWR -tWM -tWC" +warning_flags "-w" + +dll_import_flags "" +dll_export_flags "" + +ar_command "tlib /C /P256" + +makefile_style nmake + +<mach_opt> +i486 -> "/G4" +i586 -> "/G5" +i686 -> "/G6" +athlon -> "/G6" +pentium4 -> "/G6" +</mach_opt> diff --git a/src/build-data/cc/compaq b/src/build-data/cc/compaq new file mode 100644 index 000000000..66d3a5219 --- /dev/null +++ b/src/build-data/cc/compaq @@ -0,0 +1,29 @@ +realname "Compaq C++" + +binary_name "cxx" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +# -O3 and up seem to be unhappy with Botan +lib_opt_flags "-O2" +check_opt_flags "-O2" +debug_flags "-g" +no_debug_flags "" +lang_flags "-std ansi -D__USE_STD_IOSTREAM" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +default -> "$(CXX) -shared -soname $(SONAME)" +</so_link_flags> + +<mach_opt> +alpha -> "-arch=SUBMODEL" alpha- +</mach_opt> diff --git a/src/build-data/cc/ekopath b/src/build-data/cc/ekopath new file mode 100644 index 000000000..ca2471059 --- /dev/null +++ b/src/build-data/cc/ekopath @@ -0,0 +1,40 @@ +realname "PathScale EKOPath C++" + +binary_name "pathCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -OPT:Ofast:alias=disjoint" +check_opt_flags "-O2" +lang_flags "-D_REENTRANT -ansi -Wno-long-long" +warning_flags "-W -Wall" + +ar_command "pathCC -ar -o" + +shared_flags "-fPIC" +debug_flags "-g" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)" +</so_link_flags> + +<mach_opt> +athlon -> "-mcpu=athlon" +pentium4 -> "-mcpu=pentium4" + +opteron -> "-mcpu=opteron" +em64t -> "-mcpu=em64t" +core2 -> "-mcpu=core" + +ia32 -> "-mcpu=anyx86" +amd64 -> "-mcpu=athlon64" +</mach_opt> diff --git a/src/build-data/cc/gcc b/src/build-data/cc/gcc new file mode 100644 index 000000000..78f78b132 --- /dev/null +++ b/src/build-data/cc/gcc @@ -0,0 +1,87 @@ +realname "GNU C++" + +binary_name "g++" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lang_flags "-D_REENTRANT -ansi -Wno-long-long" +warning_flags "-W -Wall" +#warning_flags "-Werror -Wextra -Wall -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations" + +lib_opt_flags "-O2 -finline-functions" +check_opt_flags "-O2" +shared_flags "-fPIC" +debug_flags "-g" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +# The default works for GNU ld and several other Unix linkers +default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)" + +# AIX doesn't seem to have soname support (weird...) +aix -> "$(CXX) -shared -fPIC" + +darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(SONAME)" +hpux -> "$(CXX) -shared -fPIC -Wl,+h,$(SONAME)" +solaris -> "$(CXX) -shared -fPIC -Wl,-h,$(SONAME)" +# Gotta use ld directly on BeOS, their GCC is busted +beos -> "ld -shared -h $(SONAME)" +</so_link_flags> + +<mach_opt> +# Specializations first (they don't need to be, just clearer) +i386 -> "-mtune=i686 -momit-leaf-frame-pointer" +r10000 -> "-mips4" +alpha-ev67 -> "-mcpu=ev6" # FIXME: GCC 3.1 and on has -march=ev67 +alpha-ev68 -> "-mcpu=ev6" +alpha-ev7 -> "-mcpu=ev6" +ppc601 -> "-mpowerpc -mcpu=601" +sparc64-ultra3 -> "-mcpu=v9 -mtune=ultrasparc3" + +em64t -> "-march=nocona -momit-leaf-frame-pointer" +cellppu -> "" + +# Default family options (SUBMODEL is substitued with the real submodel) +# Anything after the quotes is what should be *removed* from the submodel name +# before it's put into SUBMODEL. +alpha -> "-mcpu=SUBMODEL" alpha- +amd64 -> "-march=SUBMODEL -momit-leaf-frame-pointer" +arm -> "-mcpu=SUBMODEL" +ia32 -> "-march=SUBMODEL -momit-leaf-frame-pointer" +ia64 -> "-mtune=SUBMODEL" +hppa -> "-march=SUBMODEL" hppa +m68k -> "-mSUBMODEL" +sh -> "-mSUBMODEL" sh +sparc32 -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus" sparc32- +sparc64 -> "-mcpu=v9 -mtune=ultrasparc" +mips32 -> "-mips1 -mcpu=SUBMODEL" mips32- +mips64 -> "-mips3 -mcpu=SUBMODEL" mips64- +ppc -> "-mcpu=SUBMODEL" ppc +ppc64 -> "-mcpu=SUBMODEL" ppc +</mach_opt> + +# Note that the 'linking' bit means "use this for both compiling *and* linking" +<mach_abi_linking> +amd64 -> "-m64" +mips32 -> "-mabi=n32" +mips64 -> "-mabi=64" +s390 -> "-m31" +s390x -> "-m64" +sparc32 -> "-m32 -mno-app-regs" +sparc64 -> "-m64 -mno-app-regs" +ppc64 -> "-m64" + +# This should probably be used on most/all targets, but the docs are incomplete +openbsd -> "-pthread" +freebsd -> "-pthread" +netbsd -> "-pthread -D_NETBSD_SOURCE" +qnx -> "-fexceptions -D_QNX_SOURCE" +</mach_abi_linking> diff --git a/src/build-data/cc/hpcc b/src/build-data/cc/hpcc new file mode 100644 index 000000000..284e92ca6 --- /dev/null +++ b/src/build-data/cc/hpcc @@ -0,0 +1,32 @@ +realname "HP-UX C++" + +binary_name "aCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "+O2" +check_opt_flags "+O2" +debug_flags "-g" +no_debug_flags "" +lang_flags "-AA -ext +eh -z" +warning_flags "" # +w +shared_flags "+Z" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<mach_abi_linking> +hppa1.0 -> "+DAportable" +hppa1.1 -> "+DA1.1" +hppa2.0 -> "+DA2.0W" +</mach_abi_linking> + +<so_link_flags> +default -> "$(CXX) +Z -b -Wl,+h,$(SONAME)" # Documented in cc(1), but not CC(1) (?) +</so_link_flags> diff --git a/src/build-data/cc/icc b/src/build-data/cc/icc new file mode 100644 index 000000000..e1807c5a6 --- /dev/null +++ b/src/build-data/cc/icc @@ -0,0 +1,33 @@ +realname "Intel C++" + +binary_name "icpc" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -ip -unroll" +check_opt_flags "-O2" +debug_flags "-g" +no_debug_flags "-fomit-frame-pointer" +lang_flags "" +warning_flags "-w1" +shared_flags "-fPIC" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<mach_opt> +i686 -> "-march=pentium3" +athlon -> "-march=pentium3" +pentium4 -> "-march=pentium4" +core2 -> "-msse3" +</mach_opt> + +<so_link_flags> +default -> "$(CXX) -fPIC -shared" +</so_link_flags> diff --git a/src/build-data/cc/kai b/src/build-data/cc/kai new file mode 100644 index 000000000..8585e54e0 --- /dev/null +++ b/src/build-data/cc/kai @@ -0,0 +1,30 @@ +realname "KAI C++" + +binary_name "KCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +ar_command "KCC -o" + +lib_opt_flags "+K3 --inline_auto_space_time=65 --abstract_pointer" +check_opt_flags "+K3" +lang_flags "-D__KAI_STRICT" +debug_flags "-g" +no_debug_flags "" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +default -> "$(CXX) --soname $(SONAME)" +</so_link_flags> + +<mach_abi_linking> +all -> "--one_per" +</mach_abi_linking> diff --git a/src/build-data/cc/mipspro b/src/build-data/cc/mipspro new file mode 100644 index 000000000..b75fc4fb3 --- /dev/null +++ b/src/build-data/cc/mipspro @@ -0,0 +1,42 @@ +realname "SGI MIPSPro C++" + +binary_name "CC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -OPT:alias=TYPED" +check_opt_flags "-O3 -OPT:alias=TYPED" +debug_flags "-g3" +no_debug_flags "" +shared_flags "-KPIC" +lang_flags "-ansi -LANG:ansi-for-init-scope=ON" +# Disabled, because, while my code is fine, it warns about a lot of it's own +# headers <g> +#warning_flags "-fullwarn" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +default -> "$(CXX) -shared -Wl,-soname,$(SONAME)" +</so_link_flags> + +<mach_opt> +mips32 -> "-mips1" +mips64 -> "-mips3" + +mips64-r5000 -> "-mips4 -r5000" +mips64-r8000 -> "-mips4 -r8000" +mips64-r10000 -> "-mips4 -r10000" +</mach_opt> + +<mach_abi_linking> +mips32 -> "-n32" +mips64 -> "-64" +</mach_abi_linking> diff --git a/src/build-data/cc/msvc b/src/build-data/cc/msvc new file mode 100644 index 000000000..68e4517f8 --- /dev/null +++ b/src/build-data/cc/msvc @@ -0,0 +1,27 @@ +realname "Visual C++" + +binary_name "cl.exe" + +compile_option "/nologo /c " +output_to_option "/Fo" +add_include_dir_option "/I" +add_lib_dir_option "-L" +add_lib_option "" + +lib_opt_flags "/O2" +check_opt_flags "/O2" +debug_flags "/Zi" +no_debug_flags "" +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" +</so_link_flags> diff --git a/src/build-data/cc/pgi b/src/build-data/cc/pgi new file mode 100644 index 000000000..35f466477 --- /dev/null +++ b/src/build-data/cc/pgi @@ -0,0 +1,31 @@ +realname "Portland Group C++" + +binary_name "pgCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-fast -Minline" +check_opt_flags "-fast" +shared_flags "-fPIC" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +linux -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)" +solaris -> "$(CXX) -G -fPIC -Wl,-h,$(SONAME)" +</so_link_flags> + +<mach_opt> +i586 -> "-tp p5" +i686 -> "-tp p6" +athlon -> "-tp k7" +pentium4 -> "-tp p6" +ia32 -> "-tp px" +</mach_opt> diff --git a/src/build-data/cc/sgipro64 b/src/build-data/cc/sgipro64 new file mode 100644 index 000000000..28132ffcc --- /dev/null +++ b/src/build-data/cc/sgipro64 @@ -0,0 +1,30 @@ +realname "SGI Pro64" + +binary_name "sgiCC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O3 -OPT:alias=TYPED" +check_opt_flags "-O3 -OPT:alias=TYPED" +debug_flags "-g3" +no_debug_flags "" +shared_flags "-KPIC" +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> +default -> "$(CXX) -shared -Wl,-soname,$(SONAME)" +</so_link_flags> + +<mach_opt> + +</mach_opt> diff --git a/src/build-data/cc/sunwspro b/src/build-data/cc/sunwspro new file mode 100644 index 000000000..e1bc0b26f --- /dev/null +++ b/src/build-data/cc/sunwspro @@ -0,0 +1,47 @@ +realname "Sun Workshop Pro C++" + +binary_name "CC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +# The compiler supports up to -xO5, but anything higher than -xO2 causes +# incorrect results, infinite loops, other badness. :( +lib_opt_flags "-xO2" +check_opt_flags "-xO2" +debug_flags "-g" +no_debug_flags "" +shared_flags "-KPIC" +warning_flags "+w" +lang_flags "+p -D__EXTENSIONS__" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<so_link_flags> +default -> "$(CXX) -G -h$(SONAME)" +</so_link_flags> + +<mach_opt> +i386 -> "-xtarget=486" +i486 -> "-xtarget=486" +i586 -> "-xtarget=pentium" +i686 -> "-xtarget=pentium_pro" +pentium4 -> "-xtarget=pentium_pro" +k6 -> "-xtarget=pentium" + +sparc32-v9 -> "-xchip=ultra -xarch=v8" + +sparc32 -> "-xchip=ultra -xarch=SUBMODEL" sparc32- +sparc64 -> "-xchip=SUBMODEL" sparc64- +</mach_opt> + +<mach_abi_linking> +sparc64 -> "-xarch=v9" +amd64 -> "-m64" +</mach_abi_linking> diff --git a/src/build-data/cc/xlc b/src/build-data/cc/xlc new file mode 100644 index 000000000..64b888421 --- /dev/null +++ b/src/build-data/cc/xlc @@ -0,0 +1,29 @@ +realname "IBM XL C/C++" + +binary_name "xlC" + +compile_option "-c " +output_to_option "-o " +add_include_dir_option "-I" +add_lib_dir_option "-L" +add_lib_option "-l" + +lib_opt_flags "-O2" +check_opt_flags "-O2" +lang_flags "" +debug_flags "-g" +no_debug_flags "" + +dll_import_flags "" +dll_export_flags "" + +makefile_style unix + +<mach_opt> +cellppu -> "-qarch=cell" +ppc970 -> "-qarch=ppc970" +power4 -> "-qarch=pwr4" +power5 -> "-qarch=pwr5" + +cellppu -> "-qarch=cell" +</mach_opt> diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in new file mode 100644 index 000000000..df4669dd4 --- /dev/null +++ b/src/build-data/makefile/nmake.in @@ -0,0 +1,111 @@ +################################################## +# Compiler Options # +################################################## +CXX = @{var:cc} +LIB_OPT = @{var:lib_opt} +CHECK_OPT = @{var:check_opt} +MACH_OPT = @{var:mach_opt} +LANG_FLAGS = @{var:lang_flags} +WARN_FLAGS = @{var:warn_flags} +LINK_TO = @{var:link_to} + +################################################## +# Version Numbers # +################################################## +MAJOR = @{var:version_major} +MINOR = @{var:version_minor} +PATCH = @{var:version_patch} + +VERSION = $(MAJOR).$(MINOR).$(PATCH) + +################################################## +# Installation Settings # +################################################## +INSTALLROOT = @{var:prefix} + +LIBDIR = $(INSTALLROOT)\@{var:libdir} +HEADERDIR = $(INSTALLROOT)\@{var:includedir}\botan +DOCDIR = $(INSTALLROOT)\@{var:docdir}\Botan-$(VERSION) + +################################################## +# Aliases for Common Programs # +################################################## +AR = @{var:ar_command} +CD = @cd +ECHO = @echo +INSTALL = @{var:install_cmd_exec} +INSTALL_CMD = @{var:install_cmd_exec} +MKDIR = @md +MKDIR_INSTALL = @md +RM = @del /Q +RMDIR = @rmdir + +################################################## +# File Lists # +################################################## +CHECK = check + +DOCS = @{var:doc_files} + +HEADERS = @{var:include_files} + +LIBOBJS = @{var:lib_objs} + +CHECKOBJS = @{var:check_objs} + +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) +CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) + +LIBRARIES = $(STATIC_LIB) + +LIBNAME = libbotan +STATIC_LIB = $(LIBNAME).@{var:static_suffix} + +all: $(LIBRARIES) + +################################################## +# Build Commands # +################################################## +@{var:lib_build_cmds} + +@{var: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) + +$(CHECK): $(LIBRARIES) $(CHECKOBJS) + link /OUT:[email protected] $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO) + +$(STATIC_LIB): $(LIBOBJS) + $(AR) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS) + +################################################## +# Misc Targets # +################################################## +static: $(STATIC_LIB) + +################################################## +# Fake Targets # +################################################## +clean: + $(RM) @{var:build-dir}\lib\* @{var:build-dir}\checks\* + $(RM) $(LIBRARIES) $(CHECK) + +distclean: clean + $(RM) @{var:build-dir}\build.h + $(RM) @{var:build-dir}\include\botan\* + $(RMDIR) @{var:build-dir}\include\botan @{var:build-dir}\include + $(RMDIR) @{var:build-dir}\lib @{var:build-dir}\checks + $(RMDIR) @{var:build-dir} + $(RM) Makefile + +################################################## +# Install Commands # +################################################## +install: $(LIBRARIES) + $(ECHO) "Install command not implemented" diff --git a/src/build-data/makefile/unix.in b/src/build-data/makefile/unix.in new file mode 100644 index 000000000..3422f50cf --- /dev/null +++ b/src/build-data/makefile/unix.in @@ -0,0 +1,117 @@ +################################################## +# Compiler Options # +################################################## +CXX = @{var:cc} +LIB_OPT = @{var:lib_opt} +CHECK_OPT = @{var:check_opt} +MACH_OPT = @{var:mach_opt} +LANG_FLAGS = @{var:lang_flags} +WARN_FLAGS = @{var:warn_flags} +LINK_TO = @{var:link_to} + +################################################## +# Version Numbers # +################################################## +MAJOR = @{var:version_major} +MINOR = @{var:version_minor} +PATCH = @{var:version_patch} + +VERSION = $(MAJOR).$(MINOR).$(PATCH) + +################################################## +# Installation Settings # +################################################## +INSTALLROOT = @{var:prefix} + +BINDIR = $(INSTALLROOT)/bin +LIBDIR = $(INSTALLROOT)/@{var:libdir} +HEADERDIR = $(INSTALLROOT)/@{var:includedir}/botan +DOCDIR = $(INSTALLROOT)/@{var:docdir}/Botan-$(VERSION) + +CONFIG_SCRIPT = @{var:botan-config} + +################################################## +# Aliases for Common Programs # +################################################## +AR = @{var:ar_command} +CD = @cd +ECHO = @echo +INSTALL_CMD_EXEC = @{var:install_cmd_exec} +INSTALL_CMD_DATA = @{var:install_cmd_data} +LN = ln -fs +MKDIR = @mkdir +MKDIR_INSTALL = @umask 022; mkdir -p -m 755 +RANLIB = @{var:ranlib_command} +RM = @rm -f +RM_R = @rm -rf + +################################################## +# File Lists # +################################################## +CHECK = @{var:check_prefix}check + +DOCS = @{var:doc_files} + +HEADERS = @{var:include_files} + +LIBOBJS = @{var:lib_objs} + +CHECKOBJS = @{var:check_objs} + +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) +CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) + +LIBRARIES = $(STATIC_LIB) + +LIBNAME = @{var:lib_prefix}libbotan +STATIC_LIB = $(LIBNAME).a + +all: $(LIBRARIES) + +################################################## +# Build Commands # +################################################## +@{var:lib_build_cmds} + +@{var:check_build_cmds} + +################################################## +# Link Commands # +################################################## +$(CHECK): $(LIBRARIES) $(CHECKOBJS) + $(CXX) $(CHECKOBJS) -L. -lbotan $(LINK_TO) -o $(CHECK) + +$(STATIC_LIB): $(LIBOBJS) + $(RM) $(STATIC_LIB) + $(AR) $(STATIC_LIB) $(LIBOBJS) + $(RANLIB) $(STATIC_LIB) + +################################################## +# Fake Targets # +################################################## +.PHONY = clean distclean install static + +static: $(STATIC_LIB) + +clean: + $(RM_R) @{var:build-dir}/lib/* @{var:build-dir}/checks/* + $(RM) $(LIBRARIES) $(SYMLINK) $(CHECK) + +distclean: clean + $(RM_R) @{var:build-dir} + $(RM) Makefile $(CONFIG_SCRIPT) + +install: $(LIBRARIES) + $(ECHO) "Installing Botan into $(INSTALLROOT)... " + $(MKDIR_INSTALL) $(DOCDIR) + $(MKDIR_INSTALL) $(HEADERDIR) + $(MKDIR_INSTALL) $(LIBDIR) + $(MKDIR_INSTALL) $(BINDIR) + @for i in $(DOCS); do \ + $(INSTALL_CMD_DATA) $$i $(DOCDIR); \ + done + @for i in $(HEADERS); do \ + $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ + done + @$(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) + @$(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) diff --git a/src/build-data/makefile/unix_shr.in b/src/build-data/makefile/unix_shr.in new file mode 100644 index 000000000..a3be7d3af --- /dev/null +++ b/src/build-data/makefile/unix_shr.in @@ -0,0 +1,132 @@ +################################################## +# Compiler Options # +################################################## +CXX = @{var:cc} +LIB_OPT = @{var:lib_opt} +CHECK_OPT = @{var:check_opt} +MACH_OPT = @{var:mach_opt} +LANG_FLAGS = @{var:lang_flags} +WARN_FLAGS = @{var:warn_flags} +SO_OBJ_FLAGS = @{var:shared_flags} +SO_LINK_CMD = @{var:so_link} +LINK_TO = @{var:link_to} + +################################################## +# Version Numbers # +################################################## +MAJOR = @{var:version_major} +MINOR = @{var:version_minor} +PATCH = @{var:version_patch} + +VERSION = $(MAJOR).$(MINOR).$(PATCH) + +################################################## +# Installation Settings # +################################################## +INSTALLROOT = @{var:prefix} + +BINDIR = $(INSTALLROOT)/bin +LIBDIR = $(INSTALLROOT)/@{var:libdir} +HEADERDIR = $(INSTALLROOT)/@{var:includedir}/botan +DOCDIR = $(INSTALLROOT)/@{var:docdir}/Botan-$(VERSION) + +CONFIG_SCRIPT = @{var:botan-config} + +################################################## +# Aliases for Common Programs # +################################################## +AR = @{var:ar_command} +CD = @cd +ECHO = @echo +INSTALL_CMD_EXEC = @{var:install_cmd_exec} +INSTALL_CMD_DATA = @{var:install_cmd_data} +LN = ln -fs +MKDIR = @mkdir +MKDIR_INSTALL = @umask 022; mkdir -p -m 755 +RANLIB = @{var:ranlib_command} +RM = @rm -f +RM_R = @rm -rf + +################################################## +# File Lists # +################################################## +CHECK = @{var:check_prefix}check + +DOCS = @{var:doc_files} + +HEADERS = @{var:include_files} + +LIBOBJS = @{var:lib_objs} + +CHECKOBJS = @{var:check_objs} + +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS) +CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) + +LIBRARIES = $(STATIC_LIB) $(SHARED_LIB) + +LIBNAME = @{var:lib_prefix}libbotan +STATIC_LIB = $(LIBNAME).a + +SHARED_LIB = $(LIBNAME)-$(MAJOR).$(MINOR).$(PATCH).@{var:so_suffix} +SONAME = $(LIBNAME)-$(MAJOR).$(MINOR).$(PATCH).@{var:so_suffix} + +SYMLINK = libbotan.@{var:so_suffix} + +all: $(LIBRARIES) + +################################################## +# Build Commands # +################################################## +@{var:lib_build_cmds} + +@{var:check_build_cmds} + +################################################## +# Link Commands # +################################################## +$(CHECK): $(LIBRARIES) $(CHECKOBJS) + $(CXX) $(CHECKOBJS) -L. -lbotan $(LINK_TO) -o $(CHECK) + +$(STATIC_LIB): $(LIBOBJS) + $(RM) $(STATIC_LIB) + $(AR) $(STATIC_LIB) $(LIBOBJS) + $(RANLIB) $(STATIC_LIB) + +$(SHARED_LIB): $(LIBOBJS) + $(SO_LINK_CMD) $(LINK_TO) $(LIBOBJS) -o $(SHARED_LIB) + $(LN) $(SHARED_LIB) $(SYMLINK) + +################################################## +# Fake Targets # +################################################## +.PHONY = clean distclean install static shared + +static: $(STATIC_LIB) + +shared: $(SHARED_LIB) + +clean: + $(RM_R) @{var:build-dir}/lib/* @{var:build-dir}/checks/* + $(RM) $(LIBRARIES) $(SYMLINK) $(CHECK) + +distclean: clean + $(RM_R) @{var:build-dir} + $(RM) Makefile $(CONFIG_SCRIPT) + +install: $(LIBRARIES) + $(ECHO) "Installing Botan into $(INSTALLROOT)... " + $(MKDIR_INSTALL) $(DOCDIR) + $(MKDIR_INSTALL) $(HEADERDIR) + $(MKDIR_INSTALL) $(LIBDIR) + $(MKDIR_INSTALL) $(BINDIR) + @for i in $(DOCS); do \ + $(INSTALL_CMD_DATA) $$i $(DOCDIR); \ + done + @for i in $(HEADERS); do \ + $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ + done + @$(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) + @$(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) + @$(INSTALL_CMD_EXEC) $(SHARED_LIB) $(LIBDIR) + $(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SYMLINK) diff --git a/src/build-data/os/aix b/src/build-data/os/aix new file mode 100644 index 000000000..cec818580 --- /dev/null +++ b/src/build-data/os/aix @@ -0,0 +1,7 @@ +realname "AIX" + +os_type unix + +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/beos b/src/build-data/os/beos new file mode 100644 index 000000000..2b12792bb --- /dev/null +++ b/src/build-data/os/beos @@ -0,0 +1,16 @@ +realname "BeOS" + +os_type beos + +install_root /boot/beos +header_dir ../develop/headers +lib_dir system/lib +doc_dir documentation + +<supports_shared> +all +</supports_shared> + +<aliases> +haiku +</aliases> diff --git a/src/build-data/os/cygwin b/src/build-data/os/cygwin new file mode 100644 index 000000000..c2aadea98 --- /dev/null +++ b/src/build-data/os/cygwin @@ -0,0 +1,13 @@ +realname "Cygwin" + +os_type unix + +install_root c:\Botan +doc_dir docs + +# Cygwin supports shared libs fine, but there are problems with making a Botan +# shared library when libraries it depends on are static-only (such as libz). +# So until I can figure out a work-around, it's disabled. +<supports_shared> +#all +</supports_shared> diff --git a/src/build-data/os/darwin b/src/build-data/os/darwin new file mode 100644 index 000000000..aa28dc59b --- /dev/null +++ b/src/build-data/os/darwin @@ -0,0 +1,26 @@ +realname "Darwin / MacOS X" + +os_type unix + +so_suffix dylib + +# It doesn't have the 's' option; you need to use needs ranlib +ar_command "ar cr" +ar_needs_ranlib yes + +doc_dir doc + +<supports_shared> +all +</supports_shared> + +<arch> +ia32 +amd64 +ppc +ppc64 # g5! +</arch> + +<aliases> +macosx +</aliases> diff --git a/src/build-data/os/defaults b/src/build-data/os/defaults new file mode 100644 index 000000000..88fd82252 --- /dev/null +++ b/src/build-data/os/defaults @@ -0,0 +1,19 @@ +# Defaults are for a Unix box, since that's what most of OS variants are. It +# would be nice to have generic 'windows', 'beos', 'unix', etc targets to +# handle defaults for those classes of OSes, though Unix is by far the most +# varied/fragmented + +obj_suffix o +so_suffix so +static_suffix a + +ar_command "ar crs" +ar_needs_ranlib no + +install_root /usr/local +header_dir include +lib_dir lib +doc_dir share/doc + +install_cmd_data install -m 644 +install_cmd_exec install -m 755 diff --git a/src/build-data/os/freebsd b/src/build-data/os/freebsd new file mode 100644 index 000000000..e58ade517 --- /dev/null +++ b/src/build-data/os/freebsd @@ -0,0 +1,7 @@ +realname "FreeBSD" + +os_type unix + +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/hpux b/src/build-data/os/hpux new file mode 100644 index 000000000..6e17d3b73 --- /dev/null +++ b/src/build-data/os/hpux @@ -0,0 +1,13 @@ +realname "HP-UX" + +os_type unix + +so_suffix sl + +<supports_shared> +all +</supports_shared> + +<aliases> +hp-ux +</aliases> diff --git a/src/build-data/os/irix b/src/build-data/os/irix new file mode 100644 index 000000000..fd8b43287 --- /dev/null +++ b/src/build-data/os/irix @@ -0,0 +1,7 @@ +realname "IRIX" + +os_type unix + +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/linux b/src/build-data/os/linux new file mode 100644 index 000000000..acf224244 --- /dev/null +++ b/src/build-data/os/linux @@ -0,0 +1,8 @@ +realname "Linux" + +os_type unix + +# Is this correct? +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/netbsd b/src/build-data/os/netbsd new file mode 100644 index 000000000..435d8f5e8 --- /dev/null +++ b/src/build-data/os/netbsd @@ -0,0 +1,7 @@ +realname "NetBSD" + +os_type unix + +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/openbsd b/src/build-data/os/openbsd new file mode 100644 index 000000000..cb44bd115 --- /dev/null +++ b/src/build-data/os/openbsd @@ -0,0 +1,7 @@ +realname "OpenBSD" + +os_type unix + +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/qnx b/src/build-data/os/qnx new file mode 100644 index 000000000..28bc8dea9 --- /dev/null +++ b/src/build-data/os/qnx @@ -0,0 +1,7 @@ +realname "QNX" + +os_type unix + +<supports_shared> +all +</supports_shared> diff --git a/src/build-data/os/solaris b/src/build-data/os/solaris new file mode 100644 index 000000000..a1c1b40b3 --- /dev/null +++ b/src/build-data/os/solaris @@ -0,0 +1,11 @@ +realname "Solaris" + +os_type unix + +<supports_shared> +all +</supports_shared> + +<aliases> +sunos +</aliases> diff --git a/src/build-data/os/tru64 b/src/build-data/os/tru64 new file mode 100644 index 000000000..e320c1df4 --- /dev/null +++ b/src/build-data/os/tru64 @@ -0,0 +1,11 @@ +realname "Tru64" + +os_type unix + +<supports_shared> +all +</supports_shared> + +<aliases> +osf1 +</aliases> diff --git a/src/build-data/os/windows b/src/build-data/os/windows new file mode 100644 index 000000000..62b271271 --- /dev/null +++ b/src/build-data/os/windows @@ -0,0 +1,22 @@ +realname "MS Windows" + +os_type windows + +obj_suffix obj +so_suffix dll +static_suffix lib + +install_root c:\Botan +doc_dir docs + +install_cmd_data copy +install_cmd_exec copy + +<supports_shared> +msvc +</supports_shared> + +<aliases> +win32 +MSWin32 +</aliases> |