--- Makefile.orig 2020-07-24 20:07:54 UTC +++ Makefile @@ -23,9 +23,11 @@ INC = GCC_PREFIX = $(shell dirname `which gcc`) GCC_SUFFIX = -CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX) -CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX) -CXX = $(CPP) +CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX) +CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX) +CXX ?= $(CPP) +INSTALL ?= install + HEADERS = $(wildcard *.h) BOWTIE_MM = 1 BOWTIE_SHARED_MEM = 0 @@ -55,7 +57,7 @@ ifneq (,$(findstring Darwin,$(shell uname))) MACOS = 1 endif -EXTRA_FLAGS += -DPOPCNT_CAPABILITY -std=c++11 +EXTRA_FLAGS += -std=c++11 INC += -I. -I third_party MM_DEF = @@ -152,31 +154,9 @@ HISAT2_REPEAT_CPPS_MAIN = $(REPEAT_CPPS) $(BUILD_CPPS) SEARCH_FRAGMENTS = $(wildcard search_*_phase*.c) VERSION = $(shell cat VERSION) -# Convert BITS=?? to a -m flag -BITS=32 -ifeq (x86_64,$(shell uname -m)) -BITS=64 -endif -# msys will always be 32 bit so look at the cpu arch instead. -ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432))) - ifeq (1,$(MINGW)) - BITS=64 - endif -endif -BITS_FLAG = - -ifeq (32,$(BITS)) - BITS_FLAG = -m32 -endif - -ifeq (64,$(BITS)) - BITS_FLAG = -m64 -endif -SSE_FLAG=-msse2 - DEBUG_FLAGS = -O0 -g3 $(BITS_FLAG) $(SSE_FLAG) DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" -RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3 +RELEASE_FLAGS = $(CXXFLAGS) RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" NOASSERT_FLAGS = -DNDEBUG FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE @@ -553,6 +533,20 @@ doc/manual.inc.html: MANUAL.markdown MANUAL: MANUAL.markdown perl doc/strip_markdown.pl < $^ > $@ + +# Install per filesystem hierarchy standard: +# https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard + +.PHONY: install +install: + mkdir -p ${DESTDIR}${PREFIX}/bin + ${INSTALL} -c -s ${HISAT2_BIN_LIST} ${DESTDIR}${PREFIX}/bin + ${INSTALL} -c hisat2 hisat2-build hisat2-inspect \ + ${DESTDIR}${PREFIX}/bin + + mkdir -p ${DESTDIR}${PREFIX}/libexec/hisat2 + ${INSTALL} -c scripts/*.sh scripts/*.pl scripts/*.py *.py \ + ${DESTDIR}${PREFIX}/libexec/hisat2 .PHONY: clean clean: