After adding libelf-dev and compiling the module for 4.14.0-3-amd64 dkms is failing when compiling for broadcom-sta-dkms with:
# cat /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log DKMS make.log for broadcom-sta-6.30.223.271 for kernel 4.14.0-3-amd64 (x86_64) Fri Jan 12 10:49:26 CET 2018 /bin/sh: 1: [: Illegal number: /bin/sh: 1: [: Illegal number: Wireless Extension is the only possible API for this kernel version Using Wireless Extension API KBUILD_NOPEDANTIC=1 make -C /lib/modules/4.14.0-3-amd64/build M=`pwd` make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/usr/src/linux-headers-4.14.0-3-amd64' CFG80211 API is prefered for this kernel version Using CFG80211 API Kernel architecture is X86_64 AR /var/lib/dkms/broadcom-sta/6.30.223.271/build/built-in.o make[4]: *** No rule to make target '/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o', needed by '/var/lib/dkms/broadcom-sta/ 6.30.223.271/build/wl.o'. Stop. /usr/src/linux-headers-4.14.0-3-common/Makefile:1525: recipe for target '_module_/var/lib/dkms/broadcom-sta/6.30.223.271/build' failed make[3]: *** [_module_/var/lib/dkms/broadcom-sta/6.30.223.271/build] Error 2 Makefile:146: recipe for target 'sub-make' failed make[2]: *** [sub-make] Error 2 Makefile:8: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.14.0-3-amd64' Makefile:177: recipe for target 'all' failed make: *** [all] Error 2