To get started with Android, you'll need to get familiar with [Git and Repo] (http://source.android.com/download/using-repo).
To initialize your local repository using the aospX trees, use a command like this:
repo init -u https://github.com/aospx-kitkat/platform_manifest.git -b kitkat
Then to sync up:
repo sync
To build:
. build/envsetup.sh
lunch aosp_hammerhead-userdebug
make -j4 otapackage