From: Denis 'GNUtoo' Carikli Date: Sat, 25 Aug 2012 16:57:40 +0000 (+0200) Subject: Fix the compile issues when no device is defined. X-Git-Url: http://git.legacy.paulk.fr/gitweb/?p=hayes-ril.git;a=commitdiff_plain;h=292c5facfe1fb1f0c6e560192230d4fc6e46353f Fix the compile issues when no device is defined. Without that fix we have: prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/crespo/obj/SHARED_LIBRARIES/libhayes-ril_intermediates/hayes-ril.o: in function RIL_Init:hardware/ril/hayes-ril/hayes-ril.c:200: error: undefined reference to 'ril_device_register' Signed-off-by: Denis 'GNUtoo' Carikli --- diff --git a/Android.mk b/Android.mk index ad5da7e..3728f87 100644 --- a/Android.mk +++ b/Android.mk @@ -30,16 +30,14 @@ hayes_ril_files := \ ifeq ($(TARGET_DEVICE),gta04) hayes_ril_device_files := device/gta04/gta04.c LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/gta04/ -endif - -ifeq ($(TARGET_DEVICE),passion) +elsif ($(TARGET_DEVICE),passion) hayes_ril_device_files := device/passion/passion.c LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/passion/ -endif - -ifeq ($(TARGET_DEVICE),dream_sapphire) +elsif ($(TARGET_DEVICE),dream_sapphire) hayes_ril_device_files := device/dream_sapphire/dream_sapphire.c LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/dream_sapphire/ +else + hayes_ril_device_files := device/dummy/dummy.c endif LOCAL_SRC_FILES := $(hayes_ril_files) $(hayes_ril_device_files) diff --git a/device/dummy/dummy.c b/device/dummy/dummy.c new file mode 100644 index 0000000..46b6381 --- /dev/null +++ b/device/dummy/dummy.c @@ -0,0 +1,41 @@ +/* + * This file is part of hayes-ril. + * + * Copyright (C) 2012 Paul Kocialkowski + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include + +#define LOG_TAG "RIL-DEV" +#include + +#include + +struct ril_device dummy_device = { + .name = "Dummy", + .tag = "DUMMY", + .type = DEV_GSM, + .sdata = NULL, + .handlers = NULL, +}; + +void ril_device_register(struct ril_device **ril_device_p) +{ + *ril_device_p = &dummy_device; +}