[Samsung Gear S] biktor_gj:
I don't have a local manifest file (all my dependencies are met with the device trees I have in Github and once I set them up I forgot about them), but these should gety you going:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="Biktorgj/android_device_samsung_msm8226-common" path="device/samsung/msm8226-common" remote="github" revision="master" />
<project name="Biktorgj/android_device_samsung_pontesolo" path="device/samsung/pontesolo" remote="github" revision="master" />
<project name="Biktorgj/Gear_S_Kernel" path="kernel/samsung/pontesolo" remote="github" revision="master" />
<project name="Biktorgj/vendor_samsung_pontesolo" path="vendor/samsung/pontesolo" remote="github" revision="master" />

<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github"/>
<project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" />
</manifest>

That should be enough to compile Cyanogenmod, though it won't get you a flashable TAR package. The reason for that is that I don't master mkbootimg, and the resulting Kernel, DTB image and Boot & recovery ramdisks aren't compatible with the watch.

I have a set of scripts to help me out, but basically my process is this:

. build/envsetup.sh

breakfast pontesolo

make

cd kernel/samsung/pontesolo

make ARCH=arm android_b3_defconfig

./build6

That will get you a functional Kernel dzImage (steps 4-6), and the OUT folder populated to be able to copy it all to an image (steps 1-3). Once I have all that, I have a sample image files and two scripts that copy dzImage, the ramdisk contents and the system partition into those image files and pack it up as a TAR.

The "build6" command just compiles the kernel with 6 concurrent threads, builds the merged-dtb file (similar to CM's dt.img file, but lower in size) and then pack it up with samsung's magic binary stuff and put it into an Odin compatible TAR file. There's also the "buildKernel" script which does the same but with one thread only.

To be able to run the "build" commands for the kernel, you need to meet some dependencies. The first thing you'll need is QEMU, since Samsung's SDK is compiled for ARM and needs to be emulated (install it via apt-get/yum/whatever you want). Then, go to kernel/samsung/pontesolo and run ./fixLibs.sh to copy the missing libraries for the dtbtool and mkdzimage binaries so the build finishes as it should....

And more or less.. that's it! ;)

If you want I can make a repository with the empty images and the scripts to make the Odin package.

It's not as easy as compiling for Android compatible devices, but once you set it up correctly and get it right (booting) once you don't have to worry about it anymore :)

For Android Wear things are quite different. I mostly develop directly on the Watch, like with the Gear 2. Since there are no sources, my process is mostly:

Get a backup of everything which is running now.

Directly flash some donor's system.img file

Modify OTA file with Gear S partition details and trim out boot, modem and other partitions

Flash OTA file into the Gear S simulating that it is in fact the donor device

Convert the partition to ext4 (sometimes enabling some filesystem module on the kernel like squashfs)

Modify build.prop

Migrate libraries

Patch up missing dependencies, and go manually fixing everything else ;)

Most libraries are in /system/vendor/lib/ and /system/lib/hw/, but there are some (like liboverlay, libmemalloc, libhdmi, libvirtual, libQdUtils, libsec-ril etc) that are also needed for the HwComposer to work.

NOTE: Right now, the CM tree has some vendor file broken and attempts to boot but doesn't start and ends up in recovery (need to investigate it)

NOTE2: I'm testing your brand new Android Wear Image, based on latest (2 days ago) OTA update for the Gear Live. Haven't posted yet because Google Fit is eating my battery because it checks my heart beat every half an hour and don't know how to stop it, so I can't test if battery lasts longer since it's eating it...

New Feature is... Always On not making the watch die! It doesn't work yet... well it does, but it doesn't update while the watch is suspended so if you leave it on a table at 7:00 am and pick it up at 9 it will still say it's 7 am until you touch the screen, but at least you can configure it without having to change a setting so it doesn't die as soon as the screen goes off