diff options
author | lloyd <[email protected]> | 2008-09-29 20:17:08 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-29 20:17:08 +0000 |
commit | 7c0319368d1948d54db514e5f72c589a397e2909 (patch) | |
tree | 2d52b6dd8715a6ea0fc21b3a66673fb38a8d4ebb /src/build-data/makefile | |
parent | 0f2dfff90fe3882a85308d66a05803178a452023 (diff) |
Remove the misc dir:
Moved XS, Boost Python, and SWIG wrappers to new toplevel directory 'wrappers'
Moved NIST X.509 test suite into checks directory
Move the build information used by configure.pl to src/build-data
Move scripts directory to doc (for lack of a better spot)
Diffstat (limited to 'src/build-data/makefile')
-rw-r--r-- | src/build-data/makefile/nmake.in | 111 | ||||
-rw-r--r-- | src/build-data/makefile/unix.in | 117 | ||||
-rw-r--r-- | src/build-data/makefile/unix_shr.in | 132 |
3 files changed, 360 insertions, 0 deletions
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) |