update copyrights and add ifdefs