Check for tmote-bsl-linux binary under linux, and use it is available

This commit is contained in:
adamdunkels 2009-04-10 07:43:29 +00:00
parent 2545fd9069
commit 2e37fca49f

View file

@ -1,4 +1,4 @@
# $Id: Makefile.sky,v 1.23 2009/04/02 11:15:30 fros4943 Exp $
# $Id: Makefile.sky,v 1.24 2009/04/10 07:43:29 adamdunkels Exp $
ARCH=msp430.c leds.c watchdog.c light.c spi.c ds2411.c \
@ -54,8 +54,14 @@ ifndef MOTELIST
USBDEVPREFIX=
SERIALDUMP = $(CONTIKI)/tools/sky/serialdump-linux
MOTELIST = $(CONTIKI)/tools/sky/motelist-linux
BSL = $(CONTIKI)/tools/sky/msp430-bsl-linux --telosb
BSL_FILETYPE = -I
TMOTE_BSL=$(if $(wildcard $(CONTIKI)/tools/sky/tmote-bsl-linux),1,0)
ifeq ($(TMOTE_BSL), 1)
PATH := $(PATH):$(CONTIKI)/tools/sky
BSL = $(CONTIKI)/tools/sky/tmote-bsl-linux
else
BSL = $(CONTIKI)/tools/sky/msp430-bsl-linux --telosb
BSL_FILETYPE = -I
endif
MOTES = $(shell $(MOTELIST) 2>&- | grep USB | \
cut -f 4 -d \ | \
perl -ne 'print $$1 . " " if(m-(/dev/\w+)-);')