PreparationInstall Xcode/JDK/Homebrew as the XDA post mentioned. However, the installation of Xcode is not really necessary. It saves you some work, though. The CommandLineTools is enough to finish the build if you manually set the variable mac_sdk_version in build/code/combo/HOST_darwin-x86.mk instead of obtaining it from xcodebuild.
Download prebuilt kernel/proprietary files for hammerhead
Sync or download from Google sitegit clone https://android.googlesource.com/device/lge/hammerhead-kernel
This is a long process. If you don't want to waste time, just download the vmlinux.bz2 and zImage-dtb.
Set TARGET_PREBUILT_KERNEL to your download location.
Just download and extract.
build/core/combo/HOST_darwin-x86.mkThe first change is to add 10.9 to the variable mac_sdk_verions_supported.
The second change is to instruct build system to use the correct toolchain (missing stdarg.h in 10.8+). This is different from what was recommended in the XDA post.
The third change is to use gstat instead of stat.
# $(1): The file to check define get-file-size GSTAT=$(which gstat) ; \ if [ ! -z "$GSTAT" ]; then \ gstat -c "%s" $(1) ; \ else \ stat -f "%z" $(1) ; \ fi endef
BuildAs https://github.com/AOSPA/manifest says,