An easy way to do that is to install my program do a different folder than / and the data will be organized as it should be (bin lib include and share folders will be created) and I just need to merge the created folders with the ones on the target robot in /usr
./configure --prefix=/path/to/empty/folder
make
make install
finally copy the /path/to/empty/folder content to /usr on the robot