title: Building CyanogenMod from source: make: no rule to make target *.so, needed by *.so
body: <p>I am building AOSP form source, and have made a few modifications to vendor files that are, apparently, not liked by Make. Here is the error I am getting, which involves one of my shiny new files:</p>
  
  <p>make: *** No rule to make target <code>vendor/lge/g4stylus-common/proprietary/lib/hw/camera/camera.msm8916.so', needed by</code>/home/brady/android/system/out/target/product/h631/system/lib/hw/camera.msm8916.so'.  Stop.</p>
  
  <p>How can I resolve this error?</p>
  
  <p>Here is my vendor/lge/g4stylus-common/Android.mk, with an attempted fix:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code># Copyright (C) 2015 The CyanogenMod Project
  #
  # 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.
  
  # This file is generated by device/lge/g4stylus-common/setup-makefiles.sh
  
  LOCAL_PATH := $(call my-dir)
  
  ifneq ($(filter h631 ms631,$(TARGET_DEVICE)),)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := com.qualcomm.location
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/priv-app/com.qualcomm.location/com.qualcomm.location.apk
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
  LOCAL_MODULE_CLASS := APPS
  LOCAL_CERTIFICATE := platform
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := qcrilmsgtunnel
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/app/qcrilmsgtunnel/qcrilmsgtunnel.apk
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
  LOCAL_MODULE_CLASS := APPS
  LOCAL_CERTIFICATE := platform
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := camera.msm8916
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/lib/hw/camera/camera.msm8916.so
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := .so
  LOCAL_MODULE_CLASS := SHARED_LIBRARIES
  LOCAL_CERTIFICATE := platform
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := shutdownlistener
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/app/shutdownlistener/shutdownlistener.apk
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
  LOCAL_MODULE_CLASS := APPS
  LOCAL_CERTIFICATE := platform
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := TimeService
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
  LOCAL_MODULE_CLASS := APPS
  LOCAL_CERTIFICATE := platform
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := qcnvitems
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/framework/qcnvitems.jar
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
  LOCAL_MODULE_CLASS := JAVA_LIBRARIES
  LOCAL_CERTIFICATE := PRESIGNED
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := qcrilhook
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/framework/qcrilhook.jar
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
  LOCAL_MODULE_CLASS := JAVA_LIBRARIES
  LOCAL_CERTIFICATE := PRESIGNED
  include $(BUILD_PREBUILT)
  
  include $(CLEAR_VARS)
  LOCAL_MODULE := libtime_genoff
  LOCAL_MODULE_OWNER := lge
  LOCAL_SRC_FILES := proprietary/vendor/lib/libtime_genoff.so
  LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)
  LOCAL_MODULE_TAGS := optional
  LOCAL_MODULE_SUFFIX := .so
  LOCAL_MODULE_CLASS := SHARED_LIBRARIES
  include $(BUILD_PREBUILT)
  
  endif</code></pre>
  </div>
  </div>
  </p>