2016-07-24 03:10:03 +00:00
|
|
|
DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
|
|
|
|
|
|
|
|
CONTIKI_PROJECT = sensniff
|
|
|
|
|
2017-05-17 13:30:36 +00:00
|
|
|
PROJECT_SOURCEFILES += sensniff-mac.c netstack.c
|
2016-07-24 03:10:03 +00:00
|
|
|
PROJECTDIRS += pool $(TARGET)
|
|
|
|
|
|
|
|
ifeq ($(TARGET),)
|
|
|
|
-include Makefile.target
|
|
|
|
ifeq ($(TARGET),)
|
|
|
|
TARGET=srf06-cc26xx
|
|
|
|
$(info TARGET not defined, using target $(TARGET))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
### Optionally, the target can add its own Makefile, to do things like e.g.
|
|
|
|
### add more source files to the build or define make variables.
|
|
|
|
-include $(TARGET)/Makefile.$(TARGET)
|
|
|
|
|
|
|
|
all: $(CONTIKI_PROJECT)
|
|
|
|
|
|
|
|
CONTIKI = ../..
|
|
|
|
include $(CONTIKI)/Makefile.include
|
2016-12-04 18:51:57 +00:00
|
|
|
|
|
|
|
PYTHON ?= python
|
|
|
|
SENSNIFF = $(CONTIKI)/tools/sensniff/sensniff.py
|
|
|
|
|
|
|
|
ifeq ($(BAUDRATE),)
|
|
|
|
BAUDRATE = 460800
|
|
|
|
endif
|
|
|
|
|
|
|
|
SENSNIFF_FLAGS += -b $(BAUDRATE)
|
|
|
|
|
|
|
|
ifneq ($(PORT),)
|
|
|
|
SENSNIFF_FLAGS += -d $(PORT)
|
|
|
|
endif
|
|
|
|
|
|
|
|
sniff:
|
|
|
|
ifeq ($(wildcard $(SENSNIFF)), )
|
|
|
|
$(error Could not find the sensniff script. Did you run 'git submodule update --init' ?")
|
|
|
|
else
|
|
|
|
$(PYTHON) $(SENSNIFF) $(SENSNIFF_FLAGS)
|
|
|
|
endif
|