Compiling the shared library is failed following README_RPi.txt

Hi,

I’m on Raspberry Pi Build for DW3000 API + Simple Examples.
Following the README_RPi.txt instruction, I tried to compile the shared library and
simple example executables by invoking the Makefile.

But the error below was dumped and compile was failed.

make[1]: Entering directory '/home/pi/API'
Building target output/libdw3000/libdw3000.so ...
cc -shared -g -fPIC -Wall -Wextra -pedantic -std=c11 -D _DEFAULT_SOURCE -DRPI_BUILD -O2 -Os -g -pipe -W -fstack-clash-protection -fstack-protector output/libdw3000/./Src/MAC_802_15_8/mac_802_15_8.c.o output/libdw3000/./Src/MAC_802_15_4/mac_802_15_4.c.o output/libdw3000/./Src/decadriver/deca_device.c.o output/libdw3000/./Src/platform_rpi/deca_spi.c.o output/libdw3000/./Src/platform_rpi/deca_sleep.c.o output/libdw3000/./Src/platform_rpi/port.c.o output/libdw3000/./Src/platform_rpi/deca_mutex.c.o -Wl,-soname -Wl,libdw3000.so.4.0 -o \
./output/libdw3000/libdw3000.so.4.0.0 && \
	ln -sf libdw3000.so.4.0.0 ./output/libdw3000/libdw3000.so.4.0 && \
	ln -sf libdw3000.so.4.0 ./output/libdw3000/libdw3000.so
/usr/bin/ld: output/libdw3000/./Src/platform_rpi/deca_sleep.c.o:/home/pi/API/./Src/platform_rpi/port.h:45: multiple definition of `dwt_lock'; output/libdw3000/./Src/platform_rpi/deca_spi.c.o:/home/pi/API/./Src/platform_rpi/port.h:45: first defined here
/usr/bin/ld: output/libdw3000/./Src/platform_rpi/port.c.o:/home/pi/API/./Src/platform_rpi/port.h:45: multiple definition of `dwt_lock'; output/libdw3000/./Src/platform_rpi/deca_spi.c.o:/home/pi/API/./Src/platform_rpi/port.h:45: first defined here
/usr/bin/ld: output/libdw3000/./Src/platform_rpi/deca_mutex.c.o:/home/pi/API/./Src/platform_rpi/port.h:45: multiple definition of `dwt_lock'; output/libdw3000/./Src/platform_rpi/deca_spi.c.o:/home/pi/API/./Src/platform_rpi/port.h:45: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile.rpi:512: output/libdw3000/libdw3000.so] Error 1
make[1]: Leaving directory '/home/pi/API'
make: *** [Makefile:11: rpi] Error 2

Could you help me to solve this?

Regards,