Skip to content
Merged
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
16 changes: 12 additions & 4 deletions src/makefiles/default_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ SHELL := /bin/bash

ifeq ($(KALDI_FLAVOR), dynamic)
ifeq ($(shell uname), Darwin)
ifdef LIBNAME
LIBFILE = lib$(LIBNAME).dylib
ifdef ANDROIDINC # cross-compiling enabled on host MacOS
ifdef LIBNAME
LIBFILE = lib$(LIBNAME).so
endif
LDFLAGS += -Wl,-rpath -Wl,$(KALDILIBDIR)
EXTRA_LDLIBS += $(foreach dep,$(ADDLIBS), $(dir $(dep))$(notdir $(basename $(dep))).a)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised this is .a and not .so

else
ifdef LIBNAME
LIBFILE = lib$(LIBNAME).dylib
endif
LDFLAGS += -Wl,-rpath -Wl,$(KALDILIBDIR)
EXTRA_LDLIBS += $(foreach dep,$(ADDLIBS), $(dir $(dep))lib$(notdir $(basename $(dep))).dylib)
endif
LDFLAGS += -Wl,-rpath -Wl,$(KALDILIBDIR)
EXTRA_LDLIBS += $(foreach dep,$(ADDLIBS), $(dir $(dep))lib$(notdir $(basename $(dep))).dylib)
else ifeq ($(shell uname), Linux)
ifdef LIBNAME
LIBFILE = lib$(LIBNAME).so
Expand Down