Home | History | Annotate | Download | only in nanopb-c
      1 # 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 
     17 LOCAL_PATH := $(call my-dir)
     18 
     19 IGNORED_WARNINGS := -Wno-sign-compare -Wno-unused-parameter
     20 
     21 # nanopb_c library
     22 # =======================================================
     23 nanopb_c_src_files := \
     24     pb_decode.c \
     25     pb_encode.c
     26 
     27 include $(CLEAR_VARS)
     28 
     29 LOCAL_MODULE := libprotobuf-c-nano
     30 LOCAL_MODULE_TAGS := optional
     31 LOCAL_C_EXTENSION := .c
     32 LOCAL_SRC_FILES := $(nanopb_c_src_files)
     33 LOCAL_C_INCLUDES := \
     34     $(LOCAL_PATH)/ \
     35 
     36 LOCAL_CFLAGS := $(IGNORED_WARNINGS)
     37 
     38 LOCAL_SDK_VERSION := 19
     39 
     40 include $(BUILD_STATIC_LIBRARY)
     41 
     42 # nanopb_c library with PB_ENABLE_MALLOC enabled
     43 
     44 include $(CLEAR_VARS)
     45 
     46 LOCAL_MODULE := libprotobuf-c-nano-enable_malloc
     47 LOCAL_MODULE_TAGS := optional
     48 LOCAL_C_EXTENSION := .c
     49 LOCAL_SRC_FILES := $(nanopb_c_src_files)
     50 LOCAL_C_INCLUDES := \
     51     $(LOCAL_PATH)/ \
     52 
     53 LOCAL_CFLAGS := $(IGNORED_WARNINGS) -DPB_ENABLE_MALLOC
     54 
     55 LOCAL_SDK_VERSION := 19
     56 
     57 include $(BUILD_STATIC_LIBRARY)
     58 
     59 # =======================================================
     60 
     61 # Clean temp vars
     62 nanopb_c_src_files :=
     63