If you use BASEDIR you will get absolute paths. Right now, the LIBOBJS paths will look like this:
```
build//path/to/mooltipass/source_code/src/CARD/./smartcard.o
```
I think it'd be better to expand them to:
```
build/CARD/smartcard.o
```

Am I understanding the code correctly if I assume that you want LIBDIRS to expand to "src/CARD src/FLASH src/USB src/OLED src/UTILS src/GRAPHICS src/lib/oledmp src/lib/spi"? In that case, changing lines 21-32 to something like this might be a bit more straight forward and generate the shorter paths I mentioned:
```make
LIBRARIES := $(addprefix src/, CARD FLASH USB OLED UTILS GRAPHICS lib/oledmp lib/spi)
LIBOBJS := $(foreach lib, $(LIBRARIES), $(patsubst src/%.c, build/%.o, $(wildcard $(lib)/*.c)))
```
Then you'd also need to change the build/%.o rule below to "build/%.o: src/%.c" and SRCS to "SRCS := src/*.c" (wildcards are automatically expanded in variable assignments, it seems).