| 1 |
# Top level Makefile for Infernal |
| 2 |
# |
| 3 |
# On most systems, to build Infernal you should only need: |
| 4 |
# % ./configure; make |
| 5 |
# |
| 6 |
# Optionally, you can run a test suite: |
| 7 |
# % make check |
| 8 |
# |
| 9 |
# And optionally, you can install everything more permanently: |
| 10 |
# % make install |
| 11 |
# |
| 12 |
# For more information, see the Installation chapter of the Infernal |
| 13 |
# User's Guide. |
| 14 |
# |
| 15 |
|
| 16 |
|
| 17 |
# VPATH and shell configuration |
| 18 |
# |
| 19 |
top_srcdir = @top_srcdir@ |
| 20 |
srcdir = @srcdir@ |
| 21 |
VPATH = @srcdir@ |
| 22 |
SHELL = /bin/sh |
| 23 |
|
| 24 |
ESLDIR = @INFERNAL_ESLDIR@ |
| 25 |
HMMERDIR = @INFERNAL_HMMERDIR@ |
| 26 |
SADIR = @INFERNAL_SADIR@ |
| 27 |
|
| 28 |
# impl directory (currently only either 'impl_sse' or '') |
| 29 |
IMPLDIR = @INFERNAL_IMPLDIR@ |
| 30 |
|
| 31 |
# Package information |
| 32 |
# |
| 33 |
PACKAGE = @PACKAGE_NAME@ |
| 34 |
PACKAGE_VERSION = @PACKAGE_VERSION@ |
| 35 |
PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
| 36 |
|
| 37 |
# Installation targets |
| 38 |
# |
| 39 |
prefix = @prefix@ |
| 40 |
exec_prefix = @exec_prefix@ |
| 41 |
datarootdir = @datarootdir@ |
| 42 |
bindir = @bindir@ |
| 43 |
libdir = @libdir@ |
| 44 |
includedir = @includedir@ |
| 45 |
docdir = @docdir@ |
| 46 |
pdfdir = @pdfdir@ |
| 47 |
mandir = @mandir@ |
| 48 |
man1dir = ${mandir}/man1 |
| 49 |
man1ext = .1 |
| 50 |
|
| 51 |
# Compiler configuration |
| 52 |
# |
| 53 |
CC = @CC@ |
| 54 |
CFLAGS = @CFLAGS@ |
| 55 |
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ |
| 56 |
NEON_CFLAGS = @NEON_CFLAGS@ |
| 57 |
SSE_CFLAGS = @SSE_CFLAGS@ |
| 58 |
VMX_CFLAGS = @VMX_CFLAGS@ |
| 59 |
LDFLAGS = -static @LDFLAGS@ |
| 60 |
CPPFLAGS = @CPPFLAGS@ |
| 61 |
|
| 62 |
# Other tools |
| 63 |
# |
| 64 |
AR = @AR@ |
| 65 |
RANLIB = @RANLIB@ |
| 66 |
INSTALL = @INSTALL@ |
| 67 |
|
| 68 |
# beautification magic stolen from git |
| 69 |
# |
| 70 |
QUIET_SUBDIR0 = +${MAKE} -C #space separator after -c |
| 71 |
QUIET_SUBDIR1 = |
| 72 |
ifndef V |
| 73 |
QUIET = @ |
| 74 |
QUIET_CC = @echo ' ' CC $@; |
| 75 |
QUIET_GEN = @echo ' ' GEN $@; |
| 76 |
QUIET_AR = @echo ' ' AR $@; |
| 77 |
QUIET_SUBDIR0 = +@subdir= |
| 78 |
QUIET_SUBDIR1 = ; echo ' ' SUBDIR $$subdir; \ |
| 79 |
${MAKE} -C $$subdir |
| 80 |
endif |
| 81 |
|
| 82 |
# Programs installed by Infernal |
| 83 |
# |
| 84 |
PROGS = cmalign\ |
| 85 |
cmbuild\ |
| 86 |
cmcalibrate\ |
| 87 |
cmemit\ |
| 88 |
cmfetch\ |
| 89 |
cmscan\ |
| 90 |
cmsearch\ |
| 91 |
cmstat |
| 92 |
|
| 93 |
SSEPROGS = sse_cmsearch\ |
| 94 |
cmsearch_dual |
| 95 |
|
| 96 |
.PHONY: all dev check pdf install uninstall clean distclean TAGS |
| 97 |
|
| 98 |
# all: Compile all documented executables. |
| 99 |
# (Excludes test programs.) |
| 100 |
# |
| 101 |
all: |
| 102 |
${QUIET_SUBDIR0}${ESLDIR} ${QUIET_SUBDIR1} all |
| 103 |
${QUIET_SUBDIR0}${SADIR} ${QUIET_SUBDIR1} all |
| 104 |
${QUIET_SUBDIR0}${HMMERDIR} ${QUIET_SUBDIR1} all |
| 105 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} all |
| 106 |
${QUIET_SUBDIR0}rmark ${QUIET_SUBDIR1} all |
| 107 |
ifdef IMPLDIR |
| 108 |
${QUIET_SUBDIR0}src/impl_sse ${QUIET_SUBDIR1} all |
| 109 |
endif |
| 110 |
|
| 111 |
# dev: compile all executables, including drivers. |
| 112 |
# |
| 113 |
dev: |
| 114 |
${QUIET_SUBDIR0}${ESLDIR} ${QUIET_SUBDIR1} dev |
| 115 |
${QUIET_SUBDIR0}${SADIR} ${QUIET_SUBDIR1} all |
| 116 |
${QUIET_SUBDIR0}${HMMERDIR} ${QUIET_SUBDIR1} dev |
| 117 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} dev |
| 118 |
${QUIET_SUBDIR0}rmark ${QUIET_SUBDIR1} all |
| 119 |
|
| 120 |
# tests: compile all test drivers for 'make check' |
| 121 |
# |
| 122 |
tests: |
| 123 |
${QUIET_SUBDIR0}${ESLDIR} ${QUIET_SUBDIR1} tests |
| 124 |
${QUIET_SUBDIR0}${SADIR} ${QUIET_SUBDIR1} all |
| 125 |
${QUIET_SUBDIR0}${HMMERDIR} ${QUIET_SUBDIR1} tests |
| 126 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} tests |
| 127 |
|
| 128 |
# check: Run test suites. |
| 129 |
# |
| 130 |
# We do a 'check' in HMMERDIR/testsuite, not HMMERDIR/ because we |
| 131 |
# don't need to run the Easel testsuite twice. |
| 132 |
# |
| 133 |
check: |
| 134 |
@command -v python3 >/dev/null 2>&1 || { echo >&2 "python3 is required for 'make check', but is not in your PATH. Aborting."; exit 1; } |
| 135 |
${QUIET_SUBDIR0}${ESLDIR} ${QUIET_SUBDIR1} tests |
| 136 |
${QUIET_SUBDIR0}${SADIR} ${QUIET_SUBDIR1} all |
| 137 |
${QUIET_SUBDIR0}${HMMERDIR} ${QUIET_SUBDIR1} tests |
| 138 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} tests |
| 139 |
${QUIET_SUBDIR0}${ESLDIR} ${QUIET_SUBDIR1} check |
| 140 |
${QUIET_SUBDIR0}${HMMERDIR}/testsuite ${QUIET_SUBDIR1} check |
| 141 |
${QUIET_SUBDIR0}testsuite ${QUIET_SUBDIR1} check |
| 142 |
|
| 143 |
# devcheck: Run Infernal developer test suite (slower, but more comprehensive than 'check'). |
| 144 |
# |
| 145 |
devcheck: |
| 146 |
@command -v python3 >/dev/null 2>&1 || { echo >&2 "python3 is required for 'make devcheck', but is not in your PATH. Aborting."; exit 1; } |
| 147 |
${QUIET_SUBDIR0}testsuite ${QUIET_SUBDIR1} devcheck |
| 148 |
|
| 149 |
# pdf: compile the User Guides. |
| 150 |
# |
| 151 |
pdf: |
| 152 |
${QUIET_SUBDIR0}documentation ${QUIET_SUBDIR1} pdf |
| 153 |
|
| 154 |
# install: installs the binaries in ${bindir}/ |
| 155 |
# When man pages are done, will install man pages in MANDIR/man1/ (e.g. if MANSUFFIX is 1) |
| 156 |
# Creates these directories if they don't exist. |
| 157 |
# Prefix those paths with ${DESTDIR} (rarely used, usually null; |
| 158 |
# may be set on a make command line when building contrib RPMs). |
| 159 |
install: |
| 160 |
${INSTALL} -d ${DESTDIR}${bindir} |
| 161 |
${INSTALL} -d ${DESTDIR}${man1dir} |
| 162 |
${INSTALL} -d ${DESTDIR}${pdfdir} |
| 163 |
# src 'install' moves into impl_sse and does 'install' (if IMPLDIR is defined (system has SSE)) |
| 164 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} install |
| 165 |
${QUIET_SUBDIR0}documentation ${QUIET_SUBDIR1} install |
| 166 |
|
| 167 |
# uninstall: Reverses the steps of "make install". |
| 168 |
# |
| 169 |
uninstall: |
| 170 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} uninstall |
| 171 |
${QUIET_SUBDIR0}documentation ${QUIET_SUBDIR1} uninstall |
| 172 |
|
| 173 |
# "make clean" removes almost everything except configuration files. |
| 174 |
# |
| 175 |
clean: |
| 176 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} clean |
| 177 |
${QUIET_SUBDIR0}rmark ${QUIET_SUBDIR1} clean |
| 178 |
${QUIET_SUBDIR0}testsuite ${QUIET_SUBDIR1} clean |
| 179 |
${QUIET_SUBDIR0}documentation ${QUIET_SUBDIR1} clean |
| 180 |
${QUIET_SUBDIR0}${HMMERDIR} ${QUIET_SUBDIR1} clean |
| 181 |
${QUIET_SUBDIR0}${ESLDIR} ${QUIET_SUBDIR1} clean |
| 182 |
${QUIET}-rm -f *.o *~ Makefile.bak core TAGS TAGS.part gmon.out |
| 183 |
ifndef V |
| 184 |
@echo ' ' CLEAN infernal |
| 185 |
endif |
| 186 |
|
| 187 |
# "make distclean" leaves a pristine source distribution. |
| 188 |
# |
| 189 |
distclean: |
| 190 |
${QUIET_SUBDIR0}src ${QUIET_SUBDIR1} distclean |
| 191 |
${QUIET_SUBDIR0}rmark ${QUIET_SUBDIR1} distclean |
| 192 |
${QUIET_SUBDIR0}testsuite ${QUIET_SUBDIR1} distclean |
| 193 |
${QUIET_SUBDIR0}documentation ${QUIET_SUBDIR1} distclean |
| 194 |
${QUIET_SUBDIR0}${HMMERDIR} ${QUIET_SUBDIR1} distclean |
| 195 |
# no need to distclean in easel/ because distclean in hmmer/ already did that (and easel/Makefile has been deleted) |
| 196 |
${QUIET}-rm -f config.log config.status |
| 197 |
${QUIET}-rm -rf autom4te.cache |
| 198 |
${QUIET}-rm -f *.o *~ Makefile.bak core TAGS TAGS.part gmon.out |
| 199 |
${QUIET}-rm -f cscope.po.out cscope.out cscope.in.out cscope.files |
| 200 |
${QUIET}-rm -f release-notes/LICENSE.sh |
| 201 |
${QUIET}-rm -f src/impl |
| 202 |
${QUIET}-rm Makefile |
| 203 |
ifndef V |
| 204 |
@echo ' ' CLEAN infernal |
| 205 |
endif |
| 206 |
|
| 207 |
# "make TAGS": emacs etags database, for searching the whole source tree. |
| 208 |
TAGS: |
| 209 |
./makeTAGS.sh |
| 210 |
|
| 211 |
|
| 212 |
|