forked from kaldi-asr/kaldi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdarwin_10_10.mk
More file actions
45 lines (38 loc) · 1.27 KB
/
darwin_10_10.mk
File metadata and controls
45 lines (38 loc) · 1.27 KB
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
40
41
42
43
44
45
# makefiles/darwin_10_10.mk contains Darwin-specific rules for OS X 10.10.*
ifndef FSTROOT
$(error FSTROOT not defined.)
endif
CXXFLAGS += -msse -msse2 -Wall -I.. \
-pthread \
-DKALDI_DOUBLEPRECISION=0 -DHAVE_POSIX_MEMALIGN \
-Wno-sign-compare -Winit-self \
-DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H \
-DHAVE_CLAPACK \
-I$(FSTROOT)/include \
$(EXTRA_CXXFLAGS) \
-g # -O0 -DKALDI_PARANOID
ifeq ($(KALDI_FLAVOR), dynamic)
CXXFLAGS += -fPIC
endif
LDFLAGS = -g
LDLIBS = $(EXTRA_LDLIBS) $(FSTROOT)/lib/libfst.a -ldl -lm -lpthread -framework Accelerate
CXX = g++
CC = $(CXX)
RANLIB = ranlib
AR = ar
# Add no-mismatched-tags flag to suppress the annoying clang warnings
# that are perfectly valid per spec.
COMPILER = $(shell $(CXX) -v 2>&1 )
ifeq ($(findstring clang,$(COMPILER)),clang)
CXXFLAGS += -Wno-mismatched-tags
# Link with libstdc++ if we are building against OpenFst < 1.4
ifneq ("$(OPENFST_GE_10400)","1")
CXXFLAGS += -stdlib=libstdc++
LDFLAGS += -stdlib=libstdc++
endif
endif
# We need to tell recent versions of g++ to allow vector conversions without
# an explicit cast provided the vectors are of the same size.
ifeq ($(findstring GCC,$(COMPILER)),GCC)
CXXFLAGS += -flax-vector-conversions -Wno-unused-local-typedefs
endif