%{header_in} %{gmake_commands_in} # Executable targets APP = %{out_dir}/botan%{program_suffix} TEST = %{out_dir}/botan-test%{program_suffix} # Library targets LIB_BASENAME = %{lib_prefix}%{libname} STATIC_LIB = %{out_dir}/$(LIB_BASENAME).%{static_suffix} LIBRARIES = $(STATIC_LIB) # File Lists INCLUDE_DIR = %{botan_include_dir} LIBOBJS = %{lib_objs} APPOBJS = %{app_objs} TESTOBJS = %{test_objs} # First make target. Will be used by default all: $(APP) $(TEST) # Build Commands %{lib_build_cmds} %{app_build_cmds} %{test_build_cmds} # Link Commands %{gmake_dso_in} $(APP): $(LIBRARIES) $(APPOBJS) $(APP_LINK_CMD) $(LDFLAGS) $(APPOBJS) -L%{out_dir} -l%{libname} $(APP_LINKS_TO) -o $(APP) $(APP_POST_LINK_CMD) $(TEST): $(LIBRARIES) $(TESTOBJS) $(TEST_LINK_CMD) $(LDFLAGS) $(TESTOBJS) -L%{out_dir} -l%{libname} $(TEST_LINKS_TO) -o $(TEST) $(TEST_POST_LINK_CMD) $(STATIC_LIB): $(LIBOBJS) $(RM) $(STATIC_LIB) $(AR) $(STATIC_LIB) $(LIBOBJS) $(RANLIB) $(STATIC_LIB) # Fake targets .PHONY: clean distclean docs install valgrind lcov %{gmake_coverage_in} SPHINX_CONFIG = %{sphinx_config_dir} SPHINX_OPTS = -b html clean: -$(RM) %{libobj_dir}/* -$(RM) %{testobj_dir}/* -$(RM) %{appobj_dir}/* -$(RM) $(SONAME) $(SYMLINK) -$(RM) $(LIBRARIES) $(APP) $(TEST) distclean: clean $(RM) Makefile $(RM_R) %{build_dir} $(RM) botan_all.cpp botan_all.h valgrind: valgrind --log-file=botan.%%p.log -v --track-origins=yes --leak-check=full --show-reachable=yes ./botan-test docs: %{build_doc_commands} install: $(APP) docs $(SCRIPTS_DIR)/install.py --destdir=%{destdir} --build-dir="%{build_dir}" --bindir=%{bindir} --libdir=%{libdir} --docdir=%{docdir} --includedir=%{includedir}