AT: Better failure handling and removed wrong unlock
[hayes-ril.git] / Android.mk
1 # This file is part of hayes-ril.
2 #
3 # Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 LOCAL_PATH:= $(call my-dir)
18 include $(CLEAR_VARS)
19
20 hayes_ril_files := \
21         hayes-ril.c \
22         at.c \
23         device.c \
24         utils.c \
25         call.c \
26         power.c \
27         sim.c \
28         network.c
29
30 ifeq ($(TARGET_DEVICE),gta04)
31         hayes_ril_device_files := device/gta04/gta04.c
32         LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/gta04/
33 endif
34
35 ifeq ($(TARGET_DEVICE),passion)
36         hayes_ril_device_files := device/passion/passion.c
37         LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/passion/
38 endif
39
40 ifeq ($(TARGET_DEVICE),dream_sapphire)
41         hayes_ril_device_files := device/dream_sapphire/dream_sapphire.c
42         LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/dream_sapphire/
43 endif
44
45 ifneq ($(hayes_ril_device_files),)
46         LOCAL_SRC_FILES := $(hayes_ril_files) $(hayes_ril_device_files)
47         LOCAL_SHARED_LIBRARIES += libcutils libutils libril
48         LOCAL_PRELINK_MODULE := false
49
50         LOCAL_C_INCLUDES += $(KERNEL_HEADERS) $(LOCAL_PATH)
51         LOCAL_LDLIBS += -lpthread
52         LOCAL_CFLAGS += -DRIL_SHLIB -D_GNU_SOURCE
53
54         LOCAL_MODULE_TAGS := optional
55         LOCAL_MODULE := libhayes-ril
56
57         include $(BUILD_SHARED_LIBRARY)
58 endif