Android.mk: only build if device files are defined
authorPaul Kocialkowski <contact@paulk.fr>
Sun, 26 Aug 2012 20:45:26 +0000 (22:45 +0200)
committerPaul Kocialkowski <contact@paulk.fr>
Sun, 26 Aug 2012 20:45:26 +0000 (22:45 +0200)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Android.mk

index ad5da7e..beca194 100644 (file)
@@ -42,15 +42,17 @@ ifeq ($(TARGET_DEVICE),dream_sapphire)
        LOCAL_C_INCLUDES += $(LOCAL_PATH)/device/dream_sapphire/
 endif
 
-LOCAL_SRC_FILES := $(hayes_ril_files) $(hayes_ril_device_files)
-LOCAL_SHARED_LIBRARIES += libcutils libutils libril
-LOCAL_PRELINK_MODULE := false
+ifneq ($(hayes_ril_device_files),)
+       LOCAL_SRC_FILES := $(hayes_ril_files) $(hayes_ril_device_files)
+       LOCAL_SHARED_LIBRARIES += libcutils libutils libril
+       LOCAL_PRELINK_MODULE := false
 
-LOCAL_C_INCLUDES += $(KERNEL_HEADERS) $(LOCAL_PATH)
-LOCAL_LDLIBS += -lpthread
-LOCAL_CFLAGS += -DRIL_SHLIB -D_GNU_SOURCE
+       LOCAL_C_INCLUDES += $(KERNEL_HEADERS) $(LOCAL_PATH)
+       LOCAL_LDLIBS += -lpthread
+       LOCAL_CFLAGS += -DRIL_SHLIB -D_GNU_SOURCE
 
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE:= libhayes-ril
+       LOCAL_MODULE_TAGS := optional
+       LOCAL_MODULE := libhayes-ril
 
-include $(BUILD_SHARED_LIBRARY)
+       include $(BUILD_SHARED_LIBRARY)
+endif