aboutsummaryrefslogtreecommitdiff
path: root/utils/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/Makefile')
-rw-r--r--utils/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 77e67a3..409ef2d 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -1,5 +1,18 @@
+IPAM=../ansible/group_vars/all/ipam.yml
+
all: utils
- go run main.go > ../ansible/group_vars/all/ipam.tmp.dot && dot -Tpng ../ansible/group_vars/all/ipam.tmp.dot > ../ansible/group_vars/all/ipam.tmp.png
+
+networks: ../ansible/group_vars/all/networks.tmp.png
+routers: ../ansible/group_vars/all/routers.tmp.png
+
+%.png:%.dot
+ dot -Tpng $< > $@
+
+../ansible/group_vars/all/networks.tmp.dot: $(IPAM)
+ go run main.go networks $< > $@
+
+../ansible/group_vars/all/routers.tmp.dot: $(IPAM)
+ go run main.go routers $< > $@
utils:
go build