c: fix compile script for enumerate example

Don't include device binding for non-device specific examples.
c: Move some more code into common device type