1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/zep_dispatch/Makefile
benpicco 32def76a3c
Merge pull request #17338 from benpicco/tools/zep_dispatch-mac_pin
tools/zep_dispatch: allow to pin nodes to MAC address
2022-05-06 21:52:13 +02:00

52 lines
1.2 KiB
Makefile

CFLAGS ?= -g -O3 -Wall -Wextra
CFLAGS += $(RIOT_INCLUDE)
CFLAGS += -DNDEBUG # avoid assert re-definition
DISPATCH := bin/zep_dispatch
TOPOGEN := bin/topogen
all: $(DISPATCH) $(TOPOGEN)
bin:
mkdir bin
RIOTBASE := ../../..
ZEP_PORT_BASE ?= 17754
TOPOLOGY ?= network.topo
GV_OUT ?= $(TOPOLOGY).gv
RIOT_INCLUDE += -I$(RIOTBASE)/core/lib/include
RIOT_INCLUDE += -I$(RIOTBASE)/cpu/native/include
RIOT_INCLUDE += -I$(RIOTBASE)/drivers/include
RIOT_INCLUDE += -I$(RIOTBASE)/sys/include
SRCS := main.c topology.c zep_parser.c
SRCS += $(RIOTBASE)/sys/net/link_layer/ieee802154/ieee802154.c
SRCS += $(RIOTBASE)/sys/fmt/fmt.c
SRCS += $(RIOTBASE)/sys/net/link_layer/l2util/l2util.c
$(DISPATCH): $(SRCS) bin
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) $(SRCS) -o $@
$(TOPOGEN): topogen.c bin
$(CC) $(CFLAGS) $< -o $@ -lm
.PHONY: clean run graph help
clean:
rm -fr bin
run: $(DISPATCH) $(TOPOLOGY)
$(DISPATCH) -t $(TOPOLOGY) -g $(GV_OUT) ::1 $(ZEP_PORT_BASE)
$(TOPOLOGY): $(TOPOGEN)
./topogen.sh $(TOPOLOGY)
graph:
killall -USR1 zep_dispatch
dot -Tpdf $(GV_OUT) > $(GV_OUT).pdf
help:
@echo "run start ZEP dispatcher with the given \$$TOPOLOGY file"
@echo "graph print topology to \$$GV_OUT.pdf"
@echo "clean remove ZEP dispatcher binary"