Converted from pebble_th build system