# =========================================================================== # # PUBLIC DOMAIN NOTICE # National Center for Biotechnology Information # # This software/database is a "United States Government Work" under the # terms of the United States Copyright Act. It was written as part of # the author's official duties as a United States Government employee and # thus cannot be copyrighted. This software/database is freely available # to the public for use. The National Library of Medicine and the U.S. # Government have not placed any restriction on its use or reproduction. # # Although all reasonable efforts have been taken to ensure the accuracy # and reliability of the software and data, the NLM and the U.S. # Government do not and cannot warrant the performance or results that # may be obtained by using this software or data. The NLM and the U.S. # Government disclaim all warranties, express or implied, including # warranties of performance, merchantability or fitness for any particular # purpose. # # Please cite the author in any work or product based on this material. # # =========================================================================== # All of this section is to provide semi-automatic detection of # required libraries and headers. They SHOULD have been built and installed # already before building these examples. NCBI_VDB_LIBDIR ?= $(dir $(firstword $(shell find $(subst :, ,$(LD_LIBRARY_PATH) -maxdepth 1 -name libncbi-vdb-static.a) 2>/dev/null) ) ) NGS_LIBDIR ?= $(dir $(firstword $(shell find $(subst :, ,$(LD_LIBRARY_PATH) -maxdepth 1 -name libngs-c++.a) 2>/dev/null) ) ) ifeq (,$(wildcard /usr/include/ncbi-vdb)) ifeq (,$(wildcard $(NCBI_VDB_LIBDIR)/../include)) ncbi-headers: @ echo "NCBI_VDB headers are not found (looking for /usr/include/ncbi-vdb or $(NCBI_VDB_LIBDIR)../include)" @ false else CPPFLAGS += -I$(NCBI_VDB_LIBDIR)/../include #CPPFLAGS += -g # debug ncbi-headers: @ true endif else # found in /usr/include ncbi-headers: @ true endif ifeq (,$(wildcard /usr/include/ngs)) ifeq (,$(wildcard $(NGS_LIBDIR)/../include)) ngs-headers: @ echo "NGS headers are not found (looking for /usr/include/ngs or $(NGS_LIBDIR)../include)" @ false else CPPFLAGS += -I$(NGS_LIBDIR)/../include ngs-headers: @ true endif else # found in /usr/include ngs-headers: @ true endif $(NCBI_VDB_LIBDIR)/libncbi-vdb-static.a: @ echo "These example applications require $(@F). Please install ncbi-vdb libraries and add their location to LD_LIBRARY_PATH." @ echo "LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}" @ false $(NGS_LIBDIR)/libngs-c++.a: @ echo "These example applications require $(@F). Please install ngs libraries and add their location to LD_LIBRARY_PATH." @ false .PHONY: ncbi-headers ngs-headers