prepare Makefile for packaging