fixed Makefile, added set_pg_rw