Makefile: Refactor package logic