Allow to set a default target (different from 'native') to be used if TARGET isn't set. This is i.e. useful for examples requiring network i/o.

This commit is contained in:
oliverschmidt 2007-05-26 22:38:23 +00:00
parent b16783b148
commit d6735fa9b2

View File

@ -8,8 +8,11 @@ CFLAGS += -DCONTIKI_TARGET=$(TARGET)
ifeq ($(TARGET),)
-include Makefile.target
ifeq ($(TARGET),)
${warning TARGET not defined, using native target}
TARGET=native
ifeq ($(DEFAULT_TARGET),)
DEFAULT_TARGET=native
endif
${warning TARGET not defined, using target '$(DEFAULT_TARGET)'}
TARGET=$(DEFAULT_TARGET)
else
${warning using saved target '$(TARGET)'}
endif