Local build: adding external libs

I was trying to compile, with the linking of an external library, but the build variables (described in build.md) did not seem to have effect for libraries. I know the make process was reading them at some point from my myapp.mk file, because the INCLUDE_DIRS variable was read. Basically, it seemed when building a $(APP).elf file (a rule from module.mk), it never read the LIB_DIRS, LIBS, or LIB_DEPS from my myapp.mk file.

Eventually, I added a variable inside the $(TARGET_BASE).elf rule in model.mk of $(LIB_MINE):


and set $(LIB_MINE) in my makefile as such:

cd firmware/main && make all PLATFORM=photon APP=myapp LIB_MINE=/the/full/path/foo.a

This seems sloppy and something I will have to manually maintain. Any help would be appreciated.