This is most definitely *not* how you compile a C program in a debian package. There are specific targets in the Makefile for configuring the source, building it and running make install. You must use them.

Also, you must not install to /opt/rudder during a package build! Everything you install in a package build for Debian is usually place under debian/<package-name>, or debian/tmp at the very least.

See https://github.com/jooooooon/rudder-packages/blob/master/rudder-inventory-ldap/debian/rules#L53 for a full example.