Skip to content

Commit

Permalink
Update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
agnieszkadanek authored Nov 11, 2020
1 parent 490fd6c commit 58401ce
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ endif
ifeq ($(uname_S),Linux)
# check if CPU supports AVX2
HAVE_AVX2=$(filter-out 0,$(shell grep avx2 /proc/cpuinfo | wc -l))
OMP_FLAGS = -fopenmp
ABI_FLAGS = -fabi-version=6
endif
ifeq ($(uname_S),Darwin)
# check if CPU supports SSE4.2
HAVE_AVX2=$(filter-out 0,$(shell sysctl machdep.cpu.features| grep AVX2 - | wc -l))
OMP_FLAGS = -Xpreprocessor -fopenmp
ABI_FLAGS =
endif


## ###################
KMER_DB_ROOT_DIR = .
KMER_DB_MAIN_DIR = src
Expand All @@ -32,15 +35,6 @@ else
EXTRA_LIBS_DIR = ""
endif

OS_NAME := $(shell uname -s)
ifeq ($(OS_NAME), Darwin)
OMP_FLAGS = -Xpreprocessor -fopenmp
ABI_FLAGS =
else
OMP_FLAGS = -fopenmp
ABI_FLAGS = -fabi-version=6
endif


CC = g++
LDFLAGS +=
Expand All @@ -49,6 +43,7 @@ CFLAGS_AVX2 += $(CFLAGS) -mavx2 -I $(KMER_DB_LIBS_DIR) -I $(EXTRA_LIBS_DIR)
CFLAGS += -mavx -I $(KMER_DB_LIBS_DIR) -I $(EXTRA_LIBS_DIR)
CLINK = -lm -O3 -std=c++11 -lpthread $(OMP_FLAGS) -mavx $(ABI_FLAGS) -lz


OBJS := $(KMER_DB_MAIN_DIR)/analyzer.o \
$(KMER_DB_MAIN_DIR)/console.o \
$(KMER_DB_MAIN_DIR)/instrset_detect.o \
Expand Down

0 comments on commit 58401ce

Please sign in to comment.