blob: 2cb2b90c3293a38741882cb413947fc0673ab0ef [file] [log] [blame]
Etan Cohen7ef855e2014-08-20 10:11:11 -07001# Copyright (C) 2014 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
17LOCAL_PATH := $(call my-dir)
18
19IGNORED_WARNINGS := -Wno-sign-compare -Wno-unused-parameter
20
21# nanopb_c library
22# =======================================================
23nanopb_c_src_files := \
24 pb_decode.c \
25 pb_encode.c
26
27include $(CLEAR_VARS)
28
29LOCAL_MODULE := libnanopb-c-2.8.0
30LOCAL_MODULE_TAGS := optional
31LOCAL_C_EXTENSION := .c
32LOCAL_SRC_FILES := $(nanopb_c_src_files)
33LOCAL_C_INCLUDES := \
34 $(LOCAL_PATH)/ \
35
36LOCAL_CFLAGS := $(IGNORED_WARNINGS)
37
38LOCAL_SDK_VERSION := 19
39
40include $(BUILD_STATIC_LIBRARY)
41
42# nanopb_c library with PB_ENABLE_MALLOC enabled
43
44include $(CLEAR_VARS)
45
46LOCAL_MODULE := libnanopb-c-2.8.0-enable_malloc
47LOCAL_MODULE_TAGS := optional
48LOCAL_C_EXTENSION := .c
49LOCAL_SRC_FILES := $(nanopb_c_src_files)
50LOCAL_C_INCLUDES := \
51 $(LOCAL_PATH)/ \
52
53LOCAL_CFLAGS := $(IGNORED_WARNINGS) -DPB_ENABLE_MALLOC
54
55LOCAL_SDK_VERSION := 19
56
57include $(BUILD_STATIC_LIBRARY)
58
59# =======================================================
60
61# Clean temp vars
62nanopb_c_src_files :=
63