pull/317/head
parent
e1432dd91a
commit
91fc08c641
@ -1,22 +1,15 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
WHISPER_LIB_DIR := $(LOCAL_PATH)/../../../../../../../
|
|
||||||
LOCAL_LDLIBS := -llog
|
|
||||||
LOCAL_MODULE := libwhisper
|
LOCAL_MODULE := libwhisper
|
||||||
|
include $(LOCAL_PATH)/Whisper.mk
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
# Make the final output library smaller by only keeping the symbols referenced from the app.
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
ifneq ($(APP_OPTIM),debug)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
|
LOCAL_MODULE := libwhisper_vfpv4
|
||||||
LOCAL_CFLAGS += -ffunction-sections -fdata-sections
|
include $(LOCAL_PATH)/Whisper.mk
|
||||||
LOCAL_LDFLAGS += -Wl,--gc-sections
|
# Allow building NEON FMA code.
|
||||||
LOCAL_LDFLAGS += -Wl,--exclude-libs,ALL
|
# https://android.googlesource.com/platform/ndk/+/master/sources/android/cpufeatures/cpu-features.h
|
||||||
LOCAL_LDFLAGS += -flto
|
LOCAL_CFLAGS += -mfpu=neon-vfpv4
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_CFLAGS += -DSTDC_HEADERS -std=c11 -I $(WHISPER_LIB_DIR)
|
|
||||||
LOCAL_CPPFLAGS += -std=c++11
|
|
||||||
LOCAL_SRC_FILES := $(WHISPER_LIB_DIR)/ggml.c \
|
|
||||||
$(WHISPER_LIB_DIR)/whisper.cpp \
|
|
||||||
$(LOCAL_PATH)/jni.c
|
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -0,0 +1,18 @@
|
|||||||
|
WHISPER_LIB_DIR := $(LOCAL_PATH)/../../../../../../../
|
||||||
|
LOCAL_LDLIBS := -llog
|
||||||
|
|
||||||
|
# Make the final output library smaller by only keeping the symbols referenced from the app.
|
||||||
|
ifneq ($(APP_OPTIM),debug)
|
||||||
|
LOCAL_CFLAGS += -O3
|
||||||
|
LOCAL_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
|
||||||
|
LOCAL_CFLAGS += -ffunction-sections -fdata-sections
|
||||||
|
LOCAL_LDFLAGS += -Wl,--gc-sections
|
||||||
|
LOCAL_LDFLAGS += -Wl,--exclude-libs,ALL
|
||||||
|
LOCAL_LDFLAGS += -flto
|
||||||
|
endif
|
||||||
|
|
||||||
|
LOCAL_CFLAGS += -DSTDC_HEADERS -std=c11 -I $(WHISPER_LIB_DIR)
|
||||||
|
LOCAL_CPPFLAGS += -std=c++11
|
||||||
|
LOCAL_SRC_FILES := $(WHISPER_LIB_DIR)/ggml.c \
|
||||||
|
$(WHISPER_LIB_DIR)/whisper.cpp \
|
||||||
|
$(LOCAL_PATH)/jni.c
|
Loading…
Reference in new issue