Fix Makefile to support changing parent