cooja: only allow building from Cooja
Prevent building Cooja target binaries
from outside of Cooja.
Simulations can still be quickstarted
by using the native target (or any other
target than Cooja), or inside the docker
image:
cscmake file.csc
@@ -11,9 +11,13 @@ ifndef CONTIKI
$(error CONTIKI not defined!)
endif
-ifdef LIBNAME
# Detect incompatible Cooja versions when not performing "make clean".
ifneq ($(MAKECMDGOALS),clean)
+ ifndef LIBNAME
+ $(warning Cooja target should be built by Cooja)
+ $(error Use TARGET=native for quickstarting a .csc simulation file)
+ endif
+
ifndef COOJA_VERSION
$(error COOJA_VERSION not defined, please upgrade Cooja)
endif
@@ -26,7 +30,6 @@ ifneq ($(MAKECMDGOALS),clean)
$(error Cooja motes do not support boards, please remove the configuration 'BOARD=$(BOARD)')
endif
endif
-endif
# Use dbg-io for IO functions like printf()
MODULES += os/lib/dbg-io
