nes-proj/examples/sensniff/Makefile

38 lines
872 B
Makefile
Raw Normal View History

2016-07-24 03:10:03 +00:00
CONTIKI_PROJECT = sensniff
CONTIKI = ../..
2016-07-24 03:10:03 +00:00
PROJECT_SOURCEFILES += sensniff-mac.c netstack.c
2016-07-24 03:10:03 +00:00
PROJECTDIRS += pool $(TARGET)
-include $(CONTIKI)/Makefile.identify-target
2016-07-24 03:10:03 +00:00
### 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)
2017-10-08 12:47:34 +00:00
# use a custom MAC driver: sensniff_mac_driver
MAKE_MAC = MAKE_MAC_OTHER
2016-07-24 03:10:03 +00:00
include $(CONTIKI)/Makefile.include
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