Import custom PKG, Makefile issue VPATH


I’m trying to import a custom package with it’s own makefile into RIOT. This custom package is a library. When I’m building this library in command line (outside of RIOT), it is successfully created. When I’m trying to build it through RIOT (with a test application fetching the pkg) it fails. It doesn’t find the first xxx.o file. Running make with -d showed me that the prerequisite of this xxx.o file is not found which is the xxx.c file. In my makefile I’m using the VPATH directive to trick the rules into thinking we are in root when we are in the build directory (VPATH = …). So here’s my question, is VPATH working if used in RIOT? If yes, how can I use it and if not, what other directive can I use to locate all my sources (my sources are in multiple directories …).

Thanks !