forked from Azure-Samples/cognitive-services-speech-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (26 loc) · 1.21 KB
/
Makefile
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
#
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
#
# Microsoft Cognitive Services Speech SDK - Quickstart for Linux and C++
#
# Check out https://aka.ms/csspeech for documentation.
#
SPEECHSDK_ROOT:=/change/to/point/to/extracted/SpeechSDK
CHECK_FOR_SPEECHSDK := $(shell test -f $(SPEECHSDK_ROOT)/lib/x64/libMicrosoft.CognitiveServices.Speech.core.so && echo Success)
ifneq ("$(CHECK_FOR_SPEECHSDK)","Success")
$(error Please set SPEECHSDK_ROOT to point to your extracted Speech SDK, $$SPEECHSDK_ROOT/lib/x64/libMicrosoft.CognitiveServices.Speech.core.so should exist.)
endif
# If you'd like to build for 32-bit Linux, replace "x64" in the next line with "x86".
TARGET_PLATFORM:=x64
LIBPATH:=$(SPEECHSDK_ROOT)/lib/$(TARGET_PLATFORM)
INCPATH:=$(SPEECHSDK_ROOT)/include/cxx_api $(SPEECHSDK_ROOT)/include/c_api
LIBS:=-lMicrosoft.CognitiveServices.Speech.core -lpthread -l:libssl.so.1.0.0 -l:libasound.so.2
all: helloworld
# Note: to run, LD_LIBRARY_PATH should point to $LIBPATH.
helloworld: helloworld.cpp
g++ $< -o $@ \
--std=c++14 \
$(patsubst %,-I%, $(INCPATH)) \
$(patsubst %,-L%, $(LIBPATH)) \
$(LIBS)