fix open call, nicify Makefile