move Makefile from test dir to root, add dependency of each test target and modified the curl with variables