blob: 94ba82bae27b509213b1c73e7baa1cff899ec279 [file] [log] [blame]
Matt Sharifibda09f12017-03-10 12:29:15 +01001# Copyright (C) 2017 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# ------------------------
16# libtextclassifier_protos
17# ------------------------
18
19LOCAL_PATH := $(call my-dir)
20include $(CLEAR_VARS)
21
22LOCAL_MODULE := libtextclassifier_protos
23
24LOCAL_SRC_FILES := $(call all-proto-files-under, .)
25LOCAL_SHARED_LIBRARIES := libprotobuf-cpp-lite
26
27include $(BUILD_STATIC_LIBRARY)
28
29# -----------------
30# libtextclassifier
31# -----------------
32
33include $(CLEAR_VARS)
34LOCAL_MODULE := libtextclassifier
35
36LOCAL_CPP_EXTENSION := .cc
37LOCAL_CFLAGS += -Wno-unused-parameter \
38 -Wno-sign-compare \
39 -Wno-missing-field-initializers \
40 -Wno-ignored-qualifiers \
41 -Wno-undefined-var-template
42
43LOCAL_SRC_FILES := $(patsubst ./%,%, $(shell cd $(LOCAL_PATH); \
44 find . -name "*.cc" -and -not -name ".*"))
45LOCAL_C_INCLUDES += .
46LOCAL_C_INCLUDES += $(generated_sources_dir)/proto/external/libtextclassifier
47
48LOCAL_SHARED_LIBRARIES := libprotobuf-cpp-lite
49LOCAL_STATIC_LIBRARIES := libtextclassifier_protos
Abodunrinwa Toki61f99dd2017-03-14 18:16:15 +000050LOCAL_REQUIRED_MODULES := textclassifier.langid.model
Matt Sharifibda09f12017-03-10 12:29:15 +010051
52include $(BUILD_SHARED_LIBRARY)
Abodunrinwa Toki61f99dd2017-03-14 18:16:15 +000053
54# ------------
55# LangId model
56# ------------
57
58include $(CLEAR_VARS)
59LOCAL_MODULE := textclassifier.langid.model
60LOCAL_MODULE_CLASS := ETC
61LOCAL_MODULE_TAGS := optional
62LOCAL_MODULE_OWNER := google
63LOCAL_SRC_FILES := ./models/textclassifier.langid.model
64LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/textclassifier
65include $(BUILD_PREBUILT)
66
67# ----------------------
68# Smart Selection models
69# ----------------------
70
71include $(CLEAR_VARS)
72LOCAL_MODULE := textclassifier.smartselection.en.model
73LOCAL_MODULE_CLASS := ETC
74LOCAL_MODULE_TAGS := optional
75LOCAL_MODULE_OWNER := google
76LOCAL_SRC_FILES := ./models/textclassifier.smartselection.en.model
77LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/textclassifier
78include $(BUILD_PREBUILT)
79