diff options
Diffstat (limited to 'src/build-data')
-rw-r--r-- | src/build-data/botan-config.in | 17 | ||||
-rw-r--r-- | src/build-data/makefile/dso.in | 6 | ||||
-rw-r--r-- | src/build-data/makefile/gmake.in | 35 | ||||
-rw-r--r-- | src/build-data/makefile/header.in | 8 | ||||
-rw-r--r-- | src/build-data/makefile/nmake.in | 10 |
5 files changed, 17 insertions, 59 deletions
diff --git a/src/build-data/botan-config.in b/src/build-data/botan-config.in index f855cbc50..e8d8bc2c1 100644 --- a/src/build-data/botan-config.in +++ b/src/build-data/botan-config.in @@ -1,16 +1,9 @@ #!/bin/sh -# For normal builds: -guess_prefix=`dirname \`dirname $0\`` +prefix=%{prefix} includedir=%{includedir}/botan-%{version_major}.%{version_minor} libdir=%{libdir} -# For workspace builds: -#guess_prefix=`dirname $0` -#includedir=build/include -#libdir= - -install_prefix=%{prefix} prefix= usage() @@ -23,12 +16,6 @@ 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]*=//'` ;; @@ -49,7 +36,7 @@ while test $# -gt 0; do echo -I$prefix/$includedir ;; --libs) - if [ $prefix != "/usr" -a $prefix != "/usr/local" ] + if [ $prefix != "/usr" ] then echo -L$prefix/$libdir -lbotan-%{version_major}.%{version_minor} %{link_to} else diff --git a/src/build-data/makefile/dso.in b/src/build-data/makefile/dso.in index 7e9829fff..0c791515f 100644 --- a/src/build-data/makefile/dso.in +++ b/src/build-data/makefile/dso.in @@ -1,6 +1,6 @@ -SONAME = $(LIBNAME)-$(BRANCH).%{so_suffix}.%{so_abi_rev} -SHARED_LIB = $(SONAME).%{version_patch} -SYMLINK = $(LIBNAME)-$(BRANCH).%{so_suffix} +SHARED_LIB = $(LIBNAME).%{so_suffix}.%{so_abi_rev}.%{version_patch} +SONAME = $(LIBNAME).%{so_suffix}.%{so_abi_rev} +SYMLINK = $(LIBNAME).%{so_suffix} $(SHARED_LIB): $(LIBOBJS) $(LIB_LINK_CMD) $(LDFLAGS) $(LIBOBJS) $(LIB_LINKS_TO) -o $(SHARED_LIB) diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in index e9320ce02..6b2703cb7 100644 --- a/src/build-data/makefile/gmake.in +++ b/src/build-data/makefile/gmake.in @@ -3,12 +3,9 @@ %{commands_in} # Library targets -LIBRARIES = $(STATIC_LIB) - -LIBNAME = %{lib_prefix}libbotan -STATIC_LIB = $(LIBNAME)-$(BRANCH).a +STATIC_LIB = %{out_dir}/$(LIBNAME).%{static_suffix} -LIBPATH = botan-$(BRANCH) +LIBRARIES = $(STATIC_LIB) # File Lists INCLUDE_DIR = %{botan_include_dir} @@ -30,10 +27,10 @@ TESTOBJS = %{test_objs} %{dso_in} $(APP): $(LIBRARIES) $(APPOBJS) - $(CXX) $(LDFLAGS) $(APPOBJS) -L. -l$(LIBPATH) $(APP_LINKS_TO) -o $(APP) + $(CXX) $(LDFLAGS) $(APPOBJS) -L%{out_dir} -l%{libname} $(APP_LINKS_TO) -o $(APP) $(TEST): $(LIBRARIES) $(TESTOBJS) - $(CXX) $(LDFLAGS) $(TESTOBJS) -L. -l$(LIBPATH) $(TEST_LINKS_TO) -o $(TEST) + $(CXX) $(LDFLAGS) $(TESTOBJS) -L%{out_dir} -l%{libname} $(TEST_LINKS_TO) -o $(TEST) $(STATIC_LIB): $(LIBOBJS) $(RM) $(STATIC_LIB) @@ -64,29 +61,7 @@ docs: %{build_doc_commands} install: $(LIBRARIES) docs - $(MKDIR_INSTALL) $(DOCDIR) - $(COPY_R) %{doc_output_dir}/* $(DOCDIR) - - $(MKDIR_INSTALL) $(HEADERDIR) - for i in $(INCLUDE_DIR)/*.h; do \ - $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ - done - - $(MKDIR_INSTALL) $(LIBDIR) - $(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) - -ifneq ($(SHARED_LIB),) - $(INSTALL_CMD_EXEC) $(SHARED_LIB) $(LIBDIR) - $(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SYMLINK) - $(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SONAME) -endif - - $(MKDIR_INSTALL) $(BINDIR) - $(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) - $(INSTALL_CMD_EXEC) $(APP) $(BINDIR) - - $(MKDIR_INSTALL) $(PKGCONF_DIR) - $(INSTALL_CMD_DATA) $(PKGCONFIG) $(PKGCONF_DIR) + $(SCRIPTS_DIR)/install.py --destdir=%{destdir} --bindir=%{bindir} --libdir=%{libdir} --docdir=%{docdir} --includedir=%{includedir} website: rm -rf $(WEBSITE_SRC_DIR) $(WEBSITE_DIR) diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in index c481f65f3..86d4c65c5 100644 --- a/src/build-data/makefile/header.in +++ b/src/build-data/makefile/header.in @@ -16,10 +16,14 @@ LIB_FLAGS = $(SO_OBJ_FLAGS) $(LANG_FLAGS) $(LIB_OPT) $(WARN_FLAGS) APP_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS) TEST_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS) +SCRIPTS_DIR = src/scripts + # Version Numbers VERSION = %{version} BRANCH = %{version_major}.%{version_minor} +LIBNAME = %{lib_prefix}botan-%{version_major}.%{version_minor} + # Installation Settings DESTDIR = %{destdir} BINDIR = $(DESTDIR)/bin @@ -32,7 +36,7 @@ CONFIG_SCRIPT = %{botan_config} PKGCONFIG = %{botan_pkgconfig} # Executable targets -APP = %{app_prefix}botan%{program_suffix} -TEST = %{app_prefix}botan-test%{program_suffix} +APP = %{out_dir}/botan%{program_suffix} +TEST = %{out_dir}/botan-test%{program_suffix} all: $(APP) $(TEST) diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index f45690d06..95d8c0422 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -73,12 +73,4 @@ distclean: clean $(RM) Makefile $(LIBNAME).* $(APP).* install: $(LIBRARIES) docs - -$(MKDIR) $(DESTDIR)\include\botan - $(INSTALL_CMD) botan.* $(DESTDIR) - $(INSTALL_CMD) build\include\botan\*.h $(DESTDIR)\include\botan - - -$(MKDIR) $(DESTDIR)\bin - $(INSTALL_CMD) $(APP) $(DESTDIR)\bin - - -$(MKDIR) $(DESTDIR)\lib - $(INSTALL_CMD) $(LIBRARIES) $(DESTDIR)\lib + $(SCRIPTS_DIR)/install.py --destdir=%{destdir} --bindir=%{bindir} --libdir=%{libdir} --docdir=%{docdir} --includedir=%{includedir} |