1# =========================================================================== 2# 3# PUBLIC DOMAIN NOTICE 4# National Center for Biotechnology Information 5# 6# This software/database is a "United States Government Work" under the 7# terms of the United States Copyright Act. It was written as part of 8# the author's official duties as a United States Government employee and 9# thus cannot be copyrighted. This software/database is freely available 10# to the public for use. The National Library of Medicine and the U.S. 11# Government have not placed any restriction on its use or reproduction. 12# 13# Although all reasonable efforts have been taken to ensure the accuracy 14# and reliability of the software and data, the NLM and the U.S. 15# Government do not and cannot warrant the performance or results that 16# may be obtained by using this software or data. The NLM and the U.S. 17# Government disclaim all warranties, express or implied, including 18# warranties of performance, merchantability or fitness for any particular 19# purpose. 20# 21# Please cite the author in any work or product based on this material. 22# 23# =========================================================================== 24 25 26#------------------------------------------------------------------------------- 27# environment 28# 29TOP ?= $(CURDIR) 30include $(TOP)/build/Makefile.shell 31 32 33#------------------------------------------------------------------------------- 34# default 35# 36SUBDIRS = \ 37 shared \ 38 tools \ 39 40# common targets for non-leaf Makefiles; must follow a definition of SUBDIRS 41include $(TOP)/build/Makefile.targets 42 43default: $(SUBDIRS) 44 45test: all 46 47$(SUBDIRS) test: 48 @ $(MAKE) -C $@ 49 50.PHONY: default $(SUBDIRS) test 51 52#------------------------------------------------------------------------------- 53# all 54# 55$(SUBDIRS_ALL): 56 57#------------------------------------------------------------------------------- 58# std 59# 60$(SUBDIRS_STD): 61 62#------------------------------------------------------------------------------- 63# install 64# 65install install-delite: 66 @ echo "Checking make status of tools..." 67 @ $(MAKE) -s --no-print-directory TOP=$(CURDIR) std 68 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.install $@ 69 70uninstall: 71 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.install uninstall 72 73.PHONY: install uninstall 74 75#------------------------------------------------------------------------------- 76# clean 77# 78clean: clean_deb clean_rpm clean_test 79 80clean_test: 81 @ $(MAKE) -s -C test clean 82 83#------------------------------------------------------------------------------- 84# runtests 85# 86runtests: runtests_test 87 88runtests_test: 89 @ $(MAKE) -s -C test runtests 90 91# @ $(MAKE) -s -C ngs runtests 92 93#------------------------------------------------------------------------------- 94# slowtests 95# 96slowtests: slowtests_test 97 98slowtests_test: 99 @ $(MAKE) -s -C test slowtests 100 101#------------------------------------------------------------------------------- 102# valgrind 103# 104valgrind: valgrind_test 105 106valgrind_test: 107 @ $(MAKE) -s -C test valgrind 108 109#------------------------------------------------------------------------------- 110# RPM 111# 112ifeq (mac,$(OS)) 113rpm: 114 @ echo "Not making rpm on Mac" 115clean_rpm: 116else 117rpm: std 118 @ $(MAKE) rpm -s TOP=$(CURDIR) -f build/Makefile.rpm 119clean_rpm: 120 @ $(MAKE) clean_rpm -s TOP=$(CURDIR) -f build/Makefile.rpm 121endif 122 123#------------------------------------------------------------------------------- 124# DEB 125# 126ifeq (mac,$(OS)) 127deb: std 128else 129deb: 130endif 131 @ $(MAKE) deb -s TOP=$(CURDIR) -f build/Makefile.deb 132clean_deb: 133 @ $(MAKE) clean_deb -s TOP=$(CURDIR) -f build/Makefile.deb 134 135#------------------------------------------------------------------------------- 136# pass-through targets 137# 138COMPILERS = GCC ICC VC++ CLANG 139ARCHITECTURES = i386 x86_64 sparc32 sparc64 140CONFIG = debug profile release 141PUBLISH = scm pubtools 142REPORTS = bindir targdir osdir config compilers architecture architectures 143PASSTHRUS = \ 144 out \ 145 CC $(COMPILERS) \ 146 $(ARCHITECTURES) \ 147 $(CONFIG) $(PUBLISH) \ 148 purify purecov \ 149 local static dynamic 150 151$(RHOSTS): 152 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env local 153 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env require-proxy-exec 154 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@ 155 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env rebuild-dirlinks config 156 157$(PASSTHRUS): 158 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@ 159 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env rebuild-dirlinks config 160 161$(REPORTS): 162 @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@ 163 164.PHONY: $(PASSTHRUS) $(RHOSTS) $(REPORTS) 165 166 167#------------------------------------------------------------------------------- 168# configuration help 169# 170help configure: 171 @ echo "Before initial build, run './configure --build-prefix=<out>' from" 172 @ echo "the project root to set the output directory of your builds." 173 @ echo 174 @ echo "To select a compiler, run 'make <comp>' where" 175 @ echo "comp = { "$(COMPILERS)" }." 176 @ echo 177 @ echo "For hosts that support cross-compilation ( only Macintosh today )," 178 @ echo "you can run 'make <arch>' where arch = { "$(ARCHITECTURES)" }." 179 @ echo 180 @ echo "To set a build configuration, run 'make <config>' where" 181 @ echo "config = { "$(CONFIG)" }." 182 @ echo 183 @ echo "To select a remote build configuration, run 'make <rhost>' where" 184 @ echo "rhost = { "$(RHOSTS)" }." 185 @ echo 186 187.PHONY: help configure 188