-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
39 lines (32 loc) · 1017 Bytes
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CXX = c++
# Absolute path for HIFIR root directory
ifeq ($(HIFIR_HOME),)
HIFIR_DIRS = .. $HOME/.local /usr/local /opt/local
HIFIR_HOME := $(shell for d in $(HIFIR_DIRS); \
do if [ -r $$d/include/hifir.h ]; then echo $$d; break; fi; done)
endif
ifneq ($(HIFIR_HOME),)
CPPFLAGS += -I$(HIFIR_HOME)/include
endif
CXXFLAGS += -fopenmp -fpic -std=c++11
# By default, we disable DEBUG, which disables assertions.
# Set to 1 to enable all assertions and set to 2 to use sanitize of gcc.
ifeq ($(DEBUG),2)
DBGFLAGS += -g -fno-omit-frame-pointer -fsanitize=address -Wall -Wextra
else ifeq ($(DEBUG),1)
DBGFLAGS += -g -DHIF_DEBUG -Wall -Wextra
else
DBGFLAGS += -DNDEBUG -Wall -Wextra
endif
ifeq ($(DEBUG),)
OPTFLAGS += -O3 -ffast-math
endif
CXXFLAGS += $(DBGFLAGS) $(OPTFLAGS)
LIBS = -pthread
LDFLAGS = -rdynamic
# Customize LAPACK libraries
LAPACK_LIB = -llapack -lblas
ifneq ($(LAPACK_LIB),)
# add lapack blas libraries, use generic libraries for testing
LIBS += $(LAPACK_LIB)
endif