Refactor makefile for debian package