add CMakeLists.txt for build as library

- needs cmake-avr toolchain