fixed the makefile so it can work while invoked by SCAPI's main makefile.