Blame view

src/makefiles/darwin.mk 1.1 KB
8dcb6dfcb   Yannick Estève   first commit
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
  # Darwin (macOS) configuration
  
  ifndef DOUBLE_PRECISION
  $(error DOUBLE_PRECISION not defined.)
  endif
  ifndef OPENFSTINC
  $(error OPENFSTINC not defined.)
  endif
  ifndef OPENFSTLIBS
  $(error OPENFSTLIBS not defined.)
  endif
  
  CXXFLAGS = -std=c++11 -I.. -I$(OPENFSTINC) -O1 $(EXTRA_CXXFLAGS) \
             -Wall -Wno-sign-compare -Wno-unused-local-typedefs \
             -Wno-deprecated-declarations -Winit-self \
             -DKALDI_DOUBLEPRECISION=$(DOUBLE_PRECISION) \
             -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK \
             -msse -msse2 -pthread \
             -g # -O0 -DKALDI_PARANOID
  
  ifeq ($(KALDI_FLAVOR), dynamic)
  CXXFLAGS += -fPIC
  endif
  
  # Compiler specific flags
  COMPILER = $(shell $(CXX) -v 2>&1)
  ifeq ($(findstring clang,$(COMPILER)),clang)
  # Suppress annoying clang warnings that are perfectly valid per spec.
  CXXFLAGS += -Wno-mismatched-tags
  else ifeq ($(findstring GCC,$(COMPILER)),GCC)
  # Allow implicit conversions between vectors.
  CXXFLAGS += -flax-vector-conversions
  endif
  
  LDFLAGS = $(EXTRA_LDFLAGS) $(OPENFSTLDFLAGS) -g
  LDLIBS = $(EXTRA_LDLIBS) $(OPENFSTLIBS) -framework Accelerate -lm -lpthread -ldl