fix open call

only fopen would take "r" as string, but 'r' is an integer
that maps to RDWR|O_CREAT, which makes it fail to read from ro mounts
simplify Makefile

using default make rules