Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable compilation on FreeBSD + clang. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ bindir = $(prefix)/bin
SEQAN_DIR = SeqAn-1.1
SEQAN_INC = -I $(SEQAN_DIR)
INC = $(SEQAN_INC) -I third_party
CPP = g++
CXX = $(CPP)
CC = gcc
CPP ?= g++
CXX ?= $(CPP)
CC ?= gcc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part is useful. Not only when building by clang but also building by gcc-N compiler.

HEADERS = $(wildcard *.h)
BOWTIE_MM = 1
BOWTIE_SHARED_MEM = 1
Expand Down Expand Up @@ -61,6 +61,12 @@ ifneq (,$(findstring Linux,$(shell uname)))
EXTRA_FLAGS += -Wl,--hash-style=both
endif

FREEBSD = 0
ifneq (,$(findstring FreeBSD,$(shell uname)))
FREEBSD = 1
EXTRA_FLAGS += -Wl,--hash-style=both
endif

MM_DEF =
ifeq (1,$(BOWTIE_MM))
MM_DEF = -DBOWTIE_MM
Expand Down Expand Up @@ -139,6 +145,12 @@ ifeq (1,$(LINUX))
endif
endif

ifeq (1,$(FREEBSD))
ifeq (amd64, $(shell uname -p))
BITS=64
endif
endif

ifeq (32,$(BITS))
$(error bowtie2 compilation requires a 64-bit platform )
endif
Expand Down