add makefile for compilation
helper patch constraint function