1HOSTNAME!=	/bin/hostname
2
3.if ${HOSTNAME} == "lychee.itojun.org"
4SRC=	206.175.160.20
5SRC6=	3ffe:501:410:ffff:200:86ff:fe05:80fa
6.elif ${HOSTNAME} == "cardamom.itojun.org"
7SRC=	206.175.160.21
8SRC6=	3ffe:501:410:ffff:210:4bff:fea2:8baa
9.endif
10
11TARGETS=	cardamom.conf lychee.conf cardamom6.conf lychee6.conf ssh.conf
12
13all: $(TARGETS)
14
15lychee.conf: sandiego.pl
16	perl sandiego.pl $(SRC) 206.175.160.20 > lychee.conf
17cardamom.conf: sandiego.pl
18	perl sandiego.pl $(SRC) 206.175.160.21 > cardamom.conf
19lychee6.conf: sandiego.pl
20	perl sandiego.pl $(SRC6) 3ffe:501:410:ffff:200:86ff:fe05:80fa > lychee6.conf
21cardamom6.conf: sandiego.pl
22	perl sandiego.pl $(SRC6) 3ffe:501:410:ffff:210:4bff:fea2:8baa > cardamom6.conf
23ssh.conf: sandiego.pl
24	perl sandiego.pl $(SRC) 194.100.55.1 > ssh.conf
25
26# itojun
27ms.conf: sandiego.pl
28	perl sandiego.pl $(SRC) 206.175.161.182 > ms.conf
29
30clean:
31	-rm -f $(TARGETS)
32