1INSTALL=install
2
3prefix  ?= /usr
4bindir  ?= $(prefix)/bin
5mandir  ?= $(prefix)/share/man
6miscdir ?= $(prefix)/share/dot2
7srcdir  ?= $(prefix)/src
8
9PYLIB  ?= $(shell python3 -c 'import sysconfig;  print (sysconfig.get_path("purelib"))')
10
11.PHONY: all
12all:
13
14.PHONY: clean
15clean:
16
17.PHONY: install
18install:
19	$(INSTALL) automata.py -D -m 644 $(DESTDIR)$(PYLIB)/dot2/automata.py
20	$(INSTALL) dot2c.py -D -m 644 $(DESTDIR)$(PYLIB)/dot2/dot2c.py
21	$(INSTALL) dot2c -D -m 755 $(DESTDIR)$(bindir)/
22	$(INSTALL) dot2k.py -D -m 644 $(DESTDIR)$(PYLIB)/dot2/dot2k.py
23	$(INSTALL) dot2k -D -m 755 $(DESTDIR)$(bindir)/
24
25	mkdir -p ${miscdir}/
26	cp -rp dot2k_templates $(DESTDIR)$(miscdir)/
27