%{header_in} %{commands_in} # Targets APP = %{app_prefix}botan TEST = %{app_prefix}botan-test LIBRARIES = $(STATIC_LIB) LIBNAME = %{lib_prefix}libbotan STATIC_LIB = $(LIBNAME)-$(BRANCH).a LIBPATH = botan-$(BRANCH) all: $(APP) $(TEST) # File Lists INCLUDE_DIR = %{botan_include_dir} LIBOBJS = %{lib_objs} APPOBJS = %{app_objs} TESTOBJS = %{test_objs} # Build Commands %{lib_build_cmds} %{app_build_cmds} %{test_build_cmds} # Link Commands %{dso_in} $(APP): $(LIBRARIES) $(APPOBJS) $(CXX) $(LDFLAGS) $(APPOBJS) -L. -l$(LIBPATH) $(APP_LINKS_TO) -o $(APP) $(TEST): $(LIBRARIES) $(TESTOBJS) $(CXX) $(LDFLAGS) $(TESTOBJS) -L. -l$(LIBPATH) $(TEST_LINKS_TO) -o $(TEST) $(STATIC_LIB): $(LIBOBJS) $(RM) $(STATIC_LIB) $(AR) $(STATIC_LIB) $(LIBOBJS) $(RANLIB) $(STATIC_LIB) %{python_in} # Fake Targets .PHONY = clean distclean docs website install SPHINX_CONFIG = %{sphinx_config_dir} SPHINX_OPTS = -b html WEBSITE_DIR=%{doc_output_dir}/website WEBSITE_SRC_DIR=%{doc_output_dir}/website-src clean: $(RM_R) %{build_dir}/obj $(RM) $(LIBRARIES) $(SYMLINK) $(SONAME) $(APP) $(TEST) distclean: clean $(RM_R) %{build_dir} $(RM) Makefile* $(CONFIG_SCRIPT) $(PKGCONFIG) $(RM) botan_all.cpp botan_all.h 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) $(MKDIR_INSTALL) $(PKGCONF_DIR) $(INSTALL_CMD_DATA) $(PKGCONFIG) $(PKGCONF_DIR) website: rm -rf $(WEBSITE_SRC_DIR) $(WEBSITE_DIR) mkdir -p $(WEBSITE_SRC_DIR) cp -r %{doc_dir}/*.rst %{doc_dir}/relnotes %{doc_dir}/website/*.rst $(WEBSITE_SRC_DIR) sphinx-build -q -c $(SPHINX_CONFIG) -b html $(WEBSITE_SRC_DIR) $(WEBSITE_DIR) sphinx-build -q -c $(SPHINX_CONFIG) -b html %{doc_dir}/manual $(WEBSITE_DIR)/manual rm -rf $(WEBSITE_DIR)/.doctrees rm -rf $(WEBSITE_DIR)/manual/.doctrees rm -f $(WEBSITE_DIR)/.buildinfo rm -f $(WEBSITE_DIR)/manual/.buildinfo doxygen %{build_dir}/botan.doxy mv %{doc_output_dir}/doxygen $(WEBSITE_DIR)/doxygen