Q:

Error in making custom application part of android Operating System

I am trying to make my application part of android OS, i downloaded the CyanogenMod (CM7) and compiled it successfully, i am following instructions from here: 
The name of the application is "HitMe".
Here are the steps which i followed:

cd Cyanogen/packages/apps
ln -s /home/usama/Desktop/HitMe
cd HitMe
Copy the Android.mk file , this is the Android.mk file
LOCAL_PATH := $(call my-dir)
include $((CLEAR_VARS)
Build all java files in the java subdirectory (there is # in the start, its a comment)
LOCAL_SRC_FILES := $(call all -subdir -java-files)
Name of the APK to build (there is # in the start, its a comment)
LOCAL_PACKAGE_NAME := HitMe
include $(BUILD_PACKAGE)
rm -rf bin gen
cd Cyanogen/Build/target/product
add "HitMe /" in the core.mk file
cd Cyanogen/packages/apps/HitMe
mm
And i got this error:
usama@ubuntu:~/Desktop/Cyanogen/packages/apps$ cd HitMe
usama@ubuntu:~/Desktop/Cyanogen/packages/apps/HitMe$ mm
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
make: Entering directory /home/usama/Desktop/Cyanogen'
  make: *** No rule to make targetout/target/common/obj/APPS/framework-      res_intermediates/src/R.stamp', needed by `out/target/common/obj/APPS/LocalPackage_intermediates/src/R.stamp'.  Stop.

I thought this would only be happening with my application, but i tried this with DSPManager(which came as a service in CM-7) and i got the exact same error, here is the output of terminal
  usama@ubuntu:~/Desktop/Cyanogen/packages/apps/DSPManager$ mm
  ============================================
  PLATFORM_VERSION_CODENAME=REL
  PLATFORM_VERSION=2.3.7
  TARGET_PRODUCT=full
  TARGET_BUILD_VARIANT=eng
  TARGET_SIMULATOR=
  TARGET_BUILD_TYPE=release
  TARGET_BUILD_APPS=
  TARGET_ARCH=arm
  TARGET_ARCH_VARIANT=armv7-a
  HOST_ARCH=x86
  HOST_OS=linux
  HOST_BUILD_TYPE=release
  BUILD_ID=GINGERBREAD
  ============================================
  make: Entering directory `/home/usama/Desktop/Cyanogen'
  make: *** No rule to make target `out/target/common/obj/APPS/framework-      res_intermediates/src/R.stamp', needed by `out/target/common/obj/APPS/DSPManager_intermediates/src/R.stamp'.  Stop.

make: Leaving directory `/home/usama/Desktop/Cyanogen'
usama@ubuntu:~/Desktop/Cyanogen/packages/apps/DSPManager$ 
Any idea, about how this can be resolved ?

A:

a m (I guess) or make is required before you can build subpackages. 
It complains that there is no out/target/common/obj/APPS/framework (that's the core android framework) which you don't have unless you do a complete build first.
You can then build parts of the whole project
~/Desktop/Cyanogen$ m

